I am running the following code:
library(data.table)
test <- fread("file location", colClasses = 'factor')
test <- test[1:100]
test[, c(1:5)]
I am trying to look at the first 100 observations and the first 5 columns, but when I run the second function the output is:
[1] 1 2 3 4 5