mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
This commit is contained in:
parent
b1c44a75ef
commit
2249ba06db
11 changed files with 54 additions and 8 deletions
|
|
@ -18,5 +18,5 @@ data.frame
|
|||
Factorize variables in data.frame
|
||||
}
|
||||
\examples{
|
||||
factorize(mtcars,names(mtcars))
|
||||
factorize(mtcars, names(mtcars))
|
||||
}
|
||||
|
|
|
|||
24
man/is_identical_to_previous.Rd
Normal file
24
man/is_identical_to_previous.Rd
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/helpers.R
|
||||
\name{is_identical_to_previous}
|
||||
\alias{is_identical_to_previous}
|
||||
\title{Test if element is identical to the previous}
|
||||
\usage{
|
||||
is_identical_to_previous(data, no.name = TRUE)
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{data. vector, data.frame or list}
|
||||
|
||||
\item{no.name}{logical to remove names attribute before testing}
|
||||
}
|
||||
\value{
|
||||
logical vector
|
||||
}
|
||||
\description{
|
||||
Test if element is identical to the previous
|
||||
}
|
||||
\examples{
|
||||
c(1, 1, 2, 3, 3, 2, 4, 4) |> is_identical_to_previous()
|
||||
mtcars[c(1, 1, 2, 3, 3, 2, 4, 4)] |> is_identical_to_previous()
|
||||
list(1, 1, list(2), "A", "a", "a") |> is_identical_to_previous()
|
||||
}
|
||||
|
|
@ -16,11 +16,15 @@ data of same class as input
|
|||
Remove empty/NA attributes
|
||||
}
|
||||
\examples{
|
||||
ds <- mtcars |> lapply(\(.x) REDCapCAST::set_attr(.x, label = NA, attr = "label")) |> dplyr::bind_cols()
|
||||
ds <- mtcars |>
|
||||
lapply(\(.x) REDCapCAST::set_attr(.x, label = NA, attr = "label")) |>
|
||||
dplyr::bind_cols()
|
||||
ds |>
|
||||
remove_empty_attr() |>
|
||||
str()
|
||||
mtcars |> lapply(\(.x) REDCapCAST::set_attr(.x, label = NA, attr = "label")) |> remove_empty_attr() |>
|
||||
mtcars |>
|
||||
lapply(\(.x) REDCapCAST::set_attr(.x, label = NA, attr = "label")) |>
|
||||
remove_empty_attr() |>
|
||||
str()
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@ Easily subset by data type function
|
|||
}
|
||||
\examples{
|
||||
default_parsing(mtcars) |> subset_types("ordinal")
|
||||
default_parsing(mtcars) |> subset_types(c("dichotomous", "ordinal", "categorical"))
|
||||
default_parsing(mtcars) |> subset_types(c("dichotomous", "categorical"))
|
||||
#' default_parsing(mtcars) |> subset_types("factor",class)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue