eers,
jimi
On 09Aug, 2012, at 17:39 , arun wrote:
> HI,
>
> In the reply I sent, I forgot to add,
>
> anew<-list()#before,
> for(i in 1:length(b1)){
> anew[[i]]<-list()
> anew[[i]]<-b1[[i]]-c[[i]]
> }
>
> A.K.
>
> - Original Message
mple, if I wanted to subtract each element in "c" from the scalar in
"b". For example, if i had
> a$b
[1] 1988
[2] 1989
…
&
> a$c
[[1]]
[1] 1985 1982 1984
[[2]]
[1] 1988 1980
…
I'm looking for a result of:
a$new
[[1]]
[1] 3 6 4
[[2]]
[1] 1 9
…
I've t
0
[3] 1999
…
For some reason i'm not figuring out how to properly get lapply and strsplit
(or other alternatives) to play nicely together. Any help greatly appreciated.
thanks,
jimi
jimi adams
Assistant Professor
Department of Sociology
American University
e: jad...@american.edu
w: jim
3 matches
Mail list logo