[R] Selecting biological data
Jim Holtman
jholtman at gmail.com
Sat Sep 5 18:05:14 CEST 2009
subset(data1,cast==33&(depth %in% c(1,20,100))
Sent from my iPhone
On Sep 5, 2009, at 11:58, John Casey <johnrcasey at hotmail.com> wrote:
>
> Hello all,
> I am new to R but have some experience with MATLAB and am trying
> to make the switch. I generally find the two languages easy to adapt
> but there are a few routine tasks which I would like to run smoother
> in R and I am having trouble finding a help resource. Could someone
> suggest a guide to filtering, selecting, sorting, and processing
> biological matrix data? Here is a rudimentary example of what I'm
> after [ocean research cruise- data.frame<-example]:
>
> Cruise, dec yr, station, cast, depth, data1
> 1, 2007.65, 9, 29, 1, 105.04
> 1, 2007.65, 9, 29, 10, 104.91
> 1, 2007.65, 9, 29, 20, 101.43
> 1, 2007.65, 9, 29, 50, 100.68
> 1, 2007.65, 9, 29, 100, 100.09
> 1, 2007.69, 11, 33, 1, 107.32
> 1, 2007.69, 11, 33, 10, 105.94
> 1, 2007.69, 11, 33, 20, 102.19
> 1, 2007.69, 11, 33, 50, 101.27
> 1, 2007.69, 11, 33, 100, 100.15
>
> Let's say I would like to select data1 from cast 33 at 1, 20, and
> 100m depth... how would I go about this?
>
> Thanks in advance for helping out a greenhorn!
> John
>
>
> _________________________________________________________________
>
> Facebook.
>
> :ON:WL:en-US:SI_SB_facebook:082009
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
More information about the R-help
mailing list