cleanCols | R Documentation |
This function eliminates the unnecesary metadata columns and renames the columns from mongo to the identifier, according to the dictionary.
cleanCols(
df,
dictionary,
colsToKeep = c("id", "surveyName", "surveyId", "totalTimeMin",
"geolocation.coordinates", "lat", "long", "geo.accuracy", "fingerprint",
"browserReport.ip", "sensataId", "createdAt"),
removeParams = FALSE,
removeScreens = TRUE,
responseType = "newResponses"
)
df |
data downloaded from Mongo and loaded to R. |
dictionary |
dictionary created with dictGenerator.R |
colsToKeep |
vector of names of metadata columns to keep. Defaults to: id, surveyName, surveyId, totalTimeMin, geolocation.coordinates, fingerprint, browserReport.ip and, createdAt. All questions are always included. |
removeParams |
logical, if TRUE params from mongo are removed. |
removeScreens |
logical, if TRUE screens are removed |
responseType |
which object version should the function use, one of "newResponses" or "structuredResponses" |
Dataframe with renamed fewer metadata and renamed selected answers as the question identifier.
Gabriel N. Camargo-Toledo gcamargo@sensata.io
bogData <- bogData %>% cleanCols(dictionary = bogDic)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.