cortinah / hockeystick

Download and Visualize Essential Global Heating Data in R
https://cortinah.github.io/hockeystick/
Other
49 stars 4 forks source link

plot_carbon crashes RStudio #10

Closed carbonmetrics closed 3 years ago

carbonmetrics commented 3 years ago
library(hockeystick)
a=get_carbon()
plot_carbon(a)

Crashes RStudio immediately.

> infoSession()
Error in infoSession() : could not find function "infoSession"
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] hockeystick_0.6.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.6       xml2_1.3.2       magrittr_2.0.1   hms_1.1.0        tidyselect_1.1.1 rvest_1.0.0      munsell_0.5.0   
 [8] colorspace_2.0-2 R6_2.5.0         rlang_0.4.11     fansi_0.5.0      httr_1.4.2       dplyr_1.0.7      patchwork_1.1.1 
[15] tools_4.1.0      grid_4.1.0       gtable_0.3.0     utf8_1.2.1       ellipsis_0.3.2   tibble_3.1.2     lifecycle_1.0.0 
[22] crayon_1.4.1     tidyr_1.1.3      readr_1.4.0      purrr_0.3.4      ggplot2_3.3.5    vctrs_0.3.8      glue_1.4.2      
[29] compiler_4.1.0   pillar_1.6.1     generics_0.1.0   scales_1.1.1     lubridate_1.7.10 pkgconfig_2.0.3 
cortinah commented 3 years ago

Thank you very much. I am unable to reproduce this issue, unfortunately. What was the output of get_carbon()? can you take a look at the "a" data frame? is the data there? You can also try installing from CRAN and see what happens.

thanks

library(hockeystick) hockeystick: Use hockeystick_cache_details() to view cached climate data. hockeystick: Use hockeystick_update_all() to update and cache all climate data. a=get_carbon() trying URL 'ftp://aftp.cmdl.noaa.gov/products/trends/co2/co2_mm_mlo.txt' Content type 'unknown' length 55937 bytes (54 KB)

plot_carbon(a) sessionInfo() R version 4.0.3 (2020-10-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.2 LTS

Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3 LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3

locale: [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
[4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8
[7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] hockeystick_0.6.0 devtools_2.4.2 usethis_2.0.1

carbonmetrics commented 3 years ago

Thanks! I found the issue: There was a bug in RStudio which made ggplot crash. Upgrading RStudio (1.4.1717) solved the problem.

cortinah commented 3 years ago

Glad to hear that! thank you for opening the issue.