findChars {esmprep}R Documentation

findChars

Description

findChars picks all variables from the (merged) ESM dataset that are of the class character.

Usage

findChars(esDf)

Arguments

esDf

a data.frame. A single ESM dataset. It must contain the 2 columns that hold the date-time object for when an ESM questionnaire was started and finished, respectively.

Details

findChars prints to the console the structure of all variables in esDf that contain character values (i.e. text). Among these variables (the index of which is returned by the function) the user can select those that are suitable to apply the function convertChars to.

Value

Indices (with corresponding variable names as attributes) of the columns of esDf, containing character strings. See Details for more information and see Examples.

See Also

Exemplary code (fully executable) in the documentation of esmprep (function 15 of 29).

Examples

# 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 findChars. Start ----------------
# Use example list delivered with the package
RELEVANTVN_ES <- RELEVANTVN_ESext
# isCompleteLs is a list of datasets, also delivered with the package
esMerged <- esMerge(isCompleteLs, RELEVANTVN_ES)
esMerged[,RELEVANTVN_ES[["ES_IMEI"]]] <- as.character(esMerged[,RELEVANTVN_ES[["ES_IMEI"]]])
# Prerequisites in order to execute findChars. End ------------------
# -------------------------------------------------------
# Run function 15 of 29; see esmprep functions' hierarchy.
# -------------------------------------------------------
# esMerged is the result of function 'esMerge'
findTextIdx <- findChars(esMerged)
# Display structure of function output
str(findTextIdx)
# 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

[Package esmprep version 0.2.0 Index]