-------- Original-Nachricht --------
Datum: Wed, 27 Oct 2010 15:09:59 +0200
Von: "Sibylle Stöckli" <sibylle.stoec...@gmx.ch>
An: Rhelp <r-help@r-project.org>
Betreff: Fwd: as.list

-------- Original-Nachricht --------
Datum: Wed, 27 Oct 2010 15:03:48 +0200
Von: "Sibylle Stöckli" <sibylle.stoec...@gmx.ch>
An: Rhelp <r-help@r-project.org>
Betreff: as.list

Dear R-users

sorry, here Rcode included (attachment has been removed)

I would like to read a txt file as list, to select rows and columns, and to 
create barplots.

(1) selection of parameter site and part: ok
(2) read txt file as list: problem with (1) as there are NA's (the lines not 
selected)

(3) barplot: 5 different groups of bars (the selected columns H5,H8, S5,S8, 
C8). In each group 4 different bars (parameter diversity)
--> error in -0.01*height: non-numeric argument to binary operator

PROBLEM
As (2) gives NULL, I think that there is a mistake in my r-script with the 
vector/list function.

Thanks
Sibylle

R-Code

PA<-read.table("Biotree_partitioning.txt", header=TRUE)
KANE<-which((PA$site=="KA")&(PA$part=="NE"))
KANE.LIST<-vector("list", dim(PA[KANE,])[2]-4)
KANE.LIST

barplot(KANE.LIST, col=as.numeric(PA$diveristy))

-- 



-- 
GMX DSL Doppel-Flat ab 19,99 &euro;/mtl.! Jetzt auch mit 
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl

-- 


______________________________________________
R-help@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.

Reply via email to