Skip to content

Commit

Permalink
revert back to roxygen 6.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Nov 20, 2019
1 parent 93e0d75 commit 8b77e66
Show file tree
Hide file tree
Showing 37 changed files with 249 additions and 471 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Imports:
geonames,
hoardr (>= 0.5.2)
Suggests:
roxygen2 (>= 7.0.0),
roxygen2 (>= 6.1.1),
testthat,
knitr,
taxize,
Expand All @@ -61,7 +61,7 @@ Suggests:
ggmap,
ropenaq,
vcr (>= 0.2.2)
RoxygenNote: 7.0.0
RoxygenNote: 6.1.1
X-schema.org-applicationCategory: Climate
X-schema.org-keywords: earth, science, climate, precipitation, temperature, storm, buoy, NCDC, NOAA, tornadoe, sea ice, ISD
X-schema.org-isPartOf: https://ropensci.org
12 changes: 9 additions & 3 deletions R/buoy.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,19 @@
#'
#' @references <http://www.ndbc.noaa.gov/>, <http://dods.ndbc.noaa.gov/>
#' @examples \dontrun{
#' if (crul::ok("https://dods.ndbc.noaa.gov/thredds", timeout_ms = 1000)) {
#'
#' # Get buoy station information
#' x <- buoy_stations()
#' # refresh stations as needed, takes a while to run
#' # you shouldn't need to update very often
#' # x <- buoy_stations(refresh = TRUE)
#' if (interactive() && requireNamespace("leaflet")){
#' library("leaflet")
#' leaflet(data = na.omit(x)) %>%
#' leaflet::addTiles() %>%
#' leaflet::addCircles(~lon, ~lat, opacity = 0.5)
#' z <- leaflet(data = na.omit(x))
#' z <- leaflet::addTiles(z)
#' leaflet::addCircles(z, ~lon, ~lat, opacity = 0.5)
#' }
#'
#' # Get available buoys
#' buoys(dataset = 'cwind')
Expand All @@ -76,6 +80,8 @@
#' buoy(dataset = "stdmet", buoyid = "VCAF1")
#' buoy(dataset = "stdmet", buoyid = "wplf1")
#' buoy(dataset = "dart", buoyid = "dartu")
#'
#' }
#' }
buoy <- function(dataset, buoyid, year = NULL, datatype = NULL, ...) {
check4pkg("ncdf4")
Expand Down
3 changes: 1 addition & 2 deletions R/ghcnd.R
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,7 @@ ghcnd_search <- function(stationid, date_min = NULL, date_max = NULL,
#' ## using dplyr
#' library("dplyr")
#' dat <- ghcnd(stationid = "AGE00147704")
#' dat %>%
#' filter(element == "PRCP", year == 1909)
#' filter(dat, element == "PRCP", year == 1909)
#'
#' # refresh the cached file
#' ghcnd(stationid = "AGE00147704", refresh = TRUE)
Expand Down
1 change: 0 additions & 1 deletion R/homr.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
#'
#' @examples \dontrun{
#' homr(qid = 'COOP:046742')
#' homr(headersOnly=TRUE, qid='TRANS:')
#' homr(qid = ':046742')
#' homr(qidMod='starts', qid='COOP:0467')
#' homr(headersOnly=TRUE, state='DE')
Expand Down
42 changes: 22 additions & 20 deletions R/isd.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,45 +94,47 @@
#' addCircles()
#'
#' # Get data
#' (res <- isd(usaf="011490", wban="99999", year=1986))
#' (res <- isd(usaf="011690", wban="99999", year=1993))
#' (res <- isd(usaf="109711", wban=99999, year=1970))
#' (res <- isd(usaf='011490', wban='99999', year=1986))
#' (res <- isd(usaf='011690', wban='99999', year=1993))
#' (res <- isd(usaf='109711', wban=99999, year=1970))
#'
#' # "additional" and "remarks" data sections included by default
#' # can toggle that parameter to not include those in output, saves time
#' (res1 <- isd(usaf="011490", wban="99999", year=1986, force = TRUE))
#' (res2 <- isd(usaf="011490", wban="99999", year=1986, force = TRUE,
#' (res1 <- isd(usaf='011490', wban='99999', year=1986, force = TRUE))
#' (res2 <- isd(usaf='011490', wban='99999', year=1986, force = TRUE,
#' additional = FALSE))
#'
#' # The first time a dataset is requested takes longer
#' system.time( isd(usaf="782680", wban="99999", year=2011) )
#' system.time( isd(usaf="782680", wban="99999", year=2011) )
#' system.time( isd(usaf='782680', wban='99999', year=2011) )
#' system.time( isd(usaf='782680', wban='99999', year=2011) )
#'
#' # Plot data
#' ## get data for multiple stations
#' res1 <- isd(usaf="011690", wban="99999", year=1993)
#' res2 <- isd(usaf="782680", wban="99999", year=2011)
#' res3 <- isd(usaf="008415", wban="99999", year=2016)
#' res4 <- isd(usaf="109711", wban=99999, year=1970)
#' res1 <- isd(usaf='011690', wban='99999', year=1993)
#' res2 <- isd(usaf='782680', wban='99999', year=2011)
#' res3 <- isd(usaf='008415', wban='99999', year=2016)
#' res4 <- isd(usaf='109711', wban=99999, year=1970)
#' ## combine data
#' library(dplyr)
#' res_all <- bind_rows(res1, res2, res3, res4)
#' # add date time
#' library("lubridate")
#' res_all$date_time <- ymd_hm(
#' sprintf("%s %s", as.character(res_all$date), res_all$time)
#' )
#' dd <- sprintf('%s %s', as.character(res_all$date), res_all$time)
#' res_all$date_time <- ymd_hm(dd)
#' ## remove 999's
#' res_all <- res_all %>% filter(temperature < 900)
#' res_all <- filter(res_all, temperature < 900)
#'
#' ## plot
#' library("ggplot2")
#' ggplot(res_all, aes(date_time, temperature)) +
#' geom_line() +
#' facet_wrap(~usaf_station, scales = "free_x")
#' if (interactive()) {
#' library(ggplot2)
#' ggplot(res_all, aes(date_time, temperature)) +
#' geom_line() +
#' facet_wrap(~usaf_station, scales = 'free_x')
#' }
#'
#' # print progress
#' ## note: if the file is already on your system, you'll see no progress bar
#' (res <- isd(usaf="011690", wban="99999", year=1993, progress=TRUE))
#' (res <- isd(usaf='011690', wban='99999', year=1993, progress=TRUE))
#'
#' # parallelize processing
#' # (res <- isd(usaf=172007, wban=99999, year=2016, parallel=TRUE))
Expand Down
34 changes: 7 additions & 27 deletions man/argo.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions man/buoy.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 3 additions & 11 deletions man/coops.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions man/ghcnd.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions man/ghcnd_search.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions man/ghcnd_stations.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 6 additions & 21 deletions man/homr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8b77e66

Please sign in to comment.