[R] what happen?

2006-04-18 Thread zhang jian
Hi!
I want to choose part of the data. But it has a question.

 attach(PIKO)
 PIKO[1:5,]
 code species  dbh x y   tag status branch
92  10142PIKO 38.9  6.05 12.81 10165  alive  0
109 10213PIKO 41.0  6.71 26.21 10202  alive  0
135 10222PIKO 48.3 18.98 21.28 10214  alive  0
146 10223PIKO 47.0 19.45 22.83 10224  alive  0
147 10223PIKO 20.0 19.74 28.65 10225  alive  0
 n=PIKO[dbh=25,]
 n[1:5,]
 code species  dbh x y   tag status branch
92  10142PIKO 38.9  6.05 12.81 10165  alive  0
109 10213PIKO 41.0  6.71 26.21 10202  alive  0
135 10222PIKO 48.3 18.98 21.28 10214  alive  0
146 10223PIKO 47.0 19.45 22.83 10224  alive  0
152 10223PIKO 33.5 16.94 27.25 10230  alive  0
* n=PIKO[status=snag,]
Error in [.data.frame(PIKO, status = snag, ) :
unused argument(s) (status ...)
*

[[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


Re: [R] what happen?

2006-04-18 Thread Dimitris Rizopoulos
Look at: ?Comparison; you need:

PIKO[status == snag, ]


Best,
Dimitris


Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://www.med.kuleuven.be/biostat/
 http://www.student.kuleuven.be/~m0390867/dimitris.htm


- Original Message - 
From: zhang jian [EMAIL PROTECTED]
To: r-help r-help@stat.math.ethz.ch
Sent: Tuesday, April 18, 2006 4:45 PM
Subject: [R] what happen?


 Hi!
 I want to choose part of the data. But it has a question.

 attach(PIKO)
 PIKO[1:5,]
 code species  dbh x y   tag status branch
 92  10142PIKO 38.9  6.05 12.81 10165  alive  0
 109 10213PIKO 41.0  6.71 26.21 10202  alive  0
 135 10222PIKO 48.3 18.98 21.28 10214  alive  0
 146 10223PIKO 47.0 19.45 22.83 10224  alive  0
 147 10223PIKO 20.0 19.74 28.65 10225  alive  0
 n=PIKO[dbh=25,]
 n[1:5,]
 code species  dbh x y   tag status branch
 92  10142PIKO 38.9  6.05 12.81 10165  alive  0
 109 10213PIKO 41.0  6.71 26.21 10202  alive  0
 135 10222PIKO 48.3 18.98 21.28 10214  alive  0
 146 10223PIKO 47.0 19.45 22.83 10224  alive  0
 152 10223PIKO 33.5 16.94 27.25 10230  alive  0
 * n=PIKO[status=snag,]
 Error in [.data.frame(PIKO, status = snag, ) :
unused argument(s) (status ...)
 *

 [[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
 


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

__
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


Re: [R] what happen?

2006-04-18 Thread Manuel López-Ibáñez


zhang jian wrote:

 * n=PIKO[status=snag,]
 Error in [.data.frame(PIKO, status = snag, ) :
 unused argument(s) (status ...)

= is the assignment operator, you should use == as in:
n=PIKO[status==snag,]


__ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com

__
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