[R] Data frame referencing?

2006-08-04 Thread Sander Oom
Dear R users, When you do: x - rnorm(10) y - rnorm(10) z - rnorm(10) a - data.frame(x,y,z) a$x [1] 1.37821893 0.21152756 -0.55453182 -2.10426048 -0.08967880 0.03712110 [7] -0.80592149 0.07413450 0.15557671 1.22165341 Why does this not work: a[a$y0.5,y] -1 Error in

Re: [R] Data frame referencing?

2006-08-04 Thread Gabor Grothendieck
When specifying a column name with [ the name must be quoted (unlike when using it with $): a[a$y 0.5, y] - 1 On 8/4/06, Sander Oom [EMAIL PROTECTED] wrote: Dear R users, When you do: x - rnorm(10) y - rnorm(10) z - rnorm(10) a - data.frame(x,y,z) a$x [1] 1.37821893

Re: [R] Data frame referencing?

2006-08-04 Thread Dimitris Rizopoulos
/336899 Fax: +32/(0)16/337015 Web: http://med.kuleuven.be/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm - Original Message - From: Sander Oom [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Friday, August 04, 2006 1:48 PM Subject: [R] Data frame referencing

Re: [R] Data frame referencing?

2006-08-04 Thread Sander Oom
://www.student.kuleuven.be/~m0390867/dimitris.htm - Original Message - From: Sander Oom [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Friday, August 04, 2006 1:48 PM Subject: [R] Data frame referencing? Dear R users, When you do: x - rnorm(10) y - rnorm(10) z - rnorm(10