I wanted to make a project of mine reproducible, so I put it on our local server and reran it script by script. I ran into some errors while running some scripts and I found the issue to be that the data in the data frames is stored as factors and not vectors. On my own device the default class when subsetting the data is "character" and on the server it is "factor"
df <- data.frame(x=1:100, y=100:1, "number" = sample(c("one", "two", "three", "four", "five"), 100, replace = T))
On my own device the default class when subsetting the data is "character" and on the server it is "factor". (e.g. class(df$number))
Is there any way to change the global default of this without having to add as.vector() or stringsAsFactors = F everywhere? Also did the global default of this change during some R Update? On the server the R version is 3.6.0 and on my device it is 4.2.1.