Skip to content

Commit

Permalink
spell checking
Browse files Browse the repository at this point in the history
  • Loading branch information
MalditoBarbudo committed Nov 19, 2021
1 parent 307f3af commit f329485
Show file tree
Hide file tree
Showing 29 changed files with 96 additions and 96 deletions.
8 changes: 4 additions & 4 deletions R/getters.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ read_sfn_data <- function(site_codes, folder = '.') {
#' @param folder Route to the folder containing the data. Default to working
#' directory
#'
#' @param .dry Dry run. Metadata is loaded and readed, but no cache is written
#' @param .dry Dry run. Metadata is loaded and read, but no cache is written
#'
#' @examples
#' # Let's access the data in "folder". This typically is the folder where the
Expand Down Expand Up @@ -213,12 +213,12 @@ read_sfn_metadata <- function(folder = '.', .write_cache = FALSE) {
#'
#' \code{filter_sites_by_md} function takes logical expressions for the metadata
#' variables (i.e. \code{pl_sens_meth == 'HR'}), and list the sites that met
#' the criteria from thos supplied
#' the criteria from those supplied
#'
#' \code{.join} argument indicates how sites must be filtered between metadata
#' classes. \code{'and'} indicates only sites meeting all conditions for all
#' metadata classes are returned. \code{'or'} indicates all sites meeting any
#' condition between classes are returned. For two or more filtes of the same
#' condition between classes are returned. For two or more filters of the same
#' metadata class, they are combined as 'and'.
#'
#' @param sites character vector with the sites codes to filter, generally the
Expand Down Expand Up @@ -272,7 +272,7 @@ read_sfn_metadata <- function(folder = '.', .write_cache = FALSE) {
#' .join = 'or'
#' )
#'
#' @return A character vector with the sites fullfilling the premises
#' @return A character vector with the sites fulfilling the premises
#'
#' @export

Expand Down
12 changes: 6 additions & 6 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#'
#' This helper function calculates the coverage percentage in a vector, and is
#' designed to be used inside a dplyr summarise statement. It calculates the
#' coverage as the percentage of no NAs in the expected lenght of the summarising
#' coverage as the percentage of no NAs in the expected length of the summarising
#' period stated by the timestep.
#'
#' @param x a vector, usually a variable in the sapflow or environmental data.
Expand Down Expand Up @@ -157,7 +157,7 @@ min_time <- function(x, time) {
#'
#' The code for this function has been kindly provided by Jacob Nelson in python
#' (see https://github.com/jnelson18/FluxnetTools/blob/master/FileS3.py) and has
#' been translated to a tidy data phylosophy in R to be used inside a
#' been translated to a tidy data philosophy in R to be used inside a
#' \code{\link[dplyr]{summarise}} statement.
#'
#' @section Diurnal centroid algorithm:
Expand Down Expand Up @@ -226,7 +226,7 @@ diurnal_centroid <- function(variable) {
#'
#' The code for this function has been kindly provided by Jacob Nelson in python
#' (see https://github.com/jnelson18/FluxnetTools/blob/master/FileS3.py) and has
#' been translated to a tidy data phylosophy in R to be used inside a
#' been translated to a tidy data philosophy in R to be used inside a
#' \code{\link[dplyr]{summarise}} statement.
#'
#' @section Normalized diurnal centroid algorithm:
Expand Down Expand Up @@ -291,7 +291,7 @@ norm_diurnal_centroid <- function(sapf_var, rad_var) {

#' Timezones dictionary
#'
#' Tranforms timezone ISO code to character vector compatible with lubridate and
#' Transforms timezone ISO code to character vector compatible with lubridate and
#' POSIXct
#'
#' GMT time zones are used, as they are day saving light time (DST) agnostic,
Expand Down Expand Up @@ -1302,7 +1302,7 @@ describe_md_variable <- function(variable) {
#'
#' sum for summarise_all aware of POSIX objects
#'
#' @param variable the variable as it is pased to the .fixed_metrics function
#' @param variable the variable as it is passed to the .fixed_metrics function
#' @param na.rm logical to pass to na.rm argument from sum
#'
#' @examples
Expand All @@ -1320,4 +1320,4 @@ describe_md_variable <- function(variable) {
}

return(res)
}
}
12 changes: 6 additions & 6 deletions R/metrics.R
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ sfn_metrics <- function(
# progress to not scare seeming like freezed in large datasets
print(paste0('Nighttime data for ', get_si_code(sfn_data)))

# period_minutes modification especific for night intervals calculations
# period_minutes modification specific for night intervals calculations
new_period_minutes <- lubridate::as.duration(
lubridate::hours(24 - (int_start - int_end))
)@.Data / 60
Expand Down Expand Up @@ -442,7 +442,7 @@ sfn_metrics <- function(
# progress to not scare seeming like freezed
print(paste0(interval, ' data for ', get_si_code(sfn_data)))

# period_minutes modification especific for daytime intervals calculations
# period_minutes modification specific for daytime intervals calculations
new_period_minutes <- lubridate::as.duration(
lubridate::hours(int_end - int_start)
)@.Data / 60
Expand Down Expand Up @@ -524,7 +524,7 @@ sfn_metrics <- function(
#' \item{mean: Mean value for the selected period}
#' \item{sd: Standard deviation for the selected period}
#' \item{coverage: Percentage of coverage as the percentage of no NAs in the
#' expected legth of the period, stated by the site timestep}
#' expected length of the period, stated by the site timestep}
#' \item{q*: q95 by default. Quantile value for the selected period. Quantiles to
#' calculate are stated in the probs argument}
#' \item{accumulated: Accumulated value on the selected period}
Expand Down Expand Up @@ -598,7 +598,7 @@ sfn_metrics <- function(
#' \itemize{
#' \item{mean: mean of variable (tree or environmental variable) for the
#' given period. NAs are removed}
#' \item{sd: standard deviation of the variable for the givn period. NAs are
#' \item{sd: standard deviation of the variable for the given period. NAs are
#' removed}
#' \item{coverage: Data coverage percentage (percentage of measures without
#' NAs)}
Expand Down Expand Up @@ -1213,7 +1213,7 @@ metrics_tidyfier <- function(
dplyr::filter(.data$si_code %in% sites_codes)


# we start modifing the sapflow data
# we start modifying the sapflow data
whole_data <- sapf_data %>%
purrr::map(.sapflow_tidy) %>%

Expand Down Expand Up @@ -1425,4 +1425,4 @@ metrics_tidyfier <- function(
tidyr::fill(.data$custom_dates) %>%
dplyr::pull(.data$custom_dates) %>%
lubridate::floor_date(unit = 'hour')
}
}
8 changes: 4 additions & 4 deletions R/sfn_data_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#'
#' Validation checks for generating sfn_data class objects
#'
#' This method is used internally when creating and/or modifing sfn_data class
#' This method is used internally when creating and/or modifying sfn_data class
#' objects to ensure that the object returned is correct in terms of content
#' classes and dimensions (i.e. sapflow data and environmental data has the
#' same lenght)
#' same length)
#'
#' @name sfn_data_validity

Expand Down Expand Up @@ -107,7 +107,7 @@ setValidity(
#'
#' Validation checks for generating sfn_data_multi class objects
#'
#' This method is used internally to ensure the correctnes of the sfn_data_multi
#' This method is used internally to ensure the correctness of the sfn_data_multi
#' object. Basically ensures that the object returned is a list of sfn_data
#' class objects
#'
Expand Down Expand Up @@ -1037,7 +1037,7 @@ setMethod(
#' vector of length == nrow(sapf/env_data)}
#' \item{For \code{get_si_code} a character vector}
#' }
#' Validity is automatically checked before modifing the sfn_data object, and
#' Validity is automatically checked before modifying the sfn_data object, and
#' an error is raised if not valid
#'
#' @param object sfn_data containing the slot to replace
Expand Down
4 changes: 2 additions & 2 deletions R/sfn_dplyr.R
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ sfn_filter <- function(sfn_data, ..., solar = FALSE) {
#' sapflow and environmental measures (i.e. mutate sapflow when wind is high or
#' radiation is zero). Due to this, at the moment any new variable is dropped
#' when building the final results, so this is ONLY intended to mutate
#' exisiting variables without changing the names.
#' existing variables without changing the names.
#'
#' @param sfn_data \code{sfn_data} or \code{sfn_data_multi} object to subset
#'
Expand Down Expand Up @@ -284,7 +284,7 @@ sfn_mutate <- function(sfn_data, ..., solar = FALSE) {
#' `sfn_mutate_at` function will maintain the same number of rows before and
#' after the modification, so it is well suited to modify variables without
#' creating TIMESTAMP gaps (i.e. to change variable units). For mutating
#' indiviudal variables see \code{\link{sfn_mutate}}.
#' individual variables see \code{\link{sfn_mutate}}.
#'
#' @param sfn_data \code{sfn_data} or \code{sfn_data_multi} object to subset
#'
Expand Down
2 changes: 1 addition & 1 deletion R/visualizations.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#'
#' @section Formula:
#' \code{formula} argument can be used to select an environmental variable to
#' plot versus all the sapflow measurements. Any envirinmental variable is
#' plot versus all the sapflow measurements. Any environmental variable is
#' allowed, if it exist in the site provided.
#'
#' @section Geometry:
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
output: github_document
---

<!-- README.md is generated from README.Rmd. Please edit that file -->
<!-- README.md is generated from README.Rmd. Please edit thet file -->

```{r setup, include = FALSE}
knitr::opts_chunk$set(
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->
<!-- README.md is generated from README.Rmd. Please edit thet file -->

# sapfluxnetr

Expand Down
2 changes: 1 addition & 1 deletion man/data_coverage.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/diurnal_centroid.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/dot-accumulated_posix_aware.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/dot-fixed_metrics_funs.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/dot-timezone_dic.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/dot-write_metadata_cache.Rd

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

6 changes: 3 additions & 3 deletions man/filter_sites_by_md.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/metrics.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/norm_diurnal_centroid.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/sfn_data_multi_validity.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/sfn_data_validity.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/sfn_mutate.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/sfn_mutate_at.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/sfn_plot.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/sfn_replacement_methods.Rd

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

Loading

0 comments on commit f329485

Please sign in to comment.