Is it possible to index an R list using a character variable and the '$' operator? -


can explain why null in following ?

> =  list( 'key'='val') > a$'key' [1] "val" > a$key [1] "val" > key_var = 'key' > a$key_var null 

i know can

> a[[key_val]] [1] "val" 

but think double brackets can messy (especially when working nested lists, etc).


Comments

Popular posts from this blog

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -