I created a training and testing subset from my original data:
df <- data.frame(var = seq(1, 200, by = 2))
train.rows <- sample(1:100, 75, replace = FALSE)
df.train <- df[train.rows,]
df.test <- df[-train.rows,]
How can I see the numbers of the rows from the original dataframe (df
) that I selected to be in df.test
? (To see the ones that I selected to be in df.train
, I would just check out trains.rows
. But that is not possible for -train.rows
)
Edit: the title is about the fact that I specify/select rows for a training set and now I just want to know the ones that I didn't select for the training set