Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in conditions() with parsing temp? #12

Closed
RMHogervorst opened this issue Dec 19, 2016 · 1 comment
Closed

error in conditions() with parsing temp? #12

RMHogervorst opened this issue Dec 19, 2016 · 1 comment

Comments

@RMHogervorst
Copy link

In data.frame(weather = cond$weather, temp = as.numeric(cond[[paste0("temp_",  :
  NAs introduced by coercion

I gues the NA's are not correclty parsed?

however: when I do a raw request

conditions <- rwunderground::conditions(location = "pws:ILEIDEN46", use_metric = TRUE, raw = TRUE)
as.numeric(conditions$current_observation$temp_c)  # does work. 

conditions$current_observation[[temp_c]]  does not work. 
@erichare
Copy link
Contributor

That second line in your example isn't valid R code, unless temp_c is an object. Note that both these work:

conditions$current_observation$temp_c
conditions$current_observation[["temp_c"]]

No need to convert to numeric as it already is numeric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants