From 1acdbf7b25dd7196d4d6dbc2eb96c94848a5f0ef Mon Sep 17 00:00:00 2001 From: Jitao David Zhang Date: Wed, 18 Feb 2026 10:17:16 +0100 Subject: [PATCH] add return values for list2incidenceMatrix --- R/list2incidenceMatrix.R | 5 +++-- man/list2incidenceMatrix.Rd | 9 ++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/R/list2incidenceMatrix.R b/R/list2incidenceMatrix.R index 4e573c3..0824f7e 100644 --- a/R/list2incidenceMatrix.R +++ b/R/list2incidenceMatrix.R @@ -1,7 +1,8 @@ #' Convert a list of character strings into an incidence matrix #' -#' @param list A list of character strings, can be unique or redudant -#' @param type How the values of the indidence matrix will be filled, see details. +#' @param list A list of character strings, can be unique or redundant +#' @param type How the values of the incidence matrix will be filled, see details. +#' @return An incidence matrix, containing either binary (\code{TRUE/FALSE}) or integer values. #' #' Type 'binary' will produce a logical matrix, whereas 'count' will produce a matrix #' where the frequency of the character strings in the list. diff --git a/man/list2incidenceMatrix.Rd b/man/list2incidenceMatrix.Rd index b77bfc0..ef7a15d 100644 --- a/man/list2incidenceMatrix.Rd +++ b/man/list2incidenceMatrix.Rd @@ -7,12 +7,15 @@ list2incidenceMatrix(list, type = c("binary", "count")) } \arguments{ -\item{list}{A list of character strings, can be unique or redudant} +\item{list}{A list of character strings, can be unique or redundant} -\item{type}{How the values of the indidence matrix will be filled, see details. +\item{type}{How the values of the incidence matrix will be filled, see details.} +} +\value{ +An incidence matrix, containing either binary (\code{TRUE/FALSE}) or integer values. Type 'binary' will produce a logical matrix, whereas 'count' will produce a matrix -where the frequency of the character strings in the list.} +where the frequency of the character strings in the list. } \description{ Convert a list of character strings into an incidence matrix