[R] How to see any R package code?

David Winsemius dwinsemius at comcast.net
Thu Nov 5 18:38:10 CET 2009


On Nov 5, 2009, at 10:24 AM, Zhijiang Wang wrote:

>
>   Dear All,
>   I have modified a .R code (/usr/local/lib/R/site-library/ 
> brainwaver/R),

What did you "modify"? How did you modify it?

> but
>   when I run it,

How did you run it? If the "it" is just a single function that you  
altered after it was loaded into the workspace, then you should show  
us what you entered at the command line. If you were attempting to  
change the contents of a package in an R library and recompile it,  
then you should be reading:

http://cran.r-project.org/doc/manuals/R-exts.html

-- 
David


> why does it run the original code? Whatever I modified it,
>   the results did not change.
>   what happened?


>
>   Paul Hiemstra 写道:
>
>     Zhijiang Wang wrote:
>
>        Dear All,
>        I want to see a R package code, how can I do that?
>        what file in the package?
>        --
>     Best wishes,
>     Zhijiang Wang
>     --------------------------------------------
>     PHD Student
>     Room 212, Science buliding,
>     The International WIC Institute,
>     College of Computer Science and Technology,
>     Beijing University of Technology,
>     Beijing, China.
>     ______________________________________________
>     [1]R-help at r-project.org mailing list
>     [2]https://stat.ethz.ch/mailman/listinfo/r-help
>     PLEASE do read the posting guide
>     [3]http://www.R-project.org/posting-guide.html
>     and provide commented, minimal, self-contained, reproducible code.
>
>
>     Hi Zhijiang,
>     When you want to look at the code of a particular function, pass  
> the
>     command without the brackets, e.g. for lm:
>> lm
>     Alternatively,  you  can  download the source package and go to  
> the
>     subdirectory R/. All the R code is located there.
>     cheers,
>     Paul
>
>   --
>
> Best wishes,
> Zhijiang Wang
> --------------------------------------------
> PHD Student
> Room 212, Science buliding,
> The International WIC Institute,
> College of Computer Science and Technology,
> Beijing University of Technology,
> Beijing, China.
>
> References
>
>   1. mailto:R-help at r-project.org
>   2. https://stat.ethz.ch/mailman/listinfo/r-help
>   3. http://www.R-project.org/posting-guide.html
> ______________________________________________
> 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




More information about the R-help mailing list