From fa6c80fc12195ca2330fc2f0dc0d72eb17225816 Mon Sep 17 00:00:00 2001 From: huizezhang-sherry Date: Fri, 16 Jun 2023 13:15:52 +1000 Subject: [PATCH] misc small fixes --- R/as_cubble.R | 14 ++++++++------ inst/WORDLIST | 9 +++++++++ man/as_cubble.Rd | 14 ++++++++------ vignettes/cb5match.Rmd | 2 +- 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/R/as_cubble.R b/R/as_cubble.R index 72978551..a43fcf45 100644 --- a/R/as_cubble.R +++ b/R/as_cubble.R @@ -28,15 +28,17 @@ #' path <- system.file("ncdf/era5-pressure.nc", package = "cubble") #' raw <- ncdf4::nc_open(path) #' dt <- as_cubble(raw) -#' # read at every degree +#' # subset degree #' dt <- as_cubble(raw,vars = c("q", "z"), -#' long_range = seq(113, 153, 1), -#' lat_range = seq(-53, -12, 1)) +#' long_range = seq(113, 153, 3), +#' lat_range = seq(-53, -12, 3)) #' -#' # stars -#' tif = system.file("tif/L7_ETMs.tif", package = "stars") -#' x = stars::read_stars(tif) +#'\dontrun{ +#'# stars - take a few seconds to run +#' tif <- system.file("tif/L7_ETMs.tif", package = "stars") +#' x <- stars::read_stars(tif) #' x %>% as_cubble() +#'} #' #' # don't have to supply coords if create from a sftime #' dt <- climate_flat %>% diff --git a/inst/WORDLIST b/inst/WORDLIST index 9f40b5ea..a26ac6ed 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -71,3 +71,12 @@ visualise visualising www yearquarter +GHCND +customise +densify +easting +imageries +northing +spacetime +specialised +unprojected diff --git a/man/as_cubble.Rd b/man/as_cubble.Rd index 6ac8c5af..2aac8474 100644 --- a/man/as_cubble.Rd +++ b/man/as_cubble.Rd @@ -69,15 +69,17 @@ dt \%>\% as_cubble(coords = c(long, lat)) path <- system.file("ncdf/era5-pressure.nc", package = "cubble") raw <- ncdf4::nc_open(path) dt <- as_cubble(raw) -# read at every degree +# subset degree dt <- as_cubble(raw,vars = c("q", "z"), - long_range = seq(113, 153, 1), - lat_range = seq(-53, -12, 1)) + long_range = seq(113, 153, 3), + lat_range = seq(-53, -12, 3)) -# stars -tif = system.file("tif/L7_ETMs.tif", package = "stars") -x = stars::read_stars(tif) +\dontrun{ +# stars - take a few seconds to run +tif <- system.file("tif/L7_ETMs.tif", package = "stars") +x <- stars::read_stars(tif) x \%>\% as_cubble() +} # don't have to supply coords if create from a sftime dt <- climate_flat \%>\% diff --git a/vignettes/cb5match.Rmd b/vignettes/cb5match.Rmd index facd0382..5aa66395 100644 --- a/vignettes/cb5match.Rmd +++ b/vignettes/cb5match.Rmd @@ -104,7 +104,7 @@ res_tm <- res_sp %>% (res_tm <- res_tm %>% bind_rows() %>% filter(group %in% c(1, 7, 6, 9))) ``` -And then we can visialise them in space or across time: +And then we can visualise them in space or across time: ```{r echo = FALSE} res_tm_long <- res_tm %>%