I've a table containing two columns
seperated by space, as shown below.
S:C 2.011085038928
S:A 21.496800549900762
S:J 0.183181039138149
P:E 9.641984304606304
I'm reading this table inside a loop
but unable to access the first column
R does vectorized arithmetic. Your loop was superfluous. Observe:
x - read.table(textConnection(
+ S:C 2.011085038928
+ S:A 21.496800549900762
+ S:J 0.183181039138149
+ P:E 9.641984304606304))
x
V1 V2
1 S:C 2.0110850
2 S:A 21.4968005
3 S:J 0.1831810
4 P:E 9.6419843
transform(x,
djmu...@gmail.com
Subject: Re: [R] R help for read.table()
To: gau...@gauravkumar.org
Cc: r-help@r-project.org
Date: Wednesday, 20 January, 2010, 4:43 PM
R does vectorized arithmetic. Your loop was superfluous. Observe:
x - read.table(textConnection(
+ S:C 2.011085038928
+ S:A
3 matches
Mail list logo