R
The VDP R package enables you to retrieve data via Virtual Data Platform and interact with it in R. Using the package, you can work with your various functions and models directly in R by simply using a function. As there is no wizard available to generate formulas, it is recommended to use the vdpR package in combination with the VDP Office Add-In.
Get started
The vdpR package can be installed like any other R package, so depending on the location of the package you can either install it from a CRAN repository or download and install it. If you download and install it, make sure that all listed dependencies are installed as well. If not, the missing packages for the installation will be displayed.
After having installed the R package, it can be loaded as usual to use the included functions.
Functions
First, you need to retrieve a token to be able to get the data via Virtual Data Platform. Therefore, initialize a new instance of the Token class:
token = Token$new()
Fig. 1 Token Initialization.
This token can now be used to initialize a VDP object:
vdp_data = VDP$new(token)
Fig. 2 VDP Initialization.
To add parameters to a request, you can use the following method:
vdp_data$param$add_parameter_body(vec_parameter_name = c("ROWCOUNT"), vec_parameter_value = c(5))
Fig. 3 Parameter.
To get the data, the following method can be used:
df = vdp_data$get('Computation', 'RandomData')
Fig. 4 VDP Request.
The first parameter denotes the category and the second one the name of the function or model.