[R] A comment about R:
Roger Bivand
Roger.Bivand at nhh.no
Wed Jan 4 10:05:01 CET 2006
On Tue, 3 Jan 2006, Gabor Grothendieck wrote:
> On 1/3/06, Thomas Lumley <tlumley at u.washington.edu> wrote:
> > On Tue, 3 Jan 2006, Peter Dalgaard wrote:
> > > One thing that is often overlooked, and hasn't yet been mentioned in
> > > the thread, is how much *simpler* R can be for certain completely
> > > basic tasks of practical or pedagogical relevance: Calculate a simple
> > > derived statistic, confidence intervals from estimate and SE,
> > > percentage points of the binomial distribution - using dbinom or from
> > > the formula, take the sum of each of 10 random samples from a set of
> > > numbers, etc. This is where other packages get stuck in the
> > > procedure+dataset mindset.
> >
> > Some of these things are actually fairly straightforward in Stata. For
>
> In fact there are some things that are very easy
> to do in Stata and can be done in R but only with more difficulty.
> For example, consider this introductory session in Stata:
>
> http://www.stata.com/capabilities/session.html
>
> Looking at the first few queries,
> see how easy it is to take the top few in Stata whereas in R one would
> have a complex use of order. Its not hard in R to write a function
> that would make it just as easy but its not available off the top
> of one's head though RSiteSearch("sort.data.frame") will find one
> if one knew what to search for.
Could I ask for comments on:
source(url("http://spatial.nhh.no/R/etc/capabilities.R"), echo=TRUE)
as a reproduction of the Stata capabilities session? Both the t test and
the chi-square from our side point up oddities. I didn't succeed on
putting fit lines on a grouped xyplot, so backed out to base graphics.
This could be Swoven, possibly using the RweaveHTML driver.
The three obvious world-view differences are functions returning objects
(but difficult to "see" when the default print method for the object shows
the object), nested function calls (on-the-fly objects), and multiple
data-sets (objects, typically data frames) simultaneously present in the
workspace. Inserting objects() into the script would show the workspace
growing, perhaps.
Roger
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-help
mailing list