I want to generate a set of 1000 random numbers between 1 and 20000 to then use those to subset a dataframe.
sample.int(20000, 2000, replace = TRUE) Then I want to copy/paste these numbers into this vector
df_sub <- df[,c(65,25,1,6000,1056, ...)] Is this possible?
var <- sample(20000, 1000, TRUE)then use the var to subsetdf[sample(1:20000, 1000, replace=T),]