# Simple conditional plot

4 messages
Open this post in threaded view
|

## Simple conditional plot

 I just started using R last week. I have a dataset with 3 columns - Plate, Well and Raw I need to make a simple plot(Well~Raw) but only when Plate = 101 Thanks for your help.
Open this post in threaded view
|

## Re: Simple conditional plot

 Try plot(Well~Raw, subset= Plate==101) -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of rstudent Sent: Friday, July 08, 2011 8:56 AM To: [hidden email] Subject: [R] Simple conditional plot I just started using R last week. I have a dataset with 3 columns - Plate, Well and Raw I need to make a simple plot(Well~Raw) but only when Plate = 101 Thanks for your help. -- View this message in context: http://r.789695.n4.nabble.com/Simple-conditional-plot-tp3654300p3654300.htmlSent from the R help mailing list archive at Nabble.com. ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code. ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: Simple conditional plot

 In reply to this post by rstudent On Jul 8, 2011, at 10:55 AM, rstudent wrote: > I just started using R last week. > > I have a dataset with 3 columns - Plate, Well and Raw > > I need to make a simple plot(Well~Raw) but only when Plate = 101 ?subset # Some plotting paradigms allow you to use a subset = but   any  program that had a data= option would allow data=subset(dfrm,   Plate==101) newseRs:  Remember to use double "=="'s > > Thanks for your help. > > -- > View this message in context: http://r.789695.n4.nabble.com/Simple-conditional-plot-tp3654300p3654300.html> Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > [hidden email] 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. David Winsemius, MD West Hartford, CT ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: Simple conditional plot

 In reply to this post by rstudent Another possibility without using subset(): plot(Well[][Plate==101]~Raw[][Plate==101]) This also works to '>=' '<=' and other conditions.   Victor Delgado Professor in department of Economics, UFOP - Univ. Federal de Ouro Preto, Brazil