Skip to content
Back to formatted view

Raw Message

Message-ID: <alpine.LNX.2.00.1110041156490.12907@salmo.appl-ecosys.com>
Date: 2011-10-04T18:58:15Z
From: Rich Shepard
Subject: How to subset() from data frame using specific rows
In-Reply-To: <CAM_vju=3XeCFPcqV+ynZ5RFRBWEPW+CjQSu=h=-Qgu5xxR0mUw@mail.gmail.com>

On Tue, 4 Oct 2011, Sarah Goslee wrote:

> You can use something like this:
>
>> testdata <- c("A1", "A2", "A3", "B1", "B2", "B3")
>> grep("^A", testdata)
> [1] 1 2 3
>> grepl("^A", testdata)
> [1]  TRUE  TRUE  TRUE FALSE FALSE FALSE

Sarah,

   I don't see how this gives me a data frame containing only those sites I
specify. I want to plot by sites-within-streams specifying which param
factor to use.

Thanks,

Rich