Closed kjschaudt closed 5 years ago
edited your post to show the code
@kjschaudt reinstall remotes::install_github("ropensci/rnoaa")
, restart your R session, then try again.
now it should not error, and instead of a data.frame in the output data
slot of the list you'll get an empty data.frame, but the meta
slot will have an ncdf4 object which you can parse yourself. There's just too many possible variables and dimensions for us to have parsing for all of them
let me know if it works
Thanks. Using the version from GitHub, buoy now grabs the specified files. Thanks for the letting me know about the meta slot. Might have missed the fact that the object was stored there. I have little experience with ncdf4 objects. Are there any R toolkits that you might suggest?
you might try https://github.com/hypertidy/tidync - under review at ropensci right now in fact. i'd been thinking of using it here in this pkg, but its not on CRAN yet
Thanks again. At the moment, it appears tidying does not like "buoy" class objects. Will play with this. If I come up with something simple, I'll pass it along.
try:
library(rnoaa)
library(tidync)
x = buoy(dataset='adcp2', buoyid=42363)
tidync(x$meta$filename)
That looks more hopeful.
Session Info
```r > library('reprex') > sessionInfo() R version 3.5.2 (2018-12-20) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.6 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] rnoaa_0.8.4 reprex_0.2.1 loaded via a namespace (and not attached): [1] Rcpp_1.0.0 pillar_1.3.1 compiler_3.5.2 plyr_1.8.4 bindr_0.1.1 tools_3.5.2 [7] digest_0.6.18 evaluate_0.13 jsonlite_1.6 lubridate_1.7.4 tibble_2.0.1 gtable_0.3.0 [13] pkgconfig_2.0.2 rlang_0.3.1 rstudioapi_0.10 crul_0.7.0 curl_3.3 yaml_2.2.0 [19] xfun_0.5 bindrcpp_0.2.2 gridExtra_2.3 knitr_1.22 xml2_1.2.0 dplyr_0.7.8 [25] stringr_1.4.0 rappdirs_0.3.1 fs_1.2.7 triebeard_0.3.0 grid_3.5.2 tidyselect_0.2.5 [31] glue_1.3.0 httpcode_0.2.0 R6_2.3.0 XML_3.98-1.19 rmarkdown_1.12 hoardr_0.5.2 [37] tidyr_0.8.3 ggplot2_3.1.0 purrr_0.3.0 magrittr_1.5 htmltools_0.3.6 urltools_1.7.2 [43] scales_1.0.0 assertthat_0.2.0 colorspace_1.4-1 stringi_1.4.3 lazyeval_0.2.2 munsell_0.5.0 [49] crayon_1.3.4 ```