[R] subset data frame problem

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Mon Dec 13 05:46:49 CET 2021


Use one ampersand, not two.

And post plain text.

On December 12, 2021 8:30:11 PM PST, Kai Yang via R-help <r-help using r-project.org> wrote:
>Hi R team,I want to delete records from a data frame if Class = '1st' and Survived = 'No'. I wrote the code below, test <- subset(PD, Class != '1st' && Survived != 'No')
>but the code return a wrong result. Can someone help me for this? 
>Thanks,Kai
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>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.

-- 
Sent from my phone. Please excuse my brevity.



More information about the R-help mailing list