It is common for individual researchers to set stringsAsFactors=FALSE in their .Rprofile, so when running tests that expect dataframe columns to be factors, it would be better to do one of the following:
-
explicitly set options(stringsAsFactors=FALSE) (or TRUE) at the start of the test file, and restore its original value at end.
-
when comparing columns, use as.factor or as.character, as appropriate
It is common for individual researchers to set
stringsAsFactors=FALSEin their.Rprofile, so when running tests that expect dataframe columns to be factors, it would be better to do one of the following:explicitly set
options(stringsAsFactors=FALSE)(orTRUE) at the start of the test file, and restore its original value at end.when comparing columns, use
as.factororas.character, as appropriate