decumented package

This commit is contained in:
Andreas Gammelgaard Damsbo 2025-01-16 11:45:04 +01:00
commit 49695a5f41
No known key found for this signature in database
13 changed files with 284 additions and 3 deletions

25
man/add_class_icon.Rd Normal file
View file

@ -0,0 +1,25 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-summary.R
\name{add_class_icon}
\alias{add_class_icon}
\title{Convert class grid column to icon}
\usage{
add_class_icon(grid, column = "class")
}
\arguments{
\item{grid}{grid}
\item{column}{column}
}
\value{
datagrid
}
\description{
Convert class grid column to icon
}
\examples{
mtcars |>
overview_vars() |>
toastui::datagrid() |>
add_class_icon()
}

32
man/add_sparkline.Rd Normal file
View file

@ -0,0 +1,32 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-summary.R
\name{add_sparkline}
\alias{add_sparkline}
\title{Add sparkline to datagrid}
\usage{
add_sparkline(
grid,
column = "vals",
color.main = "#2a8484",
color.sec = "#84EF84"
)
}
\arguments{
\item{grid}{grid}
\item{column}{clumn to transform}
}
\value{
datagrid
}
\description{
Add sparkline to datagrid
}
\examples{
grid <- mtcars |>
default_parsing() |>
overview_vars() |>
toastui::datagrid() |>
add_sparkline()
grid
}

View file

@ -0,0 +1,22 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-summary.R
\name{create_overview_datagrid}
\alias{create_overview_datagrid}
\title{Create a data overview datagrid}
\usage{
create_overview_datagrid(data)
}
\arguments{
\item{data}{data}
}
\value{
datagrid
}
\description{
Create a data overview datagrid
}
\examples{
mtcars |>
overview_vars() |>
create_overview_datagrid()
}

29
man/data-summary.Rd Normal file
View file

@ -0,0 +1,29 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-summary.R
\name{data-summary}
\alias{data-summary}
\alias{data_summary_ui}
\alias{data_summary_server}
\title{Data summary module}
\usage{
data_summary_ui(id)
data_summary_server(id, data, color.main, color.sec)
}
\arguments{
\item{id}{id}
\item{data}{data}
\item{color.main}{main color}
\item{color.sec}{secondary color}
}
\value{
Shiny ui module
shiny server module
}
\description{
Data summary module
}

21
man/is_consecutive.Rd Normal file
View file

@ -0,0 +1,21 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-summary.R
\name{is_consecutive}
\alias{is_consecutive}
\title{Checks if elements in vector are equally spaced as indication of ID}
\usage{
is_consecutive(data)
}
\arguments{
\item{data}{vector}
}
\value{
logical
}
\description{
Checks if elements in vector are equally spaced as indication of ID
}
\examples{
1:10 |> is_consecutive()
sample(1:100,40) |> is_consecutive()
}

17
man/m_datafileUI.Rd Normal file
View file

@ -0,0 +1,17 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/file-import-module.R
\name{m_datafileUI}
\alias{m_datafileUI}
\title{Shiny UI module to load a data file}
\usage{
m_datafileUI(id)
}
\arguments{
\item{id}{id}
}
\value{
shiny UI
}
\description{
Shiny UI module to load a data file
}

20
man/overview_vars.Rd Normal file
View file

@ -0,0 +1,20 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-summary.R
\name{overview_vars}
\alias{overview_vars}
\title{Create a data overview data.frame ready for sparklines}
\usage{
overview_vars(data)
}
\arguments{
\item{data}{data}
}
\value{
data.frame
}
\description{
Create a data overview data.frame ready for sparklines
}
\examples{
mtcars |> overview_vars()
}

21
man/remove_na_attr.Rd Normal file
View file

@ -0,0 +1,21 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{remove_na_attr}
\alias{remove_na_attr}
\title{Remove NA labels}
\usage{
remove_na_attr(data, attr = "label")
}
\arguments{
\item{data}{data}
}
\value{
data.frame
}
\description{
Remove NA labels
}
\examples{
ds <- mtcars |> lapply(\(.x) REDCapCAST::set_attr(.x,label=NA,attr = "label"))
ds |> remove_na_attr() |> str()
}

38
man/update-variables.Rd Normal file
View file

@ -0,0 +1,38 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/update-variables-ext.R
\name{update-variables}
\alias{update-variables}
\alias{update_variables_ui}
\alias{update_variables_server}
\title{Select, rename and convert variables}
\usage{
update_variables_ui(id, title = TRUE)
update_variables_server(
id,
data,
height = NULL,
return_data_on_init = FALSE,
try_silent = FALSE
)
}
\arguments{
\item{id}{Module's ID}
\item{title}{Module's title, if \code{TRUE} use the default title,
use \code{NULL} for no title or a \code{shiny.tag} for a custom one.}
\item{data}{a \code{data.frame} or a \code{reactive} function returning a \code{data.frame}.}
\item{height}{Height for the table.}
\item{return_data_on_init}{Return initial data when module is called.}
\item{try_silent}{logical: should the report of error messages be suppressed?}
}
\value{
A \code{\link[shiny:reactive]{shiny::reactive()}} function returning the updated data.
}
\description{
Select, rename and convert variables
}

View file

@ -0,0 +1,31 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/update-variables-ext.R
\name{update_variables_datagrid}
\alias{update_variables_datagrid}
\title{Modified from the datamods pacakge}
\usage{
update_variables_datagrid(
data,
height = NULL,
selectionId = NULL,
buttonId = NULL
)
}
\arguments{
\item{data}{data}
\item{height}{height}
\item{selectionId}{selectionId}
\item{buttonId}{buttonId}
}
\description{
Modified from the datamods pacakge
}
\examples{
mtcars |>
summary_vars() |>
update_variables_datagrid()
}