Try this:
# get weather data
library(jsonlite)
dat<-
fromJSON('http://api.openweathermap.org/data/2.5/group?id=524901,703448,2643743&units=metric&appid=ec0313a918fa729d4372555ada5fb1f8')
tab <- dat$list
#look at what we get
class(tab)
names(tab)
ncol(tab)
nrow(tab)
tab[,c("clouds","wind","name")
Hey David,
A big big thank you..!!
Your code worked like a charm and with little tweaks i extracted each item
from other nested data frames. Now i got a single data frame
My final code: dat2 <- cbind(as.data.frame(dat1$list[!names(dat1$list) %in%
c("coord","weather","sys","main","wind","clouds"
> On Jan 14, 2017, at 9:27 AM, William Dunlap via R-help
> wrote:
>
> This is a question concerning the interface between the TIBCO products
> Spotfire and TERR so most people on this mailing list won't have a
> clue. You will have better luck with TIBCO support or asking in the
> Q&A section
This is a question concerning the interface between the TIBCO products
Spotfire and TERR so most people on this mailing list won't have a
clue. You will have better luck with TIBCO support or asking in the
Q&A section of https://community.tibco.com.
It does sound like you might have a data.frame
Hey Rob,
Thanks for replying but what i see after i run str(tab$list) is that it has
nested data.frame. And for some weird reason Spotfire is discarding and
stating as illegal data type.
On Jan 14, 2017 20:15, "Rob Baer" wrote:
> I just tried after fixing what I thoug were email wrapping errors
Hi Jermiah,
When i ran this code in Spotfire, my aim is to get output as a data table.
I am getting the same error:
TIBCO Enterprise Runtime for R returned an error: 'Error in
.cleanDataForExport(value, output.name) : Output data 'tab$coord' has
illegal type: 'data.frame''.
Code that I used:
l
Thanks Jeremiah, I'll try this.
On Jan 13, 2017 11:23 PM, "jeremiah rounds"
wrote:
I TAd a course in R computing and the first thing I told students was
"inspect. inspect. inspect."
d1 <- fromJSON('http://api.openweathermap.org/data/2.5/
group?id=524901,703448,2643743&units=metric&appid=
ec0313
I TAd a course in R computing and the first thing I told students was
"inspect. inspect. inspect."
d1 <- fromJSON('
http://api.openweathermap.org/data/2.5/group?id=524901,703448,2643743&units=metric&appid=ec0313a918fa729d4372555ada5fb1f8
')
names(d1)
str(d1)
d1
d1$list
your_data = d1$list
On Fri,
8 matches
Mail list logo