Skip to content

Commit 8b77e66

Browse files
committed
revert back to roxygen 6.1.1
1 parent 93e0d75 commit 8b77e66

37 files changed

+249
-471
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Imports:
4747
geonames,
4848
hoardr (>= 0.5.2)
4949
Suggests:
50-
roxygen2 (>= 7.0.0),
50+
roxygen2 (>= 6.1.1),
5151
testthat,
5252
knitr,
5353
taxize,
@@ -61,7 +61,7 @@ Suggests:
6161
ggmap,
6262
ropenaq,
6363
vcr (>= 0.2.2)
64-
RoxygenNote: 7.0.0
64+
RoxygenNote: 6.1.1
6565
X-schema.org-applicationCategory: Climate
6666
X-schema.org-keywords: earth, science, climate, precipitation, temperature, storm, buoy, NCDC, NOAA, tornadoe, sea ice, ISD
6767
X-schema.org-isPartOf: https://ropensci.org

R/buoy.R

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,19 @@
4242
#'
4343
#' @references <http://www.ndbc.noaa.gov/>, <http://dods.ndbc.noaa.gov/>
4444
#' @examples \dontrun{
45+
#' if (crul::ok("https://dods.ndbc.noaa.gov/thredds", timeout_ms = 1000)) {
46+
#'
4547
#' # Get buoy station information
4648
#' x <- buoy_stations()
4749
#' # refresh stations as needed, takes a while to run
4850
#' # you shouldn't need to update very often
4951
#' # x <- buoy_stations(refresh = TRUE)
52+
#' if (interactive() && requireNamespace("leaflet")){
5053
#' library("leaflet")
51-
#' leaflet(data = na.omit(x)) %>%
52-
#' leaflet::addTiles() %>%
53-
#' leaflet::addCircles(~lon, ~lat, opacity = 0.5)
54+
#' z <- leaflet(data = na.omit(x))
55+
#' z <- leaflet::addTiles(z)
56+
#' leaflet::addCircles(z, ~lon, ~lat, opacity = 0.5)
57+
#' }
5458
#'
5559
#' # Get available buoys
5660
#' buoys(dataset = 'cwind')
@@ -76,6 +80,8 @@
7680
#' buoy(dataset = "stdmet", buoyid = "VCAF1")
7781
#' buoy(dataset = "stdmet", buoyid = "wplf1")
7882
#' buoy(dataset = "dart", buoyid = "dartu")
83+
#'
84+
#' }
7985
#' }
8086
buoy <- function(dataset, buoyid, year = NULL, datatype = NULL, ...) {
8187
check4pkg("ncdf4")

R/ghcnd.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ ghcnd_search <- function(stationid, date_min = NULL, date_max = NULL,
195195
#' ## using dplyr
196196
#' library("dplyr")
197197
#' dat <- ghcnd(stationid = "AGE00147704")
198-
#' dat %>%
199-
#' filter(element == "PRCP", year == 1909)
198+
#' filter(dat, element == "PRCP", year == 1909)
200199
#'
201200
#' # refresh the cached file
202201
#' ghcnd(stationid = "AGE00147704", refresh = TRUE)

R/homr.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
#'
5656
#' @examples \dontrun{
5757
#' homr(qid = 'COOP:046742')
58-
#' homr(headersOnly=TRUE, qid='TRANS:')
5958
#' homr(qid = ':046742')
6059
#' homr(qidMod='starts', qid='COOP:0467')
6160
#' homr(headersOnly=TRUE, state='DE')

R/isd.R

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -94,45 +94,47 @@
9494
#' addCircles()
9595
#'
9696
#' # Get data
97-
#' (res <- isd(usaf="011490", wban="99999", year=1986))
98-
#' (res <- isd(usaf="011690", wban="99999", year=1993))
99-
#' (res <- isd(usaf="109711", wban=99999, year=1970))
97+
#' (res <- isd(usaf='011490', wban='99999', year=1986))
98+
#' (res <- isd(usaf='011690', wban='99999', year=1993))
99+
#' (res <- isd(usaf='109711', wban=99999, year=1970))
100100
#'
101101
#' # "additional" and "remarks" data sections included by default
102102
#' # can toggle that parameter to not include those in output, saves time
103-
#' (res1 <- isd(usaf="011490", wban="99999", year=1986, force = TRUE))
104-
#' (res2 <- isd(usaf="011490", wban="99999", year=1986, force = TRUE,
103+
#' (res1 <- isd(usaf='011490', wban='99999', year=1986, force = TRUE))
104+
#' (res2 <- isd(usaf='011490', wban='99999', year=1986, force = TRUE,
105105
#' additional = FALSE))
106106
#'
107107
#' # The first time a dataset is requested takes longer
108-
#' system.time( isd(usaf="782680", wban="99999", year=2011) )
109-
#' system.time( isd(usaf="782680", wban="99999", year=2011) )
108+
#' system.time( isd(usaf='782680', wban='99999', year=2011) )
109+
#' system.time( isd(usaf='782680', wban='99999', year=2011) )
110110
#'
111111
#' # Plot data
112112
#' ## get data for multiple stations
113-
#' res1 <- isd(usaf="011690", wban="99999", year=1993)
114-
#' res2 <- isd(usaf="782680", wban="99999", year=2011)
115-
#' res3 <- isd(usaf="008415", wban="99999", year=2016)
116-
#' res4 <- isd(usaf="109711", wban=99999, year=1970)
113+
#' res1 <- isd(usaf='011690', wban='99999', year=1993)
114+
#' res2 <- isd(usaf='782680', wban='99999', year=2011)
115+
#' res3 <- isd(usaf='008415', wban='99999', year=2016)
116+
#' res4 <- isd(usaf='109711', wban=99999, year=1970)
117117
#' ## combine data
118118
#' library(dplyr)
119119
#' res_all <- bind_rows(res1, res2, res3, res4)
120120
#' # add date time
121121
#' library("lubridate")
122-
#' res_all$date_time <- ymd_hm(
123-
#' sprintf("%s %s", as.character(res_all$date), res_all$time)
124-
#' )
122+
#' dd <- sprintf('%s %s', as.character(res_all$date), res_all$time)
123+
#' res_all$date_time <- ymd_hm(dd)
125124
#' ## remove 999's
126-
#' res_all <- res_all %>% filter(temperature < 900)
125+
#' res_all <- filter(res_all, temperature < 900)
126+
#'
127127
#' ## plot
128-
#' library("ggplot2")
129-
#' ggplot(res_all, aes(date_time, temperature)) +
130-
#' geom_line() +
131-
#' facet_wrap(~usaf_station, scales = "free_x")
128+
#' if (interactive()) {
129+
#' library(ggplot2)
130+
#' ggplot(res_all, aes(date_time, temperature)) +
131+
#' geom_line() +
132+
#' facet_wrap(~usaf_station, scales = 'free_x')
133+
#' }
132134
#'
133135
#' # print progress
134136
#' ## note: if the file is already on your system, you'll see no progress bar
135-
#' (res <- isd(usaf="011690", wban="99999", year=1993, progress=TRUE))
137+
#' (res <- isd(usaf='011690', wban='99999', year=1993, progress=TRUE))
136138
#'
137139
#' # parallelize processing
138140
#' # (res <- isd(usaf=172007, wban=99999, year=2016, parallel=TRUE))

man/argo.Rd

Lines changed: 7 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/buoy.Rd

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/coops.Rd

Lines changed: 3 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/ghcnd.Rd

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/ghcnd_search.Rd

Lines changed: 2 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)