From 3bb4dd307125c3fb367fa9a0d7596f7532883b74 Mon Sep 17 00:00:00 2001 From: Kevin Cazelles Date: Fri, 21 Jun 2019 15:32:48 -0400 Subject: [PATCH] review documentation :pencil: --- R/addURL.R | 6 ++--- R/addWebIcon.R | 11 ++++----- R/adjustString.R | 6 ++--- R/aggregateCol.R | 14 +++++------ R/assignClass2df.R | 21 ++++++++--------- R/assignIds.R | 13 +++++----- R/categorize.R | 2 -- R/dfTemplate.R | 10 ++++---- R/duplicateRow.R | 9 ++++--- R/findRef.R | 15 ++++++------ R/findReplace.R | 6 ++--- R/findThem.R | 21 +++++++---------- R/gaussianShape.R | 8 +++---- R/getDigits.R | 3 +-- R/keepWords.R | 12 ++++++---- R/logistic.R | 8 +++---- R/multiMatch.R | 12 +++++----- R/packagesUsed.R | 6 ++--- R/signifSymbols.R | 13 ++++------ R/squaretize.R | 3 ++- R/substrBib.R | 4 ++-- R/whichIS.R | 3 +-- R/wordCount.R | 2 +- docs/articles/overview.html | 38 +++++++++++++++--------------- docs/reference/addURL.html | 6 ++--- docs/reference/addWebIcon.html | 2 -- docs/reference/aggregateCol.html | 12 ++++------ docs/reference/assignClass2df.html | 16 ++++++------- docs/reference/assignIds.html | 15 ++++++------ docs/reference/categorize.html | 2 -- docs/reference/dfTemplate.html | 16 ++++++------- docs/reference/findRef.html | 2 +- docs/reference/findReplace.html | 2 +- docs/reference/findThem.html | 7 +++--- docs/reference/gaussianShape.html | 16 ++++++------- docs/reference/index.html | 4 ++-- docs/reference/keepWords.html | 15 +++++++----- docs/reference/logistic.html | 4 ++-- docs/reference/multiMatch.html | 8 +++---- docs/reference/packagesUsed.html | 3 ++- docs/reference/squaretize.html | 6 +++-- docs/reference/whichIs.html | 2 +- man/addURL.Rd | 6 ++--- man/addWebIcon.Rd | 3 --- man/aggregateCol.Rd | 9 +++---- man/assignClass2df.Rd | 8 +++---- man/assignIds.Rd | 9 +++---- man/categorize.Rd | 3 --- man/dfTemplate.Rd | 10 ++++---- man/findRef.Rd | 2 +- man/findReplace.Rd | 2 +- man/findThem.Rd | 7 +++--- man/gaussianShape.Rd | 8 +++---- man/keepWords.Rd | 12 ++++++---- man/logistic.Rd | 4 ++-- man/multiMatch.Rd | 6 ++--- man/packagesUsed.Rd | 3 ++- man/squaretize.Rd | 3 ++- man/whichIs.Rd | 2 +- 59 files changed, 225 insertions(+), 256 deletions(-) diff --git a/R/addURL.R b/R/addURL.R index df20108..7e15033 100644 --- a/R/addURL.R +++ b/R/addURL.R @@ -4,9 +4,9 @@ #' #' @param url A URL. #' @param text A character string to be searched within. -#' @param extra Extra A connection object or a character string that stand for a path, -#' ignored if text is defined. -#' @param markdown logical. If \code{TRUE}, hyperlinks marks of Markdown language are sought. +#' @param extra Extra A connection object or a character string that stand for +#' a path, ignored if text is defined. +#' @param markdown logical. If `TRUE`, hyperlinks marks of Markdown language are sought. #' #' @export #' diff --git a/R/addWebIcon.R b/R/addWebIcon.R index 507bcc3..d88c161 100644 --- a/R/addWebIcon.R +++ b/R/addWebIcon.R @@ -2,18 +2,15 @@ #' #' Generates a HTML tag to include an icon from an iconic framework. #' -#' @author -#' Kevin Cazelles -#' #' @param name name of the icon to be added. -#' @param framework a character use to default is \code{fa} (which stands for Font-Awesome). -#' @param size default sets to \code{2}, +#' @param framework a character use to default is `fa` (which stands for Font-Awesome). +#' @param size default sets to `2`, #' @export #' #' @examples #' addWebIcon('cc') addWebIcon <- function(name, framework = "fa", size = 2) { - paste0("") + paste0("") } diff --git a/R/adjustString.R b/R/adjustString.R index af18a24..bf19df5 100644 --- a/R/adjustString.R +++ b/R/adjustString.R @@ -11,7 +11,7 @@ #' @param extra character vector, or a vector to be coerced to a character #' vector that will be (partially) added to produced a string of #' @param before logical. If `TRUE`, then the extra characters are added before -#' \code{x} +#' `x` #' #' @details #' This function was originally created to help getting a fixed number of digits @@ -30,7 +30,7 @@ adjustString <- function(x, szchar, extra = 0, before = TRUE) { - x %<>% as.character + x <- as.character(x) szchar %<>% as.numeric %>% floor %>% abs extra %<>% as.character %>% strsplit(split = "") %>% extract2(1) ## @@ -39,7 +39,7 @@ adjustString <- function(x, szchar, extra = 0, before = TRUE) { ## . <- "No note" ## - if (sum(id1) > 0) { + if (sum(id1)) { val <- szchar - nchar(x[id1]) out[id1] <- val %>% as.list %>% lapply(FUN = . %>% rep(extra, length.out = .) %>% paste(collapse = "")) %>% unlist diff --git a/R/aggregateCol.R b/R/aggregateCol.R index c1040c1..555cd31 100644 --- a/R/aggregateCol.R +++ b/R/aggregateCol.R @@ -1,25 +1,23 @@ #' Aggregate columns #' -#' The \code{aggregateCol} function eases the computation of a given function on -#' a specific subset of columns. +#' `aggregateCol()` perform summary statistics on a specific subset of columns. #' #' @author #' Kevin Cazelles #' #' @param data a data frame. #' @param grp an integer vector assigning a group to every column of `data` -#' used to compute operations on a subset of columns. Any integer is a valid group, -#' `0` indicates that the column must be unchanged, `NA` is used to remove -#' columns. +#' used to compute operations on a subset of columns. Any integer is a valid +#" group, `0` indicates that the column must be unchanged, `NA` removes columns. #' @param FUN a function to be applied to all group of columns. #' @param names_aggreg column names for aggregated columns. -#' @param ... further arguments to be passed to \code{FUN}. +#' @param ... further arguments to be passed to `FUN`. #' #' @details #' An integer vector, whose length is the number of #' columns of the input data frame, is used to assign a group to each column -#' that explicits the subsetting. Furthermore columns can be either kept as is -#' using \code{0} or discarded by using \code{NA}. +#' that explicit the subsetting. Furthermore columns can be either kept as is +#' using `0` or discarded by using `NA`. #' #' @seealso [stats::aggregate()] #' diff --git a/R/assignClass2df.R b/R/assignClass2df.R index dbffa1e..364db44 100644 --- a/R/assignClass2df.R +++ b/R/assignClass2df.R @@ -1,18 +1,17 @@ -#' Assign a class to a set of column of a data frame +#' Assign a class to columns #' -#' This function is designed to ease the changes of column's class -#' of a given data frame. +#' Assign a class to a set of column of a data frame. This function is designed +#' to ease the changes of column's class of a given data frame. #' #' @param x a data frame or a R object to be coerced into a data frame. #' @param colid the identity of columns for which class are ti be changed. #' @param cls a character vector containing the classes' names to be used in the -#' same order as colid. By default \code{cls} is repeated until its size equals -#' \code{colid}'s size. +#' same order as `colid`. By default `cls` is repeated until its size equals +#' `colid`'s size. #' #' @return #' A data.frame for which columns have the required classes. #' -#' @importFrom magrittr %<>% #' @export #' @examples #' df1 <- matrix(signif(runif(20),4), ncol=2) @@ -22,14 +21,14 @@ assignClass2df <- function(x, colid, cls) { - ## - x %<>% as.data.frame + ## + x <- as.data.frame(x) stopifnot(colid %in% 1:ncol(x)) out <- x sz <- length(colid) cl <- rep(cls, length.out = sz) - ## + ## for (i in 1:sz) out[, colid[i]] <- methods::as(x[, colid[i]], cl[i]) - ## - return(out) + ## + out } diff --git a/R/assignIds.R b/R/assignIds.R index df9b35b..e3ab539 100644 --- a/R/assignIds.R +++ b/R/assignIds.R @@ -1,24 +1,23 @@ #' Assign an id to a list of characters or factors #' -#' This function is done mainly to assign an id to factor or similar character -#' strings. Regarding factors, \code{as.integer} does such task -#' but the order obtained could be different. +#' This function aims to assign an id to factor or similar character +#' strings. Regarding factors, [as.integer()] does such task but the order +#' obtained may differ #' #' @param x an R object to be coerced into character type. -#' @param alphabetical a logical indicating whether an alphabetical sorting must be applied. +#' @param alphabetical a logical indicating whether an alphabetical sorting +#' must be applied. #' @return #' A vector of Ids. #' @importFrom magrittr %>% -#' @importFrom magrittr %<>% #' @export #' @examples #' assignIds(list(2,'f', 'd', 'f')) - assignIds <- function(x, alphabetical = FALSE) { tmp <- x %>% as.character %>% unique if (alphabetical) - tmp %<>% sort + tmp <- sort(tmp) out <- tmp %>% length %>% integer for (i in 1:length(tmp)) out[x == tmp[i]] <- i out diff --git a/R/categorize.R b/R/categorize.R index 8419a85..523794c 100644 --- a/R/categorize.R +++ b/R/categorize.R @@ -3,8 +3,6 @@ #' Assigns a category to each element of a vector for a given set of threshold #' values.. #' -#' @author -#' Kevin Cazelles #' @param x A numeric, complex, character or logical vector. #' @param categ A set of threshold values used to assign categories. #' @param lower A logical, if `TRUE` threshold values (i.e. values within diff --git a/R/dfTemplate.R b/R/dfTemplate.R index 90da99f..317198f 100644 --- a/R/dfTemplate.R +++ b/R/dfTemplate.R @@ -1,11 +1,9 @@ #' Create a data frame from scratch or based on one or two data frames. #' -#' This function handles the creation of data frames based on intuitive parameters. -#' It was originally designed to make row binding easier when columns differs -#' among data frame by creating data frames with the same columns. -#' -#' @author -#' Kevin Cazelles +#' This function handles the creation of data frames based on intuitive +#' parameters. It was originally designed to make row binding easier when +#' columns differs among data frame by creating data frames with the same +#' columns. #' #' @param cols either a number of column or a vector of character used as #' columns names of the data frame to be returned. diff --git a/R/duplicateRow.R b/R/duplicateRow.R index 7547990..378a925 100644 --- a/R/duplicateRow.R +++ b/R/duplicateRow.R @@ -8,9 +8,8 @@ #' @param x a data.frame. #' @param id.el identity of the elements to be duplicated. #' @param times number of times elements are duplicated. Could be a vector of the same length as id.el. -#' @param append A logical. If \code{TRUE}, duplicated elements will be appended to the dataframe otherwise duplicated elements remain next to their parent. Non-existing columns cannot be duplicated while non-existing rows can and produce \code{NA}. -#' -#' @importFrom magrittr %>% %<>% +#' @param append A logical. If `TRUE`, duplicated elements will be appended to the dataframe otherwise duplicated elements remain next to their parent. Non-existing columns cannot be duplicated while non-existing rows can and produce `NA`. +#' @importFrom magrittr %>% #' @export #' @examples #' data(iris, package='datasets') @@ -24,7 +23,7 @@ duplicateRow <- function(x, id.el = 1, times = 1, append = FALSE) { if (class(pos) == "character") ord <- c(rownames(x), pos) else ord <- c(1:nrow(x), pos) if (!append) - ord %<>% sort + ord <- sort(ord) x[ord, ] } @@ -37,7 +36,7 @@ duplicateCol <- function(x, id.el = 1, times = 1, append = FALSE) { if (class(pos) == "character") ord <- c(colnames(x), pos) else ord <- c(1:ncol(x), pos) if (!append) - ord %<>% sort + ord <- sort(ord) x[, ord] } diff --git a/R/findRef.R b/R/findRef.R index 3294d0f..ffd37ea 100644 --- a/R/findRef.R +++ b/R/findRef.R @@ -4,14 +4,14 @@ #' #' @param text A character string to be searched within. #' @param con A connection object or a character string that stand for a path, -#' ignored if \code{text} is used. -#' @param markdown logical. If \code{TRUE}, citation tags of Markdown langage are sought. +#' ignored if `text` is used. +#' @param markdown logical. If `TRUE`, citation tags of Markdown langage are sought. #' #' @author #' Kevin Cazelles #' #' @return -#' A dataframe with the citation keys and their frequence. +#' A data.frame with the citation keys and their frequence. #' @export #' @examples #' test <- findRef(text='First \\cite{Pimm2000}, second \\Citep{May1972}') @@ -20,22 +20,21 @@ findRef <- function(text, con, markdown = FALSE) { ##--- if (missing(text)) { - if (missing(con)) + if (missing(con)) stop("Either 'text' or 'con' must be specified.") else { lsfile <- readLines(con) text <- paste(unlist(lsfile), collapse = "") } } ## ---- - if (!markdown) + if (!markdown) pat <- "[\\].{0,3}[cC]ite.{0,7}\\{[[:alnum:]]+}" else pat <- "@[[:alnum:]]+" tbref <- multiMatch(text = text, pattern = pat) ## ---- - if (markdown) + if (markdown) tbref <- table(sub("@", "", tbref)) else { tbref <- sub("[\\].{0,3}[cC]ite.{0,7}\\{", "", tbref) tbref <- table(sub("\\}", "", tbref)) } - tbref <- data.frame(key = names(tbref), freq = as.integer(tbref)) - tbref + data.frame(key = names(tbref), freq = as.integer(tbref)) } diff --git a/R/findReplace.R b/R/findReplace.R index 53a49ec..08ed3cf 100644 --- a/R/findReplace.R +++ b/R/findReplace.R @@ -6,7 +6,7 @@ #' @author #' Kevin Cazelles #' -#' @param vec a vector where to search for patterns. +#' @param vec a vector to be searched. #' @param vec_pat vector providing the patterns to be searched for. #' @param y values to replace matching values. #' @@ -26,7 +26,7 @@ findReplace <- function(vec, vec_pat, y) { vec[vec %in% vec_pat] <- y - return(vec) + vec } @@ -36,5 +36,5 @@ grepReplace <- function(vec, vec_pat, y) { res <- lapply(vec_pat, function(x) grepl(vec, pattern = x)) res2 <- do.call(cbind, res) %>% apply(1L, sum) vec[res2 > 0] <- y - return(vec) + vec } diff --git a/R/findThem.R b/R/findThem.R index 9897041..02d1f29 100644 --- a/R/findThem.R +++ b/R/findThem.R @@ -1,7 +1,7 @@ #' Find values in a given vector. #' #' Given a set of values and a vector where the values must be found, the -#' \code{findThem} function records the matched values and the position in the +#' `findThem` function records the matched values and the position in the #' vector where the values have been searched for. #' #' @author @@ -9,14 +9,13 @@ #' @param what a vector a values to be searched for. #' @param where a vector where values will be searched on. #' @param todf a logical indicating whether the output object must be a data frame. -#' @param reportnomatch a logical. If TRUE, values without match are reported in -#' the data frame with a NA. Only available if \code{todf} is TRUE. Default is -#' set to FALSE. +#' @param reportnomatch a logical. If `TRUE`, values without match are reported #' in the data frame with a NA. Only available if `todf` is `TRUE`. Default is +#' set to `FALSE`. #' @return -#' A list indicating matched positions for each elements of \code{what}. If no -#' match is found then \code{NA} is returned. If \code{todf} is TRUE +#' A list indicating matched positions for each elements of `what`. If no +#' match is found then `NA` is returned. If `todf` is `TRUE` #' then a three-columns data frame is returned including values and positions -#' in both \code{what} and \code{where} vectors. +#' in both `what` and `where` vectors. #' @seealso \code{\link[base]{which}} #' @export #' @examples @@ -44,11 +43,7 @@ findThem <- function(what, where, todf = FALSE, reportnomatch = FALSE) { out <- data.frame(values = rep(names(tmp), sz), what = rep(1:length(what), sz), where = unlist(tmp)) rownames(out) <- NULL - } else { - out <- tmp - } - } else { - out <- NA_integer_ - } + } else out <- tmp + } else out <- NA_integer_ out } diff --git a/R/gaussianShape.R b/R/gaussianShape.R index 88c3829..a5a1c96 100644 --- a/R/gaussianShape.R +++ b/R/gaussianShape.R @@ -1,13 +1,13 @@ -#' Flexible bell-shaped function. +#' Flexible bell-shaped function #' -#' The \code{gaussianShape} function computes a personalizable Gaussian function. -#' Default values are the same as in \code{\link[stats]{dnorm}}. +#' The `gaussianShape()` function computes a personnalisable Gaussian function. +#' Default values are the same as in [stats::dnorm()]. #' @author #' Kevin Cazelles #' @param x a numeric vector. #' @param optx x-values at which the maximum is reached. #' @param opty extremum value. -#' @param width the width of the bell. +#' @param width width of the bell. #' @param pow a real number. #' @return #' A vector containing values standing for categories into which elements of x have fallen. diff --git a/R/getDigits.R b/R/getDigits.R index 2fa2a81..81b2f5a 100644 --- a/R/getDigits.R +++ b/R/getDigits.R @@ -11,13 +11,12 @@ #' @param x a character vector where digits are sought, or an object which can be coerced by `as.character` to a character vector. #' @param collapse an optional character string to separate the results (see [base::paste()). #' -#' @importFrom magrittr %>% %<>% +#' @importFrom magrittr %>% #' @export #' #' @return #' A list of digits. #' -#' #' @examples #' getDigits('txt012-34') diff --git a/R/keepWords.R b/R/keepWords.R index 9b7e30f..873f879 100644 --- a/R/keepWords.R +++ b/R/keepWords.R @@ -1,15 +1,17 @@ #' Keep these words. #' -#' Extract words based on their position in a character string, vectorised over \code{string}. +#' Extract words based on their position in a character string, vectorised over +#' `string`. #' #' @author #' Kevin Cazelles #' -#' @param string Input vector. A character vector or list from which words will be extracted. +#' @param string An input character vector or a list from which words will be +#' extracted. #' @param slc Vector of integer indicating the selected positions of the words to be kept. -#' @param punct.rm A logical indicating whether punctuation characters should be removed. -#' @param na.rm A logical indicating whether missing values should be removed. -#' @param collapse An optional character string used to separate selected words. Not \code{NA_character_}. +#' @param punct.rm A logical Should punctuation characters be removed? +#' @param na.rm A logical. Should missing values be removed? +#' @param collapse An optional character string used to separate selected words. #' #' @return A vector of the selected words concatenated for each string. #' @importFrom magrittr %>% diff --git a/R/logistic.R b/R/logistic.R index ef68bf9..43a53c2 100644 --- a/R/logistic.R +++ b/R/logistic.R @@ -2,14 +2,14 @@ #' @title Logistic functions #' #' @description -#' The \code{logisic} function describe the classical logistic function, +#' The `logisic` function describe the classical logistic function, #' #' @param x a numerical vector. #' @param yneg assympotic values when x tends to \code{-Inf}. -#' @param ypos assympotic values when x tends to \code{-Inf}. +#' @param ypos assympotic values when y tends to \code{-Inf}. #' @param lambda scalar coefficient. #' @param pow x exponent. -#' @param yzer values (for \code{logistic2} only). +#' @param yzer values (for `logistic2` only). #' #' @details #' The classic logistic equation is: @@ -36,7 +36,7 @@ logistic <- function(x, yneg = -1, ypos = 1, lambda = 1, pow = 1) { } -#' @describeIn logistic a slighlty different logistic function. +#' @describeIn logistic A slightly different logistic function. #' @export logistic2 <- function(x, yneg = -1, ypos = 1, lambda = 1, pow = 1, yzer = 0) { diff --git a/R/multiMatch.R b/R/multiMatch.R index c6bf0e0..b9a8ce5 100644 --- a/R/multiMatch.R +++ b/R/multiMatch.R @@ -1,21 +1,21 @@ #' Mutiple match. #' -#' Seek all elements that match a given pattern within a character strings. +#' Seek all elements matching a given pattern in a character strings. #' #' @param text a character vector where matches are sought, or an object which -#' can be coerced by as.character to a character vector, see \code{regexec}. +#' can be coerced by as.character to a character vector, see `regexec`. #' @param pattern character string containing a regular expression to be -#' matched in the given character vector, see \code{regexec}. +#' matched in the given character vector, see `regexec`. #' #' @author #' Kevin Cazelles #' #' @details -#' \code{multiMatch} is essentially a wrapper around some regex functions that -#' ease their usage. +#' `multiMatch` is essentially a wrapper around [base::regexec()] and +#' [base::regmatches()] to find more than one match. #' #' @return -#' A vector of character strings matching \code{pattern} argument. +#' A vector of character strings matching `pattern` argument. #' @export #' @examples #' multiMatch('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do diff --git a/R/packagesUsed.R b/R/packagesUsed.R index 4c4f1fe..8843b05 100644 --- a/R/packagesUsed.R +++ b/R/packagesUsed.R @@ -7,7 +7,8 @@ #' @author #' Kevin Cazelles #' -#' @param vc_pkg a vector of string characters including the names of the package to be added. +#' @param vc_pkg a vector of string characters including package names to be +#' added. #' #' @export #' @@ -20,6 +21,5 @@ packagesUsed <- function(vc_pkg) { ls_ver <- lapply(vc_pkg, function(x) as.character(utils::packageVersion(x))) - df_pkg <- data.frame(name = vc_pkg, version = unlist(ls_ver)) - df_pkg + data.frame(name = vc_pkg, version = unlist(ls_ver)) } diff --git a/R/signifSymbols.R b/R/signifSymbols.R index 4b9363d..3016ab0 100644 --- a/R/signifSymbols.R +++ b/R/signifSymbols.R @@ -12,8 +12,6 @@ #' @param symbols list of symbols. #' @param notsignif symbols for non significant p-value. #' -#' @importFrom magrittr %<>% -#' #' @export #' #' @examples @@ -21,19 +19,16 @@ #' signifSymbols(.008) #' sapply(c(.2, .08, .04, .008, 0.0001), signifSymbols) -signifSymbols <- function(pvalue, thresholds = c(0.1, 0.05, 0.01, 0.001), symbols = c(".", - "*", "**", "***"), notsignif = "n.s.") { +signifSymbols <- function(pvalue, thresholds = c(0.1, 0.05, 0.01, 0.001), + symbols = c(".", "*", "**", "***"), notsignif = "n.s.") { stopifnot(length(symbols) == length(thresholds)) - pvalue %<>% as.numeric + pvalue <- as.numeric(pvalue) stopifnot(length(pvalue) == 1) ## id <- which(pvalue <= thresholds) if (length(id)) { out <- symbols[max(id)] - } else { - out <- notsignif - } - + } else out <- notsignif out } diff --git a/R/squaretize.R b/R/squaretize.R index 83b24eb..eb80c38 100644 --- a/R/squaretize.R +++ b/R/squaretize.R @@ -1,6 +1,7 @@ #' Makes a data frame or a matrix square. #' -#' Add missing rows or columns based on names and Duplicates rows and columns of a given a data frame. +#' Add missing rows or columns based on names and Duplicates rows and columns +#' of a given a data frame. #' #' @author #' Kevin Cazelles diff --git a/R/substrBib.R b/R/substrBib.R index a2909e1..66857fe 100644 --- a/R/substrBib.R +++ b/R/substrBib.R @@ -5,11 +5,11 @@ #' @author #' Kevin Cazelles #' -#' @param bib An object of class \code{BibEntry} or \code{bibentry}. +#' @param bib An object of class `BibEntry` or `bibentry`. #' @param text A character string to be searched within. #' @param con A connection object or a character string that stand for a path, #' ignored if text is defined. -#' @param markdown logical. If \code{TRUE}, Markdown formatted citation marks are sought. +#' @param markdown logical. If `TRUE`, Markdown formatted citation marks are sought. #' @export #' @examples #' file.name <- system.file('Bib', 'RJC.bib', package='RefManageR') diff --git a/R/whichIS.R b/R/whichIS.R index a44d4b6..f73e08a 100644 --- a/R/whichIS.R +++ b/R/whichIS.R @@ -5,12 +5,11 @@ #' @param x a vector of values or patterns to be searched for. #' @param y a vector where x values are searched for. #' @param isPattern should x be considered as a vector of patterns? -#' @param ... further arguments to be passed to [which()]. +#' @param ... further arguments to be passed to [base::which()]. #' #' @return #' A list of positions. Each element corresponds to the matches for a specific x value. #' -#' @importFrom magrittr %<>% #' @export #' #' @examples diff --git a/R/wordCount.R b/R/wordCount.R index 9727e29..45000e8 100644 --- a/R/wordCount.R +++ b/R/wordCount.R @@ -8,7 +8,7 @@ #' @param string Input vector. A character vector or list from which words will be extracted. #' @param exclude character string containing a regular expression listing the character to be excluded. #' -#' @return A vector of the number of word in each element of \code{sting}. +#' @return A vector of the number of word in each element of `sting`. #' @importFrom magrittr %>% #' @export #' @examples diff --git a/docs/articles/overview.html b/docs/articles/overview.html index 797ec65..51b5a06 100644 --- a/docs/articles/overview.html +++ b/docs/articles/overview.html @@ -169,25 +169,25 @@

