Re: [R] Using object as literal value in list vector

2012-06-20 Thread ROLL Josh F
, 2012 1:14 PM To: ROLL Josh F Cc: R help Subject: Re: [R] Using object as literal value in list vector Hi, You can try: NewMeans<-split(matrix(unlist(MeanValues_)*0.80),1:nrow(matrix(unlist(MeanValues_)*0.80))) names(NewMeans)<-names(MeanValues_) NewMeans $ACC [1] 800 $RTL [1] 1600 $

Re: [R] Using object as literal value in list vector

2012-06-20 Thread Rui Barradas
Hello, Try NewMeans_ <- lapply(MeanValues_, `*`, 0.80) That's it. Note also that you could have used, after your loop, names(NewMeans_) <- Et But 'lapply' is much better. Hope this helps, Rui Barradas Em 20-06-2012 01:31, LCOG1 escreveu: Hello all , This is a pretty simple question I t

[R] Using object as literal value in list vector

2012-06-20 Thread LCOG1
Hello all , This is a pretty simple question I think but cannot find an answer on the list or in my brain. I would like to iterate through a loop and use a vector of strings to name a number of list elements. For instance #Create vector of strings Et<- c("ACC","RTL","WHL")