View source: R/resource_handling.R
createResourceStubsFromCsv | R Documentation |
Creates XML stubs for interface and resource section from CSV file structure
createResourceStubsFromCsv(
filename,
id,
sep = ",",
keyvals = NULL,
arraycolumns = NULL,
frequence = "DAILY",
rule = NULL,
data = NULL
)
filename |
name of the CSV file |
id |
id for the resource |
sep |
separator for CSV file |
keyvals |
named vector of column indices or names that act as key column |
arraycolumns |
vector of column indices or names that are arrays |
frequence |
frequence attribute for the resource |
rule |
rule attribute for the resource |
data |
optional data.frame (otherwise data will be loaded from file) |
list of two strings ('interface' and 'resource')
stubs <- createResourceStubsFromCsv(
filename = system.file("input","weather.csv", package="simplaceUtil"),
id = "weather",
sep =",",
keyvals = c("CURRENT.DATE" = "Date")
)
cat(stubs$interface)
cat(stubs$resource)
stubs <- createResourceStubsFromCsv(
filename = system.file("input","soil.csv", package="simplaceUtil"),
id = "soil",
sep =";",
keyvals = c("vSoilType" = "soiltype"),
arraycolumns = 6:20
)
cat(stubs$resource)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.