Maxim,
I'm not sure how much faster this would be ... but you could test it out
and see. I defined lngL and result as vectors instead of lists. And I
calculated j outside of the "loop".
myList <- list(a="key1", b=c("key2","key3"), c="key4")
myVec <- c("val1","val2","val3","val4")
lngL <- sappl
Hi,
for some reason I have to map elements of a list "myList" (of vectors of
different length) to a vector "myVec" as such:
myList <- list(a="key1", b=c("key2","key3"), c="key4")
myVec <- c("val1","val2","val3","val4")
result <- list()
lapply(myList,length) -> lngL
j <- 1
for (i in 1:(length(l
2 matches
Mail list logo