sqlQuery() function in RODBC library will be helpful.
Sincerely,
On Nov 15, 2006, at 1:33 AM, Jens Scheidtmann wrote:
> Xiaodong Jin <[EMAIL PROTECTED]> writes:
>
>> how to realize the following SQL command in R?
>>
>> select distinct A, B, count(C)
>> from TABLE
>> group by A, B
>> ;
>
Xiaodong Jin <[EMAIL PROTECTED]> writes:
> how to realize the following SQL command in R?
>
> select distinct A, B, count(C)
> from TABLE
> group by A, B
> ;
> quit;
The functional equivalent of is statement in R on a dataframe is:
TABLE$ones <- 1;
aggregate(TABLE$ones, list(TABLE$
Xiaodong Jin wrote:
> I just need to query ordinary 3-column excel data e.g.
> V1 V2 V3
> I1 C1 1
> I1 C1 1
> ... << DATA snipped >>
Hi. It is better to keep discussion on list, rather than emailing
individuals.
You need to read
http://cran.r-project.org/doc/manuals/R-data.html#Reading-Excel-spr
Jin,
Xiaodong Jin yahoo.com> writes:
> how to realize the following SQL command in R?
>
> select distinct A, B, count(C)
> from TABLE
> group by A, B
> ;
> quit;
>
if you want to perform such "query" on a data.frame! then
table(table$a, table$b)
will produce similar output, but in
Xiaodong Jin wrote:
> how to realize the following SQL command in R?
>
> select distinct A, B, count(C)
> from TABLE
> group by A, B
> ;
> quit;
>
> Best Regards
You don't say which database you are using, but I have found RODBC to be
very effective.
library("RODBC")
Have a l
how to realize the following SQL command in R?
select distinct A, B, count(C)
from TABLE
group by A, B
;
quit;
Best Regards
-
Sponsored Link
Get a free Motorola Razr! Today Only! Choose Cingular, Sprint, Verizon, Alltel,
or T-Mobile.