[R] Odp: R: Odp: Function able to identify the row and the column in a matrix
Petr PIKAL
petr.pikal at precheza.cz
Wed Jan 21 12:00:26 CET 2009
"enrico.foscolo2 at libero.it" <enrico.foscolo2 at libero.it> napsal dne
21.01.2009 11:54:49:
> I can't use the function "outer" because my function fun() doesn't take
vectors
> as arguments.
If you can not
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.
you probably can not expect reasonable answer to such vague question
Regards
Petr
> Thank You,
>
> Enrico Foscolo
>
> >----Messaggio originale----
> >Da:
> petr.pikal at precheza.cz
> >Data: 21-gen-2009 11.52
> >A: "enrico.foscolo2 at libero.it"
> <enrico.foscolo2 at libero.it>
> >Cc: <r-help at r-project.org>
> >Ogg: Odp: [R] Function
> able to identify the row and the column in a matrix
> >
> >Hi
> >
> >?outer
> >
> >regards
>
> >Petr
> >
> >r-help-bounces at r-project.org napsal dne 21.01.2009 11:47:03:
> >
> >> Good
> morning to all,
> >>
> >> I should evaluate a function for every cell of a given
>
> >> matrix with n rows and n columns.
> >>
> >> This function, named fun(), has got
> two
> >> arguments: the number of the row and the number of the column which
> >>
> characterized every single cell.
> >>
> >> So the result should be
> >>
> >> fun
> (1,1) fun(1,2)
> >> ... fun(1,n)
> >> fun(2,1) fun(2,2) ... fun(2,n)
> >>
> ... ... ...
> >> ...
> >> fun(n,1) fun(n,2) ... fun(n,n)
>
> >>
> >> Does it exist a function which could build
> >> this new matrix, where
> each element in the cell (i,j) is fun(i,j), with
> >1<=i,
> >> j<=n?
> >>
> >> Thank
> you very much,
> >>
> >> Enrico Foscolo
> >>
> >>
> ______________________________________________
> >> 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.
> >
> >
>
>
More information about the R-help
mailing list