[R-SIG-Finance] Help needed for accessing factor data,
Bharat Kherwa
bharatram.mnit at gmail.com
Sat Sep 17 00:18:30 CEST 2011
Hi Guys,
I have some daily tick data like this,
V1
V2
1 spy,20110815 09:30:00,119.18,119.19,119.18,119.19,0,0,0.0,false
2 spy,20110815 09:30:01,119.21,119.21,119.19,119.21,0,0,0.0,false
3 spy,20110815 09:30:02,119.22,119.27,119.21,119.27,0,0,0.0,false
4 spy,20110815 09:30:03,119.26,119.27,119.18,119.18,0,0,0.0,false
5 spy,20110815 09:30:04,119.2,119.2,119.18,119.2,0,0,0.0,false
6 spy,20110815 09:30:05,119.21,119.21,119.18,119.18,0,0,0.0,false
The structure of the data is as follows:
'data.frame': 23399 obs. of 2 variables:
$ V1: Factor w/ 1 level "spy,20110815": 1 1 1 1 1 1 1 1 1 1 ...
$ V2: Factor w/ 23399 levels
"01:00:00,119.92,119.92,119.92,119.92,0,0,0.0,false",..: 10800 10801
10802 10803 10804 10805 10806 10807 10808 10809 ...
Now I want to access the individual elements of data[1,2] which is
09:30:00,119.18,119.19,119.18,119.19,0,0,0.0,false,
i.e. access 119.18 separately, and similarly for other entries in the row...
How do I do that? I tried all combinations to access the individual
elements with no success,
Any help will be greatly appreciated.
Thanks a lot
Bharat
More information about the R-SIG-Finance
mailing list