I am trying the following code, with R 2.13:
aa <- list()
aa["test"] <- list(x1=5,x2=7)
What I get is:
> aa
$test
[1] 5
but I would like something closer to:
$test
$x1 5
$x2 7
Can someone explain me what I am doing wrong? Thanks!
OK, just found what I was doing wrong!
aa[["test"]] <- list(x1=5,x2=7)
Does the trick!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With