I'd like to split the 'Auto' data into two datasets. One is a data frame should contain 292 randomly chosen observations. And another data frame contain the remaining observations.
I have already known how to generate the first 292 randomly observations
set.seed(1)
first_idx = sample(1:nrow(Auto), 292)
first_split = Auto[first_idx, ]
my question is how can I get the remaining datasets? Is there any function that can help me to extract the first_idx from the Auto data?