[R] Query about extracting subset of datafram
lalitha viswanath
lalithaviswanath at yahoo.com
Wed Jan 24 21:31:56 CET 2007
Hi
I have a table read from a mysql database which is of
the kind
clusterid clockrate
I obtained this table in R as
clockrates_table <-sqlQuery(channel,"select....");
I have a function within which I wish to extract the
clusterid for a given cluster.
Although I know that there is just one row per
clusterid in the data frame, I am using subset to
extract the clockrate.
clockrate = subset(clockrates_table, clusterid==15,
select=c(clockrate));
Is there any way of extracting the clockrate without
using subset.
In the help section for subset, it mentioned to "see
also: [,..."
However I could find no mention for this entry when I
searched as "?[", etc.
The R manuals also, despite discussing complex
libraries, techniques etc, dont always seem to provide
such handy hints/tips and tricks for manipulating
data, which is a first stumbling block for newbies
like me.
I would greatly appreciate if you could point me to
such resources as well, for future reference.
Thanks
Lalitha
____________________________________________________________________________________
8:00? 8:25? 8:40? Find a flick in no time
More information about the R-help
mailing list