Hello there,
I'm relatively new to R, although I've used it to some extent to perform simple tests.
My issue seems minor, as it doesn't seem to affect what I need to do with my data frames, but it bothers me nonetheless :
When I use str() and summary(), gives me :
summary(data)
Gender Treatment
Length:107 Length:107
Class :character Class :character
Mode :character Mode :character
instead of something like
Gender Treatment
M = x Treatment1 = x1
F = y Treatment2 = y2
and
str(data)
'data.frame': 107 obs. of 6 variables: Gender : chr "M" "M" "F" "F" ...
Treatment : chr "A" "A" "B" "E"
Instead of
Gender : Factor w/ 2 levels "F","M": etc.
Treatment : Factor w/ 2 levels "Treatment1", Treatment2... etc.
Are you reading the dataset from a CSV file? The way you are reading it may affect character/factor.
Up to a very recent update, by default read.csv always used to read character columns as factors. Then it changed and now it's always read as characters. That may explain if your confusion is due to the difference of the results you're getting in the present and past.
If you want to make them as factors while creating the data frame, there are arguments for that, both in read.csv and in other alternative functions.