knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = NULL ) Sys.setenv(LANGUAGE = "en") # Force locale
{.pkgdown-devel}
{.pkgdown-release}
{.pkgdown-release}
{.pkgdown-release}
A dependency-free collection of simple functions for cleaning rectangular data. This package allows to detect, count and replace values or discard rows/columns using a predicate function. In addition, it provides tools to check conditions and return informative error messages.
cite <- utils::citation("arkhe") print(cite, bibtex = FALSE)
You can install the released version of arkhe from CRAN with:
install.packages("arkhe")
And the development version from GitHub with:
# install.packages("remotes") remotes::install_github("tesselle/arkhe")
## Load the package library(arkhe) ## Set seed for reproductibility set.seed(12345) ## Create a matrix X <- matrix(sample(1:10, 25, TRUE), nrow = 5, ncol = 5) ## Add NA k <- sample(1:25, 3, FALSE) X[k] <- NA X ## Count missing values in rows count(X, f = is.na, margin = 1) ## Count non-missing values in columns count(X, f = is.na, margin = 2, negate = TRUE) ## Find row with NA detect(X, f = is.na, margin = 1) ## Find column without any NA detect(X, f = is.na, margin = 2, negate = TRUE, all = TRUE) ## Remove row with any NA discard(X, f = is.na, margin = 1, all = FALSE) ## Remove column with any NA discard(X, f = is.na, margin = 2, all = FALSE) ## Replace NA with zeros replace_NA(X, value = 0)
This package provides translations of user-facing communications, like messages, warnings and errors. The preferred language is by default taken from the locale. This can be overridden by setting of the environment variable LANGUAGE
(you only need to do this once per session):
Sys.setenv(LANGUAGE = "<language code>")
Languages currently available are English (en
) and French (fr
).
Please note that the arkhe project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.