diff --git a/tests/testthat/test-value_at.R b/.dev/test-value_at.R similarity index 100% rename from tests/testthat/test-value_at.R rename to .dev/test-value_at.R diff --git a/R/value_at.R b/.dev/value_at.R similarity index 100% rename from R/value_at.R rename to .dev/value_at.R diff --git a/NAMESPACE b/NAMESPACE index 006b33153..d10d1884b 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -317,7 +317,6 @@ export(to_numeric) export(unnormalize) export(unstandardise) export(unstandardize) -export(value_at) export(visualisation_recipe) export(weighted_mad) export(weighted_mean) diff --git a/NEWS.md b/NEWS.md index 9be0338d6..8b6ba88da 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,8 +4,6 @@ NEW FUNCTIONS * `data_summary()`, to compute summary statistics of (grouped) data frames. -* `value_at()`, to extract values at a specific position in a vector or factor. - CHANGES * `data_modify()` gets three new arguments, `.at`, `.if` and `.modify`, to modify diff --git a/_pkgdown.yaml b/_pkgdown.yaml index 01cba4fd5..0062b8a5a 100644 --- a/_pkgdown.yaml +++ b/_pkgdown.yaml @@ -73,7 +73,6 @@ reference: - row_means - weighted_mean - mean_sd - - value_at - title: Convert and Replace Data desc: | diff --git a/man/value_at.Rd b/man/value_at.Rd deleted file mode 100644 index 2d6c05985..000000000 --- a/man/value_at.Rd +++ /dev/null @@ -1,42 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/value_at.R -\name{value_at} -\alias{value_at} -\title{Find the value(s) at a specific position in a variable} -\usage{ -value_at(x, position = 1, default = NULL, remove_na = FALSE) -} -\arguments{ -\item{x}{A vector or factor.} - -\item{position}{An integer or a vector of integers, indicating the position(s) -of the value(s) to be returned. Negative values are counted from the end of -the vector. If \code{NA}, an error is thrown.} - -\item{default}{The value to be returned if the position is out of range.} - -\item{remove_na}{Logical, if \code{TRUE}, missing values are removed before -computing the position. If \code{FALSE}, missing values are included in the -computation.} -} -\value{ -A vector with the value(s) at the specified position(s). -} -\description{ -This function can be used to extract one or more values at a -specific position in a variable. -} -\examples{ -data(mtcars) -# 5th value -value_at(mtcars$mpg, 5) -# last value -value_at(mtcars$mpg, -1) -# out of range, return default -value_at(mtcars$mpg, 150) -# return 2nd and fifth value -value_at(mtcars$mpg, c(2, 5)) -} -\seealso{ -\code{data_summary()} to use \code{value_at()} inside a \code{data_summary()} call. -}