mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 12:37:30 +02:00
This commit is contained in:
parent
e980edc149
commit
3f31cf38b8
11 changed files with 149 additions and 20 deletions
|
|
@ -2,26 +2,31 @@
|
|||
% Please edit documentation in R/regression_model.R
|
||||
\name{data_type}
|
||||
\alias{data_type}
|
||||
\title{Data type assessment}
|
||||
\title{Data type assessment.}
|
||||
\usage{
|
||||
data_type(data)
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{data}
|
||||
\item{data}{vector or data.frame. if data frame, each column is evaluated.}
|
||||
}
|
||||
\value{
|
||||
outcome type
|
||||
}
|
||||
\description{
|
||||
Data type assessment
|
||||
These are more overall than the native typeof. This is used to assess a more
|
||||
meaningful "clinical" data type.
|
||||
}
|
||||
\examples{
|
||||
mtcars |>
|
||||
default_parsing() |>
|
||||
lapply(data_type)
|
||||
mtcars |>
|
||||
default_parsing() |>
|
||||
data_type()
|
||||
c(1, 2) |> data_type()
|
||||
1 |> data_type()
|
||||
c(rep(NA, 10)) |> data_type()
|
||||
sample(1:100, 50) |> data_type()
|
||||
factor(letters[1:20]) |> data_type()
|
||||
as.Date(1:20) |> data_type()
|
||||
}
|
||||
|
|
|
|||
25
man/data_type_filter.Rd
Normal file
25
man/data_type_filter.Rd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/helpers.R
|
||||
\name{data_type_filter}
|
||||
\alias{data_type_filter}
|
||||
\title{Filter function to filter data set by variable type}
|
||||
\usage{
|
||||
data_type_filter(data, type)
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{data frame}
|
||||
|
||||
\item{type}{vector of data types (recognised: data_types)}
|
||||
}
|
||||
\value{
|
||||
data.frame
|
||||
}
|
||||
\description{
|
||||
Filter function to filter data set by variable type
|
||||
}
|
||||
\examples{
|
||||
default_parsing(mtcars) |> data_type_filter(type=c("categorical","continuous")) |> attributes()
|
||||
\dontrun{
|
||||
default_parsing(mtcars) |> data_type_filter(type=c("test","categorical","continuous"))
|
||||
}
|
||||
}
|
||||
17
man/data_types.Rd
Normal file
17
man/data_types.Rd
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/regression_model.R
|
||||
\name{data_types}
|
||||
\alias{data_types}
|
||||
\title{Recognised data types from data_type}
|
||||
\usage{
|
||||
data_types()
|
||||
}
|
||||
\value{
|
||||
vector
|
||||
}
|
||||
\description{
|
||||
Recognised data types from data_type
|
||||
}
|
||||
\examples{
|
||||
data_types()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue