Skip to main content

DataFrame R


# As an alternative to creating a DatabaseDataReaderCommand which connects to a database,
# this example shows how to create an in-memory DataTable and associated DataTableDataReaderCommand
# from an R dataframe

source("bayesserver.R")

dataTable <- toDataTable(mtcars)

dataReaderCommand <- new(DataTableDataReaderCommand, dataTable)

# the dataReaderCommand created above can be used in many of Bayes Server's data driven methods.