one way is to use: x[!x %in% chosen]
I hope it helps. Best, Dimitris ----- Original Message ----- From: "Xiao Shi" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Sunday, October 09, 2005 11:26 AM Subject: [R] How to get the remaining vector after sampling a subset? > Hi , > I have a vector,for example, > x=rnorm(100) > Then i rendom choose 20 of them. > chosen=sample(x,20). > And i want to get the remain values in x. > Is there a quick way to go? > > Thanks in advance. > > [[alternative HTML version deleted]] > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
