[R] Calling R object from R function

R. Michael Weylandt michael.weylandt at gmail.com
Wed Nov 7 19:28:38 CET 2012


On Wed, Nov 7, 2012 at 3:31 PM, frespider <frespider at hotmail.com> wrote:
> Hi,
>
> Can you please help me with this please?
>
> What I am trying to do is call a vector from R function and used in the new
> function
>
> So I create 4 functions with these arguments
> M11 <- function(TrainData,TestData,mdat,nsam) {
> ls <- list()
> I have few statments one of them is
> vectx <- c(,1,2,3,4,5,6,6)
> vectz <- c(12,34,5,6,78,9,90)
> and then................
> ls(vectx=vtecx,vectz=vectz)
> return(ls)
> }

This is not valid assignment to a list. In fact, I'm rather surprised
it doesn't throw an error...

Michael




More information about the R-help mailing list