# [R] Plotting a simple subset

Berton Gunter gunter.berton at gene.com
Fri Jul 8 18:04:24 CEST 2005

```Please first read "An Introduction to R" (one of the pdf manuals that ships
with R) before posting these sorts of questions, as it is written

Other (links to) learning resources may be found on the CRAN website. Please
take advantage of them. One that you may find particularly helpful is:

Newbies (and others!) may find useful the R Reference Card made available by
the "Contributed" link on CRAN (where some other reference cards are also
linked). It categorizes and organizes a bunch of R's basic, most used
functions so that they can be easily found. For example, paste() is under
the "Strings" heading and expand.grid() is under "Data Creation." For
newbies struggling to find the right R function as well as veterans who
can't quite remember the function name, it's very handy.

Yes, the initial learning curve is steep. However, if you do any serious
data analysis and/or plotting, I promise that you will find it well worth

-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA

"The business of the statistician is to catalyze the scientific learning
process."  - George E. P. Box

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Michael Hopkins
> Sent: Friday, July 08, 2005 8:50 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] Plotting a simple subset
>
>
>
> Hi all
>
> Just converting from Stata to R and struggling a little to
> come to terms
> with the new philosophy/command line.
>
> E.g. I want to plot x against y if x < 5
>
> In Stata: graph x y, if( x < 5 )
>
> How do I do this in R?  Have tried most of the obvious options without
> success.
>
> Can I have multiple subsets? I.e. In Stata: if( x < 5 && y > 3 )
>
> TIA
>
> Michael
>
>
> _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
> _/_/_/_/_/_/_/
>
>         _/    _/   _/_/_/             Hopkins Research Ltd
>        _/    _/   _/    _/
>       _/_/_/_/   _/_/_/          http://www.hopkins-research.com/
>      _/    _/   _/   _/
>     _/    _/   _/     _/               'touch the future'
>
> _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
> _/_/_/_/_/_/_/
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help