diff --git a/R/physiologies.R b/R/physiologies.R index 69cb04dd..3bdc0aac 100644 --- a/R/physiologies.R +++ b/R/physiologies.R @@ -1,8 +1,12 @@ -#' Physiologies +#' Import phsiologies #' #' \code{physiologies} imports data from the -#' Google spreadsheets (https://drive.google.com/drive/folders/1i2UAolVWAYa7UnETNnCs0BDWjKPp3ev5). +#' Google spreadsheets at https://drive.google.com/drive/folders/1i2UAolVWAYa7UnETNnCs0BDWjKPp3ev5. +#' This function (and its internal functions) do minimal changes to the +#' imported data. These changes are only meant to match data coming from +#' different sources, and attaching information needed for further processing, +#' such as source and attribute type. #' #' @param keyword Character vector with one or more valid keywords. #' Valid keyboards can be checked with \code{showPhys}. If 'all', all @@ -27,7 +31,7 @@ physiologies <- function(keyword = 'all', full_source = FALSE) { if (cond1 && cond2) { spreadsheets <- .importSpreadsheets(keyword = keyword) spreadsheets <- spreadsheets[names(spreadsheets) %in% keyword] - bacdive <- .reshapeBacDive(.getBacDive(verbose = FALSE)) ## This functions are in a different file + bacdive <- .reshapeBacDive(.getBacDive(verbose = FALSE)) bacdive <- bacdive[names(bacdive) %in% keyword] physiologies <- vector('list', length(keyword)) for (i in seq_along(keyword)) { @@ -62,7 +66,7 @@ physiologies <- function(keyword = 'all', full_source = FALSE) { dplyr::distinct() if (full_source) { - df$Attribute_source <- df$full_source ## added with .addSourceInfo + df$Attribute_source <- df$full_source } df$full_source <- NULL @@ -74,7 +78,7 @@ physiologies <- function(keyword = 'all', full_source = FALSE) { df <- as.data.frame(df[, vapply(df, \(y) !all(is.na(y)), logical(1))]) - ## TODO this code should be somewhere else + ## TODO this code could be somewhere else if (unique(df$Attribute_group) == 'aerophilicity') { df <- .homogenizeAerophilicityAttributeNames(df) } diff --git a/man/dot-checkColumnValues.Rd b/man/dot-checkColumnValues.Rd index d2262d4b..f2068c9d 100644 --- a/man/dot-checkColumnValues.Rd +++ b/man/dot-checkColumnValues.Rd @@ -25,7 +25,7 @@ found. } \description{ \code{.checkColumnValues} checks if a single column in a data frame contains -valid values according to the extdata/template.tsv file. +valid values according to the extdata/curation_template.tsv file. } \examples{ diff --git a/man/dot-template.Rd b/man/dot-template.Rd index 7b1d5659..ff82f2a8 100644 --- a/man/dot-template.Rd +++ b/man/dot-template.Rd @@ -17,14 +17,14 @@ dataset. \description{ \code{.template} is a helper function for the \code{\link{.checkColumnValues}} function. \code{.template} generates a -subset of the extdata/template.tsv file based on the columns present in a +subset of the extdata/curation_template.tsv file based on the columns present in a given bugphyzz dataset. } \details{ A bugphyzz dataset contains a number of mandatory columns (referred to as required columns; see \code{\link{.requiredColumns}}), but optionally, it can contain other columns. The purpose of \code{template} is to create a subset -of the extdata/template.tsv file containing only the columns specific for a +of the extdata/curation_template.tsv file containing only the columns specific for a given bugphyzz dataset. } \seealso{ diff --git a/man/fattyAcidComposition.Rd b/man/fattyAcidComposition.Rd index be38cf99..df924ab7 100644 --- a/man/fattyAcidComposition.Rd +++ b/man/fattyAcidComposition.Rd @@ -7,7 +7,7 @@ fattyAcidComposition() } \value{ -A tidy data frame of fattyAcidComposition from spreadsheets_customlinks.tsv +A tidy data frame of fattyAcidComposition from spreadsheet_customlinks.tsv } \description{ \code{fattyAcidComposition} returns a data frame with data about the diff --git a/man/physiologies.Rd b/man/physiologies.Rd index 1d7dbaae..96e7068a 100644 --- a/man/physiologies.Rd +++ b/man/physiologies.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/physiologies.R \name{physiologies} \alias{physiologies} -\title{Physiologies} +\title{Import phsiologies} \usage{ physiologies(keyword = "all", full_source = FALSE) } @@ -20,7 +20,11 @@ A list of data.frames in tidy format. } \description{ \code{physiologies} imports data from the -Google spreadsheets (https://drive.google.com/drive/folders/1i2UAolVWAYa7UnETNnCs0BDWjKPp3ev5). +Google spreadsheets at https://drive.google.com/drive/folders/1i2UAolVWAYa7UnETNnCs0BDWjKPp3ev5. +This function (and its internal functions) do minimal changes to the +imported data. These changes are only meant to match data coming from +different sources, and attaching information needed for further processing, +such as source and attribute type. } \examples{ l <- physiologies('all')