The section on data in packages in the writing r extentions manual explains various ways of including data in packages. The appdemo package contains a couple of datasets; you can find these in the data
directory of the source package (these data were copied from MASS for illustration purposes).
The OpenCPU API docs explain how to access the data using the /package/data/
endpoint. For example we can read "Boston" dataset using any of the output formats:
Some other datasets in the package. Try reading them in other formats:
If you want to use data sets in code or functions, make sure to read the section on data in packages in the writing r extentions manual. You either need to set data()
funcion in R.