Description Usage Arguments Details Value See Also Examples
removeInvalid removes the invalid ESM questionnaires as specified by the user.
1 |
dfList |
a list. Each element of the list must be a data.frame. Each data.frame is a separate raw ESM dataset/an ESM questionnaire version. If there is just one ESM version the list therefore contains one data.frame. |
RELEVANTVN_ES |
a list. This list is generated by function |
A data line is assumed to be invalid if both the start date and the start time are missing (NA = not available).
The user receives a list containing 4 elements:
dfValid, i.e. the raw ESM dataset(s), after removing all invalid lines of data.
listInvalid, i.e. the raw ESM dataset(s), containing only the removed lines of data.
rmInvalidFinished, i.e. a logical value, specifying whether at least one line of data was removed due to being invalid.
noLinesRemovedAtAll, i.e. a logical vector, specifying in which of the ESM raw dataset(s) there were invalid lines of data.
See Details for more information.
Exemplary code (fully executable) in the documentation of esmprep
(function 9 of 29).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o
# Prerequisites in order to execute rmInvalid. Start ----------------
# Use example list delivered with the package
RELEVANTVN_ES <- RELEVANTVN_ESext
# keyLsNew is a list of datasets, also delivered with the package
# Prerequisites in order to execute rmInvalid. End ------------------
# ------------------------------------------------------
# Run function 9 of 29; see esmprep functions' hierarchy.
# ------------------------------------------------------
# keyLsNew is the result of function 'genDateTime' (or of function 'splitDateTime').
rmInvLs <- rmInvalid(keyLsNew, RELEVANTVN_ES)
# Result of function 'rmInvalid' is a list with 4 elements:
names(rmInvLs)
# o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.