Studying jmvcore I see that factors are preprocessed using toB64 function. In a module I'm developing, however, I got this:
# levels(dat$wfac)
[1] "0" "1"
jmvcore::toB64(levels(dat$wfac))
"MA" "MQ"
What is the purpose of preprocessing factor levels like this. Is there a guideline or can we skip iin module development?
toB64
Re: toB64
hey mcfanda,
some R packages don't like column names/levels with special characters or spaces in them. so if you pass them through 'as-is', the results you get back will be all weird. so it's for working around bugs in upstream packages.
so if the upstream packages work fine, then you don't need to use base 64 encoding. but if it's an issue we try these:
a) report the issue to the upstream package maintainer (and he fixes it)
b) submit a PR to the upstream package fixing the issue
c) work around the upstream package issue by converting the names to/from base64
cheers
some R packages don't like column names/levels with special characters or spaces in them. so if you pass them through 'as-is', the results you get back will be all weird. so it's for working around bugs in upstream packages.
so if the upstream packages work fine, then you don't need to use base 64 encoding. but if it's an issue we try these:
a) report the issue to the upstream package maintainer (and he fixes it)
b) submit a PR to the upstream package fixing the issue
c) work around the upstream package issue by converting the names to/from base64
cheers