ActiveDataSet

The ActiveDataSet keyword was adopted from the Statistica Visual Basic language and it performs the same function in R scripts: it references the active Statistica data spreadsheet.

In the desktop Statistica environment, active data set usually means the top-most visible spreadsheet, which can act as a data source. It can also be a spreadsheet in a workbook selected as Active Input. This notion is redefined and extended for server-based environments (Statistica Server, Enterprise), but the keyword is still valid and refers to the corresponding server-side mapping of the active data source. If no active data set is defined or available, the R script that uses it fails. The same is true for SVB macros.

If the R Integration Support Macro encounters the ActiveDataSet keyword in the R script, it transfers the actual Statistica active data set into the R environment and assigns it to a variable of the same name. Therefore, this keyword represents a data frame variable and can be handled as such in the script.

Example:

ActiveDataSet[1:5] # display a subset of active dataset(variables 1 through5)

str(ActiveDataSet) # view the structure of the data frame

plot(ActiveDataSet$MEASURE01) # plot"MEASURE01"variable values