spl <- sample(vec) whichIs(vec, spl) R>> [[1]] -R>> [1] 2 +R>> [1] 3 R>> R>> [[2]] -R>> [1] 5 +R>> [1] 1 R>> R>> [[3]] -R>> [1] 7 +R>> [1] 4 R>> R>> [[4]] -R>> [1] 1 +R>> [1] 5 R>> R>> [[5]] -R>> [1] 3 +R>> [1] 6 R>> R>> [[6]] -R>> [1] 4 +R>> [1] 7 R>> R>> [[7]] -R>> [1] 6 +R>> [1] 2 id <- unlist(whichIs(vec, spl)) spl[id] R>> [1] "A" "B" "C" "D" "E" "F" "G" @@ -212,16 +212,16 @@

Assign a category

  (seqv <- stats::runif(40))
-R>>   [1] 0.56721603 0.53488625 0.02512788 0.87956641 0.97006804 0.66202300
-R>>   [7] 0.05108334 0.83167700 0.80221005 0.40764583 0.04191513 0.66315005
-R>>  [13] 0.92580906 0.93032585 0.14750028 0.55041578 0.93789192 0.98040489
-R>>  [19] 0.33359872 0.25992305 0.68356056 0.98284521 0.54234358 0.31437238
-R>>  [25] 0.92873086 0.97010997 0.09711352 0.36837545 0.41917338 0.76377741
-R>>  [31] 0.44433320 0.49700021 0.17587525 0.98398305 0.93907061 0.52803673
-R>>  [37] 0.85031562 0.87819886 0.21943817 0.46431875
+R>>   [1] 0.50603277 0.92529588 0.93614467 0.16717816 0.48405743 0.48680139
+R>>   [7] 0.06719061 0.79091509 0.01407780 0.21142339 0.64112501 0.44905561
+R>>  [13] 0.24403667 0.39381226 0.26669787 0.11810549 0.65035160 0.68529515
+R>>  [19] 0.99719085 0.35145045 0.22740111 0.07299528 0.60207656 0.72065461
+R>>  [25] 0.60309117 0.83222264 0.42404409 0.17066786 0.97957025 0.27388347
+R>>  [31] 0.99622874 0.53500075 0.33188532 0.81744030 0.03752616 0.11970402
+R>>  [37] 0.57529585 0.52534508 0.38513444 0.64263946
   categorize(seqv, categ=seq(0.1,0.9, 0.1))
