[R] Documentation

Joshua Wiley jwiley.psych at gmail.com
Tue Jun 21 10:11:29 CEST 2011


Hi,

On Tue, Jun 21, 2011 at 1:04 AM, siddharth arun <sid.arun91 at gmail.com> wrote:
> I am new in R.
>
> Can anyone tell :
> 1. how we can write our own functions in R ?

foo <- function(args) {
  function body
}

> 2. how we can save those functions and recall to use them?

by saving what you write in a script file---later on you may want to
put them in a package.

> 3. what extensions are used for saving a file?

for syntax, typically .R

If you are new to R, you will benefit from carefully reading the
manuals:  http://cran.r-project.org/manuals.html

I would start with An Introduction to R, and then if you are
interested in writing your own package(s), the Writing R Extensions
manual.

Cheers,

Josh

>
>
> --
> Siddharth Arun,
> 4th Year Undergraduate student
> Industrial Engineering and Management,
> IIT Kharagpur
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/



More information about the R-help mailing list