major update and first official launch. CRAN is waiting.
Some checks are pending
pkgdown.yaml / pkgdown (push) Waiting to run

This commit is contained in:
Andreas Gammelgaard Damsbo 2024-10-10 12:14:41 +02:00
commit 3b035ab06f
218 changed files with 1758 additions and 410523 deletions

20
man/file_extension.Rd Normal file
View file

@ -0,0 +1,20 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prioritized_grouping.R
\name{file_extension}
\alias{file_extension}
\title{Title}
\usage{
file_extension(filenames)
}
\arguments{
\item{filenames}{character vector of file name. Splits at the last '.'.}
}
\value{
character vector of extension
}
\description{
Title
}
\examples{
file_extension("data/prioritized_sample.csv")
}

42
man/grouping_plot.Rd Normal file
View file

@ -0,0 +1,42 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prioritized_grouping.R
\name{grouping_plot}
\alias{grouping_plot}
\title{Assessment performance overview}
\usage{
grouping_plot(
data,
columns = NULL,
overall = FALSE,
viridis.option = "D",
viridis.direction = -1
)
}
\arguments{
\item{data}{A "prioritized_groups_list" class list from
'prioritized_grouping()'}
\item{columns}{number of columns in plot}
\item{overall}{logical to only print overall groups mean priority/cost}
\item{viridis.option}{option value passed on to 'viridisLite::viridis'.
Default="D".}
\item{viridis.direction}{direction value passed on to 'viridisLite::viridis'.
Default=-1.}
}
\value{
ggplot2 list object
}
\description{
The function plots costs of grouping for each subject in every group.
Performance measures printed are fill: fraction of filling relative to the
capacity specified; mean: mean priority/cost in group; n: number of subjects
in the group.
}
\examples{
#read.csv(here::here("data/prioritized_sample.csv")) |>
# prioritized_grouping(cap_classes = sample(4:12, 17, TRUE)) |>
# grouping_plot()
}

View file

@ -0,0 +1,24 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prioritized_grouping.R
\name{plot.prioritized_groups_list}
\alias{plot.prioritized_groups_list}
\title{Plot extension for easy groupings plot}
\usage{
\method{plot}{prioritized_groups_list}(data, ...)
}
\arguments{
\item{data}{data of class 'prioritized_groups_list'}
\item{...}{passed on to 'grouping_plot()'}
}
\value{
ggplot2 list object
}
\description{
Plot extension for easy groupings plot
}
\examples{
read.csv(here::here("data/prioritized_sample.csv")) |>
prioritized_grouping() |>
plot(overall = TRUE, viridis.option="D",viridis.direction=-1)
}

View file

@ -0,0 +1,40 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prioritized_grouping.R
\name{prioritized_grouping}
\alias{prioritized_grouping}
\title{Solve grouping based on priorities or costs.}
\usage{
prioritized_grouping(
data,
cap_classes = NULL,
excess_space = 20,
pre_grouped = NULL,
seed = 6293812
)
}
\arguments{
\item{data}{data set in wide format. First column should bi ID, then one column
for each group containing cost/priorities.}
\item{cap_classes}{class capacity. Numeric vector length 1 or length=number
of groups. If NULL equal group sizes are calculated. Default is NULL.}
\item{excess_space}{allowed excess group fill in percentage. Default is 20.
Supplied group capacities will be enlarged by this factors and rounded up.}
\item{pre_grouped}{Pre grouped data set. Optional. Should contain two
columns, 'id' and 'group', with 'group' containing the given group index.}
\item{seed}{specify a seed value. For complex problems.}
}
\value{
list of custom class 'prioritized_groups_list'
}
\description{
Solve grouping based on priorities or costs.
}
\examples{
prioritized_grouping(
data=read.csv(here::here("data/prioritized_sample.csv")),
pre_grouped=read.csv(here::here("data/pre_grouped.csv"))) |> plot()
}