install.packages("rjson")
library("rjson")
result <- fromJSON(file="provdata.json.txt")
for (i in seq(1,5,1))
{
term <- result$data[i]
print(term)
}
I was wondering what should I put to only print 13.6 and 4.15.
Your problem is that you're not subsetting the list deep enough: instead of the
term <- result$data[i]
print(term)
bit, try with
print(result$data[[1]][[1]][2])
or something similar.