Re: [R] How to create a function returning an array ?

2013-06-28 Thread Kaptue Tchuente, Armel
rdoch [mailto:murdoch.dun...@gmail.com] Sent: Friday, June 28, 2013 9:53 AM To: Kaptue Tchuente, Armel Cc: r-help@r-project.org Subject: Re: [R] How to create a function returning an array ? On 28/06/2013 10:46 AM, Kaptue Tchuente, Armel wrote: > Please could you explain what you mean by sever

Re: [R] How to create a function returning an array ?

2013-06-28 Thread Duncan Murdoch
elp@r-project.org Subject: Re: [R] How to create a function returning an array ? On 28/06/2013 10:18 AM, Kaptue Tchuente, Armel wrote: > @ Duncan, I have already used the syntax that you proposed before > asking for help by writing something like > > read_ts<-function(n,m,img)

Re: [R] How to create a function returning an array ?

2013-06-28 Thread Kaptue Tchuente, Armel
ne 28, 2013 9:30 AM To: Kaptue Tchuente, Armel Cc: r-help@r-project.org Subject: Re: [R] How to create a function returning an array ? On 28/06/2013 10:18 AM, Kaptue Tchuente, Armel wrote: > @ Duncan, I have already used the syntax that you proposed before > asking for help by writing som

Re: [R] How to create a function returning an array ?

2013-06-28 Thread Duncan Murdoch
. I think this is reasonably efficient. Duncan Murdoch Armel -Original Message- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: Friday, June 28, 2013 8:16 AM To: David Winsemius Cc: Kaptue Tchuente, Armel; r-help@r-project.org Subject: Re: [R] How to create a function returning

Re: [R] How to create a function returning an array ?

2013-06-28 Thread Kaptue Tchuente, Armel
ay instead of a vector. Armel -Original Message- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: Friday, June 28, 2013 8:16 AM To: David Winsemius Cc: Kaptue Tchuente, Armel; r-help@r-project.org Subject: Re: [R] How to create a function returning an array ? On 27/06/2013

Re: [R] How to create a function returning an array ?

2013-06-28 Thread Duncan Murdoch
On 27/06/2013 11:38 PM, David Winsemius wrote: On Jun 27, 2013, at 8:04 PM, Kaptue Tchuente, Armel wrote: > Hi there, > > I would like to know how to change the line "img=as.single(rnorm(m)))" such that instead of being a vector of length m as it is now, img is an array of dimension c=(n,m,o)

Re: [R] How to create a function returning an array ?

2013-06-27 Thread David Winsemius
On Jun 27, 2013, at 8:04 PM, Kaptue Tchuente, Armel wrote: > Hi there, > > I would like to know how to change the line "img=as.single(rnorm(m)))" such > that instead of being a vector of length m as it is now, img is an array of > dimension c=(n,m,o) for instance > > -

[R] How to create a function returning an array ?

2013-06-27 Thread Kaptue Tchuente, Armel
Hi there, I would like to know how to change the line "img=as.single(rnorm(m)))" such that instead of being a vector of length m as it is now, img is an array of dimension c=(n,m,o) for instance - read_ts<-function(n,m,o,img) { out<-.Fortran("read_ts",