Re: [R] Really simple question

From: Søren Højsgaard <Soren.Hojsgaard_at_agrsci.dk>
Date: Tue, 10 Jun 2008 22:42:25 +0200

?setdiff


Fra: r-help-bounces_at_r-project.org på vegne af naw3_at_duke.edu Sendt: ti 10-06-2008 22:32
Til: r-help_at_r-project.org
Emne: [R] Really simple question

Hi,

I don't have too much programming experience - sorry in advance if this question is very basic, and thanks for the help.

I have a vector of numbers and another vector of a subset of those numbers. How can I create a third vector with all the numbers in the original list that aren't in the given subset. Like this:

List1 subset --> result

1       1           2
2       3
3       4
4       5

5

Thank you so much!
-Nina



R-help_at_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.

R-help_at_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. Received on Tue 10 Jun 2008 - 21:08:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 10 Jun 2008 - 21:30:58 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive