mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2024-10-30 11:31:52 +01:00
33 lines
819 B
R
33 lines
819 B
R
% 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{
|
|
d2w(c(2:8, 21))
|
|
d2w(data.frame(2:7, 3:8, 1), lang = "da", neutrum = TRUE)
|
|
|
|
## If everything=T, also larger numbers are reduced.
|
|
## Elements in the list are same length as input
|
|
d2w(list(2:8, c(2, 6, 4, 23), 2), everything = TRUE)
|
|
|
|
}
|