-R>>   [1]  6  6  1  9 10  7  1  9  9  5  1  7 10 10  2  6 10 10  4  3  7 10  6
-R>>  [24]  4 10 10  1  4  5  8  5  5  2 10 10  6  9  9  3  5
+R>> [1] 6 10 10 2 5 5 1 8 1 3 7 5 3 4 3 2 7 7 10 4 3 1 7 +R>> [24] 8 7 9 5 2 10 3 10 6 4 9 1 2 6 6 4 7

@@ -246,11 +246,11 @@

+R>> $ V1: num 0.645 0.933 0.963 0.451 0.393 ... +R>> $ V2: chr "0.06111" "0.5387" "0.09952" "0.0201" ...

diff --git a/docs/reference/addURL.html b/docs/reference/addURL.html index 3d1edd5..7151e64 100644 --- a/docs/reference/addURL.html +++ b/docs/reference/addURL.html @@ -137,12 +137,12 @@

Arg extra -

Extra A connection object or a character string that stand for a path, -ignored if text is defined.

+

Extra A connection object or a character string that stand for +a path, ignored if text is defined.

markdown -

logical. If TRUE, hyperlinks marks of Markdown language are sought.

+

logical. If TRUE, hyperlinks marks of Markdown language are sought.

diff --git a/docs/reference/addWebIcon.html b/docs/reference/addWebIcon.html index 41586a2..cbc993a 100644 --- a/docs/reference/addWebIcon.html +++ b/docs/reference/addWebIcon.html @@ -153,8 +153,6 @@

