Obtain field names from R list

31 views
Skip to first unread message

Anand Srinivasan

unread,
Oct 15, 2015, 2:50:44 AM10/15/15
to haskellr
Hi,

Is it possible to obtain the names along with the values when using lists?
In particular, the following list

list(a=1,b=2,c=3)

unboxes into a vector of doubles [1,2,3] when using the view pattern 

(hexp -> H.List s s' s'') -> (castSEXP s) ++ (castSEXP s')

where "castSEXP" is assumed to be a function taking SEXP  to Haskell primitives.
Is it possible to obtain the fields "a", "b", and "c" as well? If so, what is the correct way to unbox this SEXP? 
Reply all
Reply to author
Forward
0 new messages