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

get_current_forecast example throws error instead of result #7

Open
nachti opened this issue Sep 5, 2017 · 5 comments
Open

get_current_forecast example throws error instead of result #7

nachti opened this issue Sep 5, 2017 · 5 comments
Assignees
Labels

Comments

@nachti
Copy link

nachti commented Sep 5, 2017

Running the example from get_current_forecast after fiddling around with the API KEY throws an error:

tmp <- get_current_forecast(37.8267, -122.423)
# Error in select_colwise_names(.tbl, .cols) : 
#  argument ".cols" is missing, with no default

traceback()
# 5: select_colwise_names(.tbl, .cols)
# 4: dplyr::mutate_at(dat, .funs = funs(convert_time), .vars = ftimes[which(ftimes %in% 
#        colnames(dat))])
# 3: FUN(X[[i]], ...)
# 2: lapply(lys[which(lys %in% names(tmp))], function(x) {
#       dat <- dplyr::bind_rows(lapply(tmp[[x]]$data, as_data_frame))
#      ftimes <- c("time", "sunriseTime", "sunsetTime", "temperatureMinTime", 
#          "temperatureMaxTime", "apparentTemperatureMinTime", "apparentTemperatureMaxTime", 
#          "precipIntensityMaxTime")
#      ly <- dplyr::mutate_at(dat, .funs = funs(convert_time), .vars = ftimes[which(ftimes %in% 
#          colnames(dat))])
#  })
# 1: get_current_forecast(37.8267, -122.423)

sessionInfo()
# R version 3.3.3 (2017-03-06)
# Platform: x86_64-pc-linux-gnu (64-bit)
# Running under: Debian GNU/Linux 9 (stretch)
# 
# locale:
# [1] LC_CTYPE=de_AT.utf8       LC_NUMERIC=C             
# [3] LC_TIME=de_AT.utf8        LC_COLLATE=de_AT.utf8    
# [5] LC_MONETARY=de_AT.utf8    LC_MESSAGES=de_AT.utf8   
# [7] LC_PAPER=de_AT.utf8       LC_NAME=C                
# [9] LC_ADDRESS=C              LC_TELEPHONE=C           
# [11] LC_MEASUREMENT=de_AT.utf8 LC_IDENTIFICATION=C      
# 
# attached base packages:
# [1] stats     graphics  grDevices utils     datasets  methods   base     
# 
# other attached packages:
# [1] ggplot2_2.2.1   purrr_0.2.2.2   devtools_1.12.0 httr_1.2.1     
# [5] darksky_1.2.0  
# 
# loaded via a namespace (and not attached):
# [1] Rcpp_0.12.11     withr_1.0.2      digest_0.6.12    dplyr_0.5.0     
# [5] assertthat_0.2.0 grid_3.3.3       R6_2.2.1         plyr_1.8.4      
# [9] jsonlite_1.5     gtable_0.2.0     DBI_0.6-1        magrittr_1.5    
# [13] scales_0.4.1     rlang_0.1.1      curl_2.4         lazyeval_0.2.0  
# [17] tools_3.3.3      munsell_0.4.3    colorspace_1.3-2 memoise_1.0.0   
# [21] gridExtra_2.2.1  tibble_1.3.3

Maybe it's due to an old dplyr Version?

@hrbrmstr hrbrmstr self-assigned this Sep 5, 2017
@hrbrmstr
Copy link
Owner

hrbrmstr commented Sep 5, 2017

Thx for trying to take the package for a spin and also for taking time to file an issue!

I shld be able to replicate your environment and give it a test. I should be able to make it work on older installs, too. I've been thinking abt removing the dplyr innards and just having it be base R, so this cld be gd incentive.

@nachti
Copy link
Author

nachti commented Sep 5, 2017

Thanks for your fast response and for writing the package!

@hrbrmstr
Copy link
Owner

hrbrmstr commented Sep 5, 2017

give the most recent dev push (1.3.0) a go when you get a chance. dplyr dependency is gone.

@nachti
Copy link
Author

nachti commented Sep 6, 2017

Thank you for fixing it very quickly!
dplyr >= 0.7.0 dependency would have been fine as first step. It's now working for me after some proxy issues.

@yacobbeletse
Copy link

thanks for such a wonderful package!
my darksky_api_key and get_current_forecast() works fine when i run it locally (in my Rstudio server. ).
However, my shiny app can't run from a web page/host.
any help would be appreciated!

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

No branches or pull requests

3 participants