Re: [R] Internal functions

From: Charles C. Berry <cberry_at_tajo.ucsd.edu>
Date: Fri, 7 Dec 2007 11:29:04 -0800

See

         ?body

HTH, Chuck

On Fri, 7 Dec 2007, piotr iksiński wrote:

> I've complex problem and this's idealization of it:
>
> v=1:10
>
> fx<-function(x){
> v[x]=v[x]*2}
>
> fy<-function(y){
> fx(y)}
>
> for(i in 1:10){
> fy(i)}
>
> How to modife expresion (and only that):
> {v[x]=v[x]^2}
>
> to achive the redefinetion of the values of vector v, the result should
> be: v=(1:10)*2. I think, that could be done with using of internal
> functions, but I'm not the programmer.
> Thanks for help
> pg
>
> ----------------------------------------------------
> Płyta CD i kartka pocztowa "Pocztówka do Św.Mikołaja 2007" już
> w sprzedaży. Kupując tę płytę pomagasz dzieciom
> z domów dziecka. wwW.pocztowkadoswietegomikolaja.pl
> http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fpocztowka.html&sid=122
>
> ______________________________________________
> 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.
>

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry_at_tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901



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. Received on Fri 07 Dec 2007 - 19:34:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 07 Dec 2007 - 20:30:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.