Then I read JSON files from R using rjson it seems that JSON arrays (enclosed with []
) are converted to (unnamed) R lists, not vectors.
Therefore I have to first unlist(recuresice=F)
each of those lists before I can work with them.
- Is there any logic behind this conversion I am missing? I mean, why use a list (and not a vector) to store an array?
- Is there any way to control this behavior of rjson (or perhaps another recommended JSON parser for R)?