previewData | R Documentation |
This function retruns the 100 observations of a particular data table. The option of storing an API key in an environment variable is prepared to run the function without passing an API key every time. Please see the examples bellow.
previewData(table_name = "", utd_api_key = NULL)
table_name |
A name of a data table a user specifies. Your input is NOT case-sensitive. |
utd_api_key |
An API key provided by a server manager at UTD |
A data frame of a specified data table.
The retrived data are invoked in a spreadsheet-style by 'View()', but the class of the variable, '_id', in the data is a datafame, so it returns error if you view them by 'edit()'. To check the data with 'edit()', the variable of '_id' needs to be dropped.
## Not run: data <- previewData(utd_api_key, "icews") View(data) # the 100 observations of ICEWS data are shown # using the option of storing an API key as an environmental variable Sys.setenv(UTDAPIKEY = "your utd_api_key") data <- previewData("icews") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.