# NOT RUN {
exampleDf <- data.frame(Teams=c("HSV", "FCB", "FCB", "HSV"),
Player=c("Mueller", "Mueller", "Robben", "Holtby"),
scores=c(3.5, 1.5, 1.5, 1.0), stringsAsFactors=TRUE)
strDf <- dfFactor2Str(exampleDf)
stopifnot(identical(strDf[,1], c("HSV", "FCB", "FCB", "HSV")))
stopifnot(identical(exampleDf[,1], factor(c("HSV", "FCB", "FCB", "HSV"))))
# }
Run the code above in your browser using DataLab