Hi
you maybe can use mapply
If you have 2 lists
xl<-list(x, x+5)
xl
[[1]]
[1] 1 2 3 4 5
[[2]]
[1] 6 7 8 9 10
> yl<-list(9,10)
> yl
[[1]]
[1] 9
[[2]]
[1] 10
and this function
fff<- function(xl,yl) (xl-yl)/yl
mapply(fff, xl, yl)
[,1] [,2]
[1,] -0.889 -0.4
[2,] -0.778
I have two kinds of list,
for example, one is like
t[[1]]=
1 6
2 7
3 8
4 9
5 10
...
t[[731]]
the other is
k[[1]]= 9 10
...
k[[731]]
I want to have a new list,like x
x[[1]]=
(1-9)/9(6-10)/10
(2-9)/9(7-10)/10
(3-9)/9(8-10)/10
(4-9)/9(9-10)/10
(5-9)/9(10-10)/10
...
x[[731]]
How s
2 matches
Mail list logo