unit test match funs
Gitea Organization/civilyticsR/pipeline/head This commit looks good

This commit is contained in:
Jared Knowles
2023-07-19 17:37:18 -04:00
parent a0b4abdb9e
commit 9acebb5133
8 changed files with 138 additions and 1 deletions
+23
View File
@@ -0,0 +1,23 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/join_utilities.R
\name{match_test}
\alias{match_test}
\title{Test the join between two sets of identifiers}
\usage{
match_test(x, y, distinct = TRUE)
}
\arguments{
\item{x}{a vector of identifiers to check against y}
\item{y}{a vector of identifiers to check against x}
\item{distinct}{logical, should duplicate values of x and y be removed before testing}
}
\description{
Test the join between two sets of identifiers
}
\examples{
x <- LETTERS
y <- c(letters, LETTERS)
match_test(x, y)
}
+21
View File
@@ -0,0 +1,21 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{na_sum}
\alias{na_sum}
\title{Sum a numeric that contains missing values and ignore missing values}
\usage{
na_sum(x)
}
\arguments{
\item{x}{a numeric vector}
}
\value{
the sum, ignoring any missing values
}
\description{
Sum a numeric that contains missing values and ignore missing values
}
\examples{
x <- c(2, NA, 4, 9)
na_sum(x) # 15
}