chmFieldAccessFunction | R Documentation |
This function returns the name of a Javascript function thats accepts a string vector as its parameter, and for each string in the vector splits the string into fields separated by fieldsep, and accesses field idx (zero origin). The function returns a vector of these fields.
chmFieldAccessFunction(fieldsep, idx)
fieldsep |
The separator to be used for splitting the input string. This should be a single character string. |
idx |
The index (zero origin) of the field to be returned after splitting the input string. This should be a single integer. |
The name of the function returned for a specific fieldsep and idx will be constant within an R session, but may differ between R sessions (or if this library is unloaded and reloaded).
The name of the newly created field access function.
chmGetFunction()
chmStringopFunction()
# Create a new field access function that splits the input string at ',' and
# returns the first field.
chmFieldAccessFunction(',', 1)
# Create a new field access function that splits the input string at '-' and
# returns the second field.
chmFieldAccessFunction('-', 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.