Hi there- I have a 150 row dataset (data). I create "y" a randomly sampled (without replacement) set number of observations (40):
y<-data[sample(1:nrow(data),40,replace=FALSE),] I would like to make a new variable "x" that contains the leftover non-sampled 110 observations. I am sure there is a fairly easy way to do this. Any help would be greatly appreciated. THANKS! -- View this message in context: http://r.789695.n4.nabble.com/How-to-view-un-sampled-data-from-a-randomly-sampled-dataset-tp4678887.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.