Re: [R] select dataframe records

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Sun 24 Apr 2005 - 01:06:50 EST

Pieter Provoost wrote:

> Hi,
>
> I'm reading some data from a file. The code below plots the all records in a barplot. How can I plot only records 5 to 10?

By indexing?
Please read the psoting guide and the docs.

> chldata <- read.table("test3.txt",header=TRUE)
> barplot(rev(chldata$chlorophyll),horiz=TRUE,names.arg=rev(chldata$depth))

   with(chldata[5:10,],
     barplot(rev(chlorophyll), horiz=TRUE, names.arg=rev(depth))

Uwe Ligges

> Thanks in advance,
> Pieter
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sun Apr 24 01:11:29 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:25 EST