[R] R is not for Relational

Robert Gentleman rgentlem at jimmy.harvard.edu
Tue Aug 3 17:14:37 CEST 1999


On Tue, Aug 03, 1999 at 02:30:46PM +0200, Peter Dalgaard BSA wrote:
> John Carter <john at dwaf-hri.pwv.gov.za> writes:
> 
> > R is not for Relational, but could be...
> > 
> > I was musing on data.frames when I decided what I needed was a SQL
> > like 'select' statement.
> > 
> > Before I get involved in writing something like that, has anyone else
> > written anything that allows a relational like algebra on data.frames?
> 
> Check if subset() does something in the right direction. What would
> the select statement do, precisely? (I don't speak SQL)
-- 
  As near as I can tell subset does much of what select does in SQL

  subset(airquality, Temp > 80, select = c(Ozone, Temp))

  translates to something like:
   SELECT Ozone, Temp
	FROM airquality
    WHERE Temp > 80

  But don't get too excited; R fails some of the important criteria
that a relational DB needs to satisfy. In particular I'm thinking of
the non-subversion rule: there should be no way to programmatically
subvert the relational rules that specify a table. In R (and any real
programming language this is impossible to obtain).
 (of course there is the small problem that neither Ross nor I would
be willing to change our names ;-)

+-------------------------------------------------------------------------+
| Robert Gentleman              voice: (617) 632-5045                     |
| Senior Lecturer               fax:   (617) 632-2444
|
| University of Auckland	email1: rgentlem at jimmy.harvard.edu        |
| on leave at:                                                            |
| Dana-Farber Cancer Institute  email2: rgentlem at stat.auckland.ac.nz      |
+-------------------------------------------------------------------------+




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list