Message-ID: <DF2401D3-8DCF-4541-95F8-9ED4EDA3E5E1@comcast.net>
Date: 2009-11-29T04:59:26Z
From: David Winsemius
Subject: How to find where the source code of an R function or package is installed?
In-Reply-To: <366c6f340911282000l11f15da7x4960198c0502e1a7@mail.gmail.com>
On Nov 28, 2009, at 11:00 PM, Peng Yu wrote:
> I'm wondering where is the source of an R function or a package is.
> For example, where is 'attributes'?
>
>> attributes
> function (obj) .Primitive("attributes")
>
> I also do understand what .Primitive mean.
Looking below, it appears your understanding is different than mine.
> Could somebody let me know
> how to locate source file in an R installation?
Most R installations do not have the source code. But it is of course
available.
https://svn.r-project.org/R/branches/R/src/main/
> Why typing
> 'attributes' does not give its definition?
Because it's a .Primitive? ... which to me anyway means it is not
implemented in R code.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius, MD
Heritage Laboratories
West Hartford, CT