Marc, thanks for pointing out. I completely misread Xiaofan's post.
In addition to your advice, I like to point out the function which()
which selects only the true values. This is comes in handy when one has
missing values or if the condition generates missing values in the data.
Regards, Adai
Adai,
I suspect that Xiaofan was looking for the use of a function like
subset(), which of course does enable one to specify filtering criteria
and return a subset of rows in a data frame that satisfy the criteria.
I am presuming that the SQL reference was more towards using SQL
Select/Where type
Check out the R Data Import/Export manual, especially
http://cran.r-project.org/doc/manuals/R-data.html#DBI-_002f-RMySQL
and the RMySQL package.
On Sun, 2005-11-06 at 03:37 +, Xiaofan Li wrote:
> Dear colleague,
>
> Is it able in R to manipulate data tables as in SQL-based databases?
> Is t
Dear colleague,
Is it able in R to manipulate data tables as in SQL-based databases?
Is there any good method in R to locate a special subset of data rows, which
satisfy a certain expression of restrictions (e.g. dataTable$peakValue <
3.0)? Then if located, is it able for manipulations, for examp