Contents

  • Examples
  • -

    Author

    -

    Kevin Cazelles

    diff --git a/docs/reference/aggregateCol.html b/docs/reference/aggregateCol.html index 59f3497..2cb051e 100644 --- a/docs/reference/aggregateCol.html +++ b/docs/reference/aggregateCol.html @@ -32,8 +32,7 @@ - + @@ -119,8 +118,7 @@

    Aggregate columns

    -

    The aggregateCol function eases the computation of a given function on -a specific subset of columns.

    +

    aggregateCol() perform summary statistics on a specific subset of columns.

    @@ -136,9 +134,7 @@

    Arg grp

    an integer vector assigning a group to every column of data -used to compute operations on a subset of columns. Any integer is a valid group, -0 indicates that the column must be unchanged, NA is used to remove -columns.

    +used to compute operations on a subset of columns. Any integer is a valid

    names_aggreg @@ -162,7 +158,7 @@

    Details

    An integer vector, whose length is the number of columns of the input data frame, is used to assign a group to each column -that explicits the subsetting. Furthermore columns can be either kept as is +that explicit the subsetting. Furthermore columns can be either kept as is using 0 or discarded by using NA.

    See also

    diff --git a/docs/reference/assignClass2df.html b/docs/reference/assignClass2df.html index 5141407..ac15ca0 100644 --- a/docs/reference/assignClass2df.html +++ b/docs/reference/assignClass2df.html @@ -6,7 +6,7 @@ -Assign a class to a set of column of a data frame — assignClass2df • inSilecoMisc +Assign a class to columns — assignClass2df • inSilecoMisc @@ -30,10 +30,10 @@ - + - + @@ -112,15 +112,15 @@
    -

    This function is designed to ease the changes of column's class -of a given data frame.

    +

    Assign a class to a set of column of a data frame. This function is designed +to ease the changes of column's class of a given data frame.

    @@ -140,7 +140,7 @@

    Arg cls

    a character vector containing the classes' names to be used in the -same order as colid. By default cls is repeated until its size equals +same order as colid. By default cls is repeated until its size equals colid's size.

    diff --git a/docs/reference/assignIds.html b/docs/reference/assignIds.html index d2d3cd3..17e3aab 100644 --- a/docs/reference/assignIds.html +++ b/docs/reference/assignIds.html @@ -32,9 +32,9 @@ - + @@ -120,9 +120,9 @@

    Assign an id to a list of characters or factors

    -

    This function is done mainly to assign an id to factor or similar character -strings. Regarding factors, as.integer does such task -but the order obtained could be different.

    +

    This function aims to assign an id to factor or similar character +strings. Regarding factors, as.integer() does such task but the order +obtained may differ

    @@ -137,7 +137,8 @@

    Arg alphabetical -

    a logical indicating whether an alphabetical sorting must be applied.

    +

    a logical indicating whether an alphabetical sorting +must be applied.

    diff --git a/docs/reference/categorize.html b/docs/reference/categorize.html index af68c88..e4fc5f6 100644 --- a/docs/reference/categorize.html +++ b/docs/reference/categorize.html @@ -164,8 +164,6 @@

    Contents

  • Examples
  • -

    Author

    -

    Kevin Cazelles

    diff --git a/docs/reference/dfTemplate.html b/docs/reference/dfTemplate.html index ef56e11..1bd4771 100644 --- a/docs/reference/dfTemplate.html +++ b/docs/reference/dfTemplate.html @@ -32,9 +32,10 @@ - + @@ -120,9 +121,10 @@

    Create a data frame from scratch or based on one or two data frames.

    -

    This function handles the creation of data frames based on intuitive parameters. -It was originally designed to make row binding easier when columns differs -among data frame by creating data frames with the same columns.

    +

    This function handles the creation of data frames based on intuitive +parameters. It was originally designed to make row binding easier when +columns differs among data frame by creating data frames with the same +columns.

    @@ -202,8 +204,6 @@

    Contents

  • Examples
  • -

    Author

    -

    Kevin Cazelles

    diff --git a/docs/reference/findRef.html b/docs/reference/findRef.html index 50159d1..f7724eb 100644 --- a/docs/reference/findRef.html +++ b/docs/reference/findRef.html @@ -144,7 +144,7 @@

    Arg

    Value

    -

    A dataframe with the citation keys and their frequence.

    +

    A data.frame with the citation keys and their frequence.

    Examples

    diff --git a/docs/reference/findReplace.html b/docs/reference/findReplace.html index f655c8a..ce3be1b 100644 --- a/docs/reference/findReplace.html +++ b/docs/reference/findReplace.html @@ -131,7 +131,7 @@

    Arg vec -

    a vector where to search for patterns.

    +

    a vector to be searched.

    vec_pat diff --git a/docs/reference/findThem.html b/docs/reference/findThem.html index 6b02953..211cd09 100644 --- a/docs/reference/findThem.html +++ b/docs/reference/findThem.html @@ -145,16 +145,15 @@

    Arg reportnomatch -

    a logical. If TRUE, values without match are reported in -the data frame with a NA. Only available if todf is TRUE. Default is -set to FALSE.

    +

    a logical. If TRUE, values without match are reported #' in the data frame with a NA. Only available if todf is TRUE. Default is +set to FALSE.

    Value

    A list indicating matched positions for each elements of what. If no -match is found then NA is returned. If todf is TRUE +match is found then NA is returned. If todf is TRUE then a three-columns data frame is returned including values and positions in both what and where vectors.

    diff --git a/docs/reference/gaussianShape.html b/docs/reference/gaussianShape.html index 0524c04..84fd951 100644 --- a/docs/reference/gaussianShape.html +++ b/docs/reference/gaussianShape.html @@ -6,7 +6,7 @@ -Flexible bell-shaped function. — gaussianShape • inSilecoMisc +Flexible bell-shaped function — gaussianShape • inSilecoMisc @@ -30,10 +30,10 @@ - + - + @@ -112,15 +112,15 @@
    -

    The gaussianShape function computes a personalizable Gaussian function. -Default values are the same as in dnorm.

    +

    The gaussianShape() function computes a personnalisable Gaussian function. +Default values are the same as in stats::dnorm().

    @@ -144,7 +144,7 @@

    Arg width -

    the width of the bell.

    +

    width of the bell.

    pow diff --git a/docs/reference/index.html b/docs/reference/index.html index c8ae7ee..290ca23 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -161,7 +161,7 @@

    assignClass2df()

    -

    Assign a class to a set of column of a data frame

    +

    Assign a class to columns

    @@ -209,7 +209,7 @@

    gaussianShape()

    -

    Flexible bell-shaped function.

    +

    Flexible bell-shaped function

    diff --git a/docs/reference/keepWords.html b/docs/reference/keepWords.html index 939cae3..508a23b 100644 --- a/docs/reference/keepWords.html +++ b/docs/reference/keepWords.html @@ -32,7 +32,8 @@ - + @@ -118,7 +119,8 @@

    Keep these words.

    -

    Extract words based on their position in a character string, vectorised over string.

    +

    Extract words based on their position in a character string, vectorised over +string.

    @@ -130,7 +132,8 @@

    Arg string -

    Input vector. A character vector or list from which words will be extracted.

    +

    An input character vector or a list from which words will be +extracted.

    slc @@ -138,15 +141,15 @@

    Arg punct.rm -

    A logical indicating whether punctuation characters should be removed.

    +

    A logical Should punctuation characters be removed?

    na.rm -

    A logical indicating whether missing values should be removed.

    +

    A logical. Should missing values be removed?

    collapse -

    An optional character string used to separate selected words. Not NA_character_.

    +

    An optional character string used to separate selected words.

    diff --git a/docs/reference/logistic.html b/docs/reference/logistic.html index a10f49f..cb3398d 100644 --- a/docs/reference/logistic.html +++ b/docs/reference/logistic.html @@ -139,7 +139,7 @@

    Arg ypos -

    assympotic values when x tends to -Inf.

    +

    assympotic values when y tends to -Inf.

    lambda @@ -173,7 +173,7 @@

    Details

    Functions

      -
    • logistic2: a slighlty different logistic function.

    • +
    • logistic2: A slightly different logistic function.

    diff --git a/docs/reference/multiMatch.html b/docs/reference/multiMatch.html index 62b78c2..6d9eb59 100644 --- a/docs/reference/multiMatch.html +++ b/docs/reference/multiMatch.html @@ -32,7 +32,7 @@ - + @@ -118,7 +118,7 @@

    Mutiple match.

    -

    Seek all elements that match a given pattern within a character strings.

    +

    Seek all elements matching a given pattern in a character strings.

    @@ -145,8 +145,8 @@

    Value

    Details

    -

    multiMatch is essentially a wrapper around some regex functions that -ease their usage.

    +

    multiMatch is essentially a wrapper around base::regexec() and +base::regmatches() to find more than one match.

    Examples

    diff --git a/docs/reference/packagesUsed.html b/docs/reference/packagesUsed.html index 954f4a0..1dd9afc 100644 --- a/docs/reference/packagesUsed.html +++ b/docs/reference/packagesUsed.html @@ -129,7 +129,8 @@

    Arg vc_pkg -

    a vector of string characters including the names of the package to be added.

    +

    a vector of string characters including package names to be +added.

    diff --git a/docs/reference/squaretize.html b/docs/reference/squaretize.html index e32774e..b683be1 100644 --- a/docs/reference/squaretize.html +++ b/docs/reference/squaretize.html @@ -32,7 +32,8 @@ - + @@ -118,7 +119,8 @@

    Makes a data frame or a matrix square.

    -

    Add missing rows or columns based on names and Duplicates rows and columns of a given a data frame.

    +

    Add missing rows or columns based on names and Duplicates rows and columns +of a given a data frame.

    diff --git a/docs/reference/whichIs.html b/docs/reference/whichIs.html index 3efab49..6e4450e 100644 --- a/docs/reference/whichIs.html +++ b/docs/reference/whichIs.html @@ -141,7 +141,7 @@

    Arg ... -

    further arguments to be passed to which().

    +

    further arguments to be passed to base::which().

    diff --git a/man/addURL.Rd b/man/addURL.Rd index fc884f2..b846244 100644 --- a/man/addURL.Rd +++ b/man/addURL.Rd @@ -11,10 +11,10 @@ addURL(url, text = NULL, extra = NULL, markdown = FALSE) \item{text}{A character string to be searched within.} -\item{extra}{Extra A connection object or a character string that stand for a path, -ignored if text is defined.} +\item{extra}{Extra A connection object or a character string that stand for +a path, ignored if text is defined.} -\item{markdown}{logical. If \code{TRUE}, hyperlinks marks of Markdown language are sought.} +\item{markdown}{logical. If \code{TRUE}, hyperlinks marks of Markdown language are sought.} } \description{ Add a URL in HTML or Markdown format. diff --git a/man/addWebIcon.Rd b/man/addWebIcon.Rd index f070416..d9e089c 100644 --- a/man/addWebIcon.Rd +++ b/man/addWebIcon.Rd @@ -19,6 +19,3 @@ Generates a HTML tag to include an icon from an iconic framework. \examples{ addWebIcon('cc') } -\author{ -Kevin Cazelles -} diff --git a/man/aggregateCol.Rd b/man/aggregateCol.Rd index e0d0ead..24068e6 100644 --- a/man/aggregateCol.Rd +++ b/man/aggregateCol.Rd @@ -10,9 +10,7 @@ aggregateCol(data, grp, names_aggreg = NULL, FUN = sum, ...) \item{data}{a data frame.} \item{grp}{an integer vector assigning a group to every column of \code{data} -used to compute operations on a subset of columns. Any integer is a valid group, -\code{0} indicates that the column must be unchanged, \code{NA} is used to remove -columns.} +used to compute operations on a subset of columns. Any integer is a valid} \item{names_aggreg}{column names for aggregated columns.} @@ -24,13 +22,12 @@ columns.} A data frame with the grouped columns. } \description{ -The \code{aggregateCol} function eases the computation of a given function on -a specific subset of columns. +\code{aggregateCol()} perform summary statistics on a specific subset of columns. } \details{ An integer vector, whose length is the number of columns of the input data frame, is used to assign a group to each column -that explicits the subsetting. Furthermore columns can be either kept as is +that explicit the subsetting. Furthermore columns can be either kept as is using \code{0} or discarded by using \code{NA}. } \examples{ diff --git a/man/assignClass2df.Rd b/man/assignClass2df.Rd index 750195a..3f12ca7 100644 --- a/man/assignClass2df.Rd +++ b/man/assignClass2df.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/assignClass2df.R \name{assignClass2df} \alias{assignClass2df} -\title{Assign a class to a set of column of a data frame} +\title{Assign a class to columns} \usage{ assignClass2df(x, colid, cls) } @@ -12,15 +12,15 @@ assignClass2df(x, colid, cls) \item{colid}{the identity of columns for which class are ti be changed.} \item{cls}{a character vector containing the classes' names to be used in the -same order as colid. By default \code{cls} is repeated until its size equals +same order as \code{colid}. By default \code{cls} is repeated until its size equals \code{colid}'s size.} } \value{ A data.frame for which columns have the required classes. } \description{ -This function is designed to ease the changes of column's class -of a given data frame. +Assign a class to a set of column of a data frame. This function is designed +to ease the changes of column's class of a given data frame. } \examples{ df1 <- matrix(signif(runif(20),4), ncol=2) diff --git a/man/assignIds.Rd b/man/assignIds.Rd index 38d8cff..fdc4908 100644 --- a/man/assignIds.Rd +++ b/man/assignIds.Rd @@ -9,15 +9,16 @@ assignIds(x, alphabetical = FALSE) \arguments{ \item{x}{an R object to be coerced into character type.} -\item{alphabetical}{a logical indicating whether an alphabetical sorting must be applied.} +\item{alphabetical}{a logical indicating whether an alphabetical sorting +must be applied.} } \value{ A vector of Ids. } \description{ -This function is done mainly to assign an id to factor or similar character -strings. Regarding factors, \code{as.integer} does such task -but the order obtained could be different. +This function aims to assign an id to factor or similar character +strings. Regarding factors, \code{\link[=as.integer]{as.integer()}} does such task but the order +obtained may differ } \examples{ assignIds(list(2,'f', 'd', 'f')) diff --git a/man/categorize.Rd b/man/categorize.Rd index 2aa54b0..4a07756 100644 --- a/man/categorize.Rd +++ b/man/categorize.Rd @@ -28,6 +28,3 @@ categorize(LETTERS[1:5], categ='C') categorize(LETTERS[1:5], categ='C', lower=TRUE) categorize(LETTERS[floor(5*stats::runif(20))+1], categ=LETTERS[1:5], lower=TRUE) } -\author{ -Kevin Cazelles -} diff --git a/man/dfTemplate.Rd b/man/dfTemplate.Rd index 4208a52..25ce887 100644 --- a/man/dfTemplate.Rd +++ b/man/dfTemplate.Rd @@ -35,9 +35,10 @@ names of \code{x} and the names of \code{y} are used.} Returns a data frame with the desired characteristics. } \description{ -This function handles the creation of data frames based on intuitive parameters. -It was originally designed to make row binding easier when columns differs -among data frame by creating data frames with the same columns. +This function handles the creation of data frames based on intuitive +parameters. It was originally designed to make row binding easier when +columns differs among data frame by creating data frames with the same +columns. } \section{Functions}{ \itemize{ @@ -48,6 +49,3 @@ among data frame by creating data frames with the same columns. dfTemplate(5, 2) dfTemplate(5, 2, col_classes = "character") } -\author{ -Kevin Cazelles -} diff --git a/man/findRef.Rd b/man/findRef.Rd index f234706..94f0df5 100644 --- a/man/findRef.Rd +++ b/man/findRef.Rd @@ -15,7 +15,7 @@ ignored if \code{text} is used.} \item{markdown}{logical. If \code{TRUE}, citation tags of Markdown langage are sought.} } \value{ -A dataframe with the citation keys and their frequence. +A data.frame with the citation keys and their frequence. } \description{ Finds Markdown and Latex citation tags in a given character stings or a file. diff --git a/man/findReplace.Rd b/man/findReplace.Rd index 76cf460..5b51723 100644 --- a/man/findReplace.Rd +++ b/man/findReplace.Rd @@ -10,7 +10,7 @@ findReplace(vec, vec_pat, y) grepReplace(vec, vec_pat, y) } \arguments{ -\item{vec}{a vector where to search for patterns.} +\item{vec}{a vector to be searched.} \item{vec_pat}{vector providing the patterns to be searched for.} diff --git a/man/findThem.Rd b/man/findThem.Rd index a5302b3..229d2af 100644 --- a/man/findThem.Rd +++ b/man/findThem.Rd @@ -13,13 +13,12 @@ findThem(what, where, todf = FALSE, reportnomatch = FALSE) \item{todf}{a logical indicating whether the output object must be a data frame.} -\item{reportnomatch}{a logical. If TRUE, values without match are reported in -the data frame with a NA. Only available if \code{todf} is TRUE. Default is -set to FALSE.} +\item{reportnomatch}{a logical. If \code{TRUE}, values without match are reported #' in the data frame with a NA. Only available if \code{todf} is \code{TRUE}. Default is +set to \code{FALSE}.} } \value{ A list indicating matched positions for each elements of \code{what}. If no -match is found then \code{NA} is returned. If \code{todf} is TRUE +match is found then \code{NA} is returned. If \code{todf} is \code{TRUE} then a three-columns data frame is returned including values and positions in both \code{what} and \code{where} vectors. } diff --git a/man/gaussianShape.Rd b/man/gaussianShape.Rd index 37bfd74..b2925e3 100644 --- a/man/gaussianShape.Rd +++ b/man/gaussianShape.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/gaussianShape.R \name{gaussianShape} \alias{gaussianShape} -\title{Flexible bell-shaped function.} +\title{Flexible bell-shaped function} \usage{ gaussianShape(x, optx = 0, opty = 1/sqrt(2 * pi), width = 1, pow = 2) @@ -14,7 +14,7 @@ gaussianShape(x, optx = 0, opty = 1/sqrt(2 * pi), width = 1, \item{opty}{extremum value.} -\item{width}{the width of the bell.} +\item{width}{width of the bell.} \item{pow}{a real number.} } @@ -22,8 +22,8 @@ gaussianShape(x, optx = 0, opty = 1/sqrt(2 * pi), width = 1, A vector containing values standing for categories into which elements of x have fallen. } \description{ -The \code{gaussianShape} function computes a personalizable Gaussian function. -Default values are the same as in \code{\link[stats]{dnorm}}. +The \code{gaussianShape()} function computes a personnalisable Gaussian function. +Default values are the same as in \code{\link[stats:dnorm]{stats::dnorm()}}. } \examples{ gaussianShape(0) diff --git a/man/keepWords.Rd b/man/keepWords.Rd index 9706797..3443712 100644 --- a/man/keepWords.Rd +++ b/man/keepWords.Rd @@ -8,21 +8,23 @@ keepWords(string, slc = 1, punct.rm = TRUE, na.rm = FALSE, collapse = NULL) } \arguments{ -\item{string}{Input vector. A character vector or list from which words will be extracted.} +\item{string}{An input character vector or a list from which words will be +extracted.} \item{slc}{Vector of integer indicating the selected positions of the words to be kept.} -\item{punct.rm}{A logical indicating whether punctuation characters should be removed.} +\item{punct.rm}{A logical Should punctuation characters be removed?} -\item{na.rm}{A logical indicating whether missing values should be removed.} +\item{na.rm}{A logical. Should missing values be removed?} -\item{collapse}{An optional character string used to separate selected words. Not \code{NA_character_}.} +\item{collapse}{An optional character string used to separate selected words.} } \value{ A vector of the selected words concatenated for each string. } \description{ -Extract words based on their position in a character string, vectorised over \code{string}. +Extract words based on their position in a character string, vectorised over +\code{string}. } \examples{ strex <- 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.' diff --git a/man/logistic.Rd b/man/logistic.Rd index 5864138..5c5cdee 100644 --- a/man/logistic.Rd +++ b/man/logistic.Rd @@ -17,7 +17,7 @@ logistic2(x, yneg = -1, ypos = 1, lambda = 1, pow = 1, yzer = 0) \item{yneg}{assympotic values when x tends to \code{-Inf}.} -\item{ypos}{assympotic values when x tends to \code{-Inf}.} +\item{ypos}{assympotic values when y tends to \code{-Inf}.} \item{lambda}{scalar coefficient.} @@ -44,6 +44,6 @@ A slightly different version is: } \section{Functions}{ \itemize{ -\item \code{logistic2}: a slighlty different logistic function. +\item \code{logistic2}: A slightly different logistic function. }} diff --git a/man/multiMatch.Rd b/man/multiMatch.Rd index 2fab7ce..51a40a9 100644 --- a/man/multiMatch.Rd +++ b/man/multiMatch.Rd @@ -17,11 +17,11 @@ matched in the given character vector, see \code{regexec}.} A vector of character strings matching \code{pattern} argument. } \description{ -Seek all elements that match a given pattern within a character strings. +Seek all elements matching a given pattern in a character strings. } \details{ -\code{multiMatch} is essentially a wrapper around some regex functions that -ease their usage. +\code{multiMatch} is essentially a wrapper around \code{\link[base:regexec]{base::regexec()}} and +\code{\link[base:regmatches]{base::regmatches()}} to find more than one match. } \examples{ multiMatch('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do diff --git a/man/packagesUsed.Rd b/man/packagesUsed.Rd index bd5c7e7..89ea984 100644 --- a/man/packagesUsed.Rd +++ b/man/packagesUsed.Rd @@ -7,7 +7,8 @@ packagesUsed(vc_pkg) } \arguments{ -\item{vc_pkg}{a vector of string characters including the names of the package to be added.} +\item{vc_pkg}{a vector of string characters including package names to be +added.} } \value{ A data frame of two columns. First is the name of the package; second the version installed. diff --git a/man/squaretize.Rd b/man/squaretize.Rd index ef54b68..c57eede 100644 --- a/man/squaretize.Rd +++ b/man/squaretize.Rd @@ -17,7 +17,8 @@ squaretize(x, fill = 0, reorder = TRUE) A square matrix. } \description{ -Add missing rows or columns based on names and Duplicates rows and columns of a given a data frame. +Add missing rows or columns based on names and Duplicates rows and columns +of a given a data frame. } \examples{ mat <- matrix(1:12, 3, 4) diff --git a/man/whichIs.Rd b/man/whichIs.Rd index 7107e00..9290bfd 100644 --- a/man/whichIs.Rd +++ b/man/whichIs.Rd @@ -13,7 +13,7 @@ whichIs(x, y, isPattern = FALSE, ...) \item{isPattern}{should x be considered as a vector of patterns?} -\item{...}{further arguments to be passed to \code{\link[=which]{which()}}.} +\item{...}{further arguments to be passed to \code{\link[base:which]{base::which()}}.} } \value{ A list of positions. Each element corresponds to the matches for a specific x value.