[R] how to define a function in R

Joshua Wiley jwiley.psych at gmail.com
Wed Jul 7 03:22:32 CEST 2010


Hello,

As others have said, its hard to give specific advice without specific
needs, but that's okay; I made up some examples needs and some (rather
silly) code that might handle it.  Depending what you need to do, it
may help you get started.  I tried to explicitly name all the
arguments in any functions I used.

When I make gmail use basic text format instead of html, code is sent
poorly, so you can trundle off here to see the example, if you like.

http://gist.github.com/466164

Cheers,

Josh

On Tue, Jul 6, 2010 at 3:48 PM, jd6688 <jdsignature at gmail.com> wrote:
>
> 1. how to write a R script?
> 2.How to write a SAS like macro/generic process to process multiple files by
> using the same funstion in R?
>
> Thanks in advance
> --
> View this message in context: http://r.789695.n4.nabble.com/how-to-define-a-function-in-R-tp2280290p2280290.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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