Skip to content

Commit

Permalink
spell checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dramanica committed Nov 29, 2022
1 parent 47ce90e commit 0d2552e
Show file tree
Hide file tree
Showing 22 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master, terra_41]
branches: [main, master, cran_changes]
pull_request:
branches: [main, master]

Expand Down
2 changes: 1 addition & 1 deletion R/download_dataset.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Download palaeoclimatereconstructions.
#' Download palaeoclimate reconstructions.
#'
#' This function downloads palaeoclimate reconstructions. Files will be stored
#' in the data path of `pastclim`, which can be inspected with
Expand Down
2 changes: 1 addition & 1 deletion R/get_data_path.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#'
#' The path is stored in an option for `pastclim` named `data_path`. If
#' a configuration file was saved when using \code{set_data_path}, the path
#' is retrived from a file named "pastclim_data.txt", which
#' is retrieved from a file named "pastclim_data.txt", which
#' is found in the directory returned by
#' `tools::R_user_dir("pastclim","config")` (i.e.
#' the default configuration directory for the package as set in R >= 4.0).
Expand Down
4 changes: 2 additions & 2 deletions R/get_downloaded_datasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' List the downloaded variable for each dataset.
#'
#' @param data_path leave it to NULL to use the default datapath
#' @param data_path leave it to NULL to use the default data_path
#' @returns a list of variable names per dataset.
#'
#' @export
Expand All @@ -22,4 +22,4 @@ get_downloaded_datasets <- function(data_path = NULL) {
]
}
downloaded_vars
}
}
2 changes: 1 addition & 1 deletion R/get_ice_mask.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Get the ice mask for a dataset.
#'
#' Get the ice mask for a dataset at a given timepoint.
#' Get the ice mask for a dataset at a given time point.
#'
#' @param time_bp time slice in years before present (negative)
#' @param dataset string defining dataset to be downloaded (a list of possible
Expand Down
2 changes: 1 addition & 1 deletion R/get_land_mask.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Get the land mask for a dataset.
#'
#' Get the land mask for a dataset at a given timepoint.
#' Get the land mask for a dataset at a given time point.
#'
#' @param time_bp time slice in years before present (negative)
#' @param dataset string defining dataset to be downloaded (a list of possible
Expand Down
4 changes: 2 additions & 2 deletions R/is_region_series.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#' Check the object is a valid region series
#'
#' A region series is a \code{terra::SpatRasterDataset} for which each
#' subdataset is a variable, and all variables have the same number of
#' sub-dataset is a variable, and all variables have the same number of
#' time steps.
#'
#' The standard test only checks that each SpatRaster has the same number of
#' layers. The more thorough test (obtainedwith strict=TRUE) actually checks
#' layers. The more thorough test (obtained with strict=TRUE) actually checks
#' that all time steps are identical by comparing the result of
#' \code{terra::time} applied to each variable
#'
Expand Down
4 changes: 2 additions & 2 deletions R/location_series.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#' @param path_to_nc the path to the custom nc file containing the palaeoclimate
#' reconstructions. All the variables of interest need to be included in
#' this file.
#' @returns a data.frame with teh climatic variables of interest
#' @returns a data.frame with the climatic variables of interest
#' @export

location_series <-
Expand Down Expand Up @@ -111,7 +111,7 @@ location_series <-
#' Deprecated version of \code{location_series}
#'
#' @param ... arguments to be passed to \code{series}
#' @returns a data.frame with teh climatic variables of interest
#' @returns a data.frame with the climatic variables of interest
#'
#' @export

Expand Down
2 changes: 1 addition & 1 deletion R/location_slice.R
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ location_slice <-
#' Deprecated version of \code{location_slice}
#'
#' @param ... arguments to be passed to \code{location_slice}
#' @returns a data.frame with teh climatic variables of interest
#' @returns a data.frame with the climatic variables of interest
#'
#' @export

Expand Down
2 changes: 1 addition & 1 deletion R/sample_region_slice.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Sample points from a region time slice
#'
#' This function samples points from a region time slice (i.e. a timepoint).
#' This function samples points from a region time slice (i.e. a time point).
#'
#' This function wraps \code{terra::spatSample} to appropriate sample the
#' \code{terra::SpatRaster} returned
Expand Down
2 changes: 1 addition & 1 deletion man/climate_for_locations.Rd

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

2 changes: 1 addition & 1 deletion man/download_dataset.Rd

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

2 changes: 1 addition & 1 deletion man/get_data_path.Rd

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

2 changes: 1 addition & 1 deletion man/get_downloaded_datasets.Rd

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

2 changes: 1 addition & 1 deletion man/get_ice_mask.Rd

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

2 changes: 1 addition & 1 deletion man/get_land_mask.Rd

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

4 changes: 2 additions & 2 deletions man/is_region_series.Rd

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

2 changes: 1 addition & 1 deletion man/location_series.Rd

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

2 changes: 1 addition & 1 deletion man/sample_region_slice.Rd

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

2 changes: 1 addition & 1 deletion man/time_series_for_locations.Rd

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

2 changes: 1 addition & 1 deletion vignettes/a0_pastclim_overview.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ knitr::opts_chunk$set(

# Install the library

You will need to install the library from Github. For this step, you will need to
You will need to install the library from GitHub. For this step, you will need to
use `devtools` (if you haven't done so already, install it from CRAN with `install.packages("devtools")`.
Once you have `devtools`, simply use:
```{r install, eval=FALSE}
Expand Down
8 changes: 4 additions & 4 deletions vignettes/a2_custom_datasets.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This guide is aimed at formatting data in such a way that they can be used with

## An example: the Trace21k-CHELSEA

Here we provide a simple example of how to format such a dataset in R. We will use a version of the Trace21k dataset, downscaled to 30 arcsecs using the CHELSEA algorithm(available from [this website](https://chelsa-climate.org/chelsa-trace21k/)). The data are stored as geoTIFF files, one file per timestep per variable. First, we need to collate all the files for a given variable (we will use *bio01* as an example) within a single `netcdf` file. As the original files are large, we will illustrate here how do to that for only a few timesteps which were aggregated to 3x3 degrees to keep files sizes small.
Here we provide a simple example of how to format such a dataset in R. We will use a version of the Trace21k dataset, downscaled to 30 arcsecs using the CHELSEA algorithm(available from [this website](https://chelsa-climate.org/chelsa-trace21k/)). The data are stored as geoTIFF files, one file per time step per variable. First, we need to collate all the files for a given variable (we will use *bio01* as an example) within a single `netcdf` file. As the original files are large, we will illustrate here how do to that for only a few time steps which were aggregated to 3x3 degrees to keep files sizes small.

We start by translating each geoTIFF into a `netcdf` file. The files have the prefix *CHELSA_TraCE21k_bio01_-**xxx**_V1.0.small.tif*, where **xxx** is the number of the time step.
We will only use 3 time step for illustrative purposes.
Expand All @@ -35,7 +35,7 @@ list_of_tiffs <- file.path(tiffs_path,dir(tiffs_path))
bio01 <- terra::rast(list_of_tiffs)
```

Now we need to set the time axis of the raster (in this case, reconstructions are every 100 years), and generate some userfriendly names to layers in the raster:
Now we need to set the time axis of the raster (in this case, reconstructions are every 100 years), and generate some user friendly names to layers in the raster:

```{r}
terra::time(bio01)<-c(0,-100,-200)
Expand Down Expand Up @@ -100,8 +100,8 @@ climate_100<-slice_region_series(custom_series, time_bp = -100)
terra::plot(climate_100)
```

Note that these reconstructions include the ocean and the icesheets, and it would
be much better to remove them as they are not needed for most ecological/archaological studies (and
Note that these reconstructions include the ocean and the ice sheets, and it would
be much better to remove them as they are not needed for most ecological/archaeological studies (and
it allows for smaller files).

# Making the data available to others
Expand Down

0 comments on commit 0d2552e

Please sign in to comment.