The following commands give you a new dataframe randomly selected from df
df <- your dataframe
indx <- sample(nrow(df), 0.1*nrow(df), replace=F)
df2 <- df[indx,]
The following commands give you a new dataframe randomly selected from df
df <- your dataframe
indx <- sample(nrow(df), 0.1*nrow(df), replace=F)
df2 <- df[indx,]
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.