On Mon, Nov 17, 2008 at 5:00 AM, megh <[EMAIL PROTECTED]> wrote:
>> lapply(1:5, function(i) c(1,2,3)^i)
> [[1]]
> [1] 1 2 3
...
> This is fine. However my goal is : each element of this list should depend
> on previous element like :
>
> lis # List name
> then,
>
> lis[[i]] = lis[[i-1]] + c(1,2,3)^
I get following result, while I write this code :
> lapply(1:5, function(i) c(1,2,3)^i)
[[1]]
[1] 1 2 3
[[2]]
[1] 1 4 9
[[3]]
[1] 1 8 27
[[4]]
[1] 1 16 81
[[5]]
[1] 1 32 243
This is fine. However my goal is : each element of this list should depend
on previous element like :
lis # Lis
2 matches
Mail list logo