REDCapCAST/man/d2w.Rd

33 lines
819 B
Plaintext
Raw Permalink Normal View History

2023-07-04 16:03:06 +02:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.r
\name{d2w}
\alias{d2w}
\title{Convert single digits to words}
\usage{
d2w(x, lang = "en", neutrum = FALSE, everything = FALSE)
}
\arguments{
\item{x}{data. Handle vectors, data.frames and lists}
\item{lang}{language. Danish (da) and English (en), Default is "en"}
\item{neutrum}{for numbers depending on counted word}
\item{everything}{flag to also split numbers >9 to single digits}
}
\value{
returns characters in same format as input
}
\description{
Convert single digits to words
}
\examples{
2024-02-06 14:15:36 +01:00
d2w(c(2:8, 21))
d2w(data.frame(2:7, 3:8, 1), lang = "da", neutrum = TRUE)
2023-07-04 16:03:06 +02:00
## If everything=T, also larger numbers are reduced.
## Elements in the list are same length as input
2024-02-06 14:15:36 +01:00
d2w(list(2:8, c(2, 6, 4, 23), 2), everything = TRUE)
2023-07-04 16:03:06 +02:00
}