| checkDataUpload | R Documentation |
This is used in dataUploadServer. Checks for (in this order):
exactly one ID column, which is by default converted to character
actual data columns besides ID
all data columns are numeric
When all of the above pass without issues, the function returns a named list
with data contained in result and NULL contained in message,
otherwise it witholds the data by returning NULL for result and
message will contain a character vector of the issue(s) noted.
If the downstream use for data requires different check steps and transformations,
this function can be replaced as long as the new one uses the same return structure.
For some cases, if it is desired that we return data even if there are issues,
use result = data and rely on the message output.
checkDataUpload(data, result = NULL, idcol = "ID", idchar = TRUE, html = TRUE)
data |
A |
result |
What to return in place of data if issues are found with the data. Defaults to |
idcol |
Name of expected ID column, defaulting to "ID". |
idchar |
Logical with default |
html |
(Not used) Logical with default TRUE, for whether to format message with HTML for display. |
A list with result and message. See details.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.