[R] select dataframe records
Uwe Ligges
ligges at statistik.uni-dortmund.de
Sat Apr 23 17:06:50 CEST 2005
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 at 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
More information about the R-help
mailing list