summary.quanti: A summary.quanti Function

View source: R/summary.quanti.R

summary.quantiR Documentation

A summary.quanti Function

Description

DESCRIPCIO DE LA FUNCIO

Usage

## S3 method for class 'quanti'
summary(
  data,
  x,
  group = NULL,
  method = "param",
  format = "html",
  nround = 1,
  test = NULL,
  show.pval = TRUE,
  show.all = TRUE,
  show.n = TRUE,
  show.stat = FALSE,
  prep2sum = FALSE,
  prep.tab = FALSE,
  sub.ht = TRUE,
  paired = FALSE,
  idvar = NULL,
  var.tidy = TRUE
)

Arguments

data

data frame, list or environment (or object coercible by 'as.data.frame' to a data frame) containing the variables in the model. If they are not found in 'data', the variables are taken from 'environment(formula)'.

x

numeric or integer variable

group

factor variable. Outcome

method

character string indicating the method to test use; possible values are 'param' or 'nonparam'. Default values is 'param'.

format

a character string; possible values are ht, r, no. Default value is "ht".

nround

integer indicating the number of decimal places (round) or significant digits (signif) to be used. Negative values are allowed (see ‘Details’). Default value is 2.

test

character strin indicating the test to use. Possible values are 'anova','t.test','wilcox','kruskal'. Default value is NULL

show.pval

logical indicating whether p-value of overall groups significance ('p.overall' column) is displayed or not. Default value is TRUE.

show.all

logical indicating whether the 'ALL' column (all data without stratifying by groups) is displayed or not. Default value is FALSE if grouping variable is defined, and FALSE if there are no groups.

show.n

ogical indicating whether number of individuals analyzed for each row-variable is displayed or not in the 'descr' table. Default value is TRUE.

prep2sum

logical value. prepara la taula de sortida per a la funció desc_group. Default value is FALSE

prep.tab

logical value. prepara la taula de sortida per a la funció desc_quanti Default value is FALSE

byrow

logical or NA. Percentage of categorical variables must be reported by rows (TRUE), by columns (FALSE) or by columns and rows to sum up 1 (NA). Default value is FALSE, which means that percentages are reported by columns (withing groups).

Examples

 #  set.seed(1)
 # data <- df <- data.frame(id = c(1:13,1:13), MUT = factor(c(rep("A", 13),rep("B",13))),
 #                          var = rnorm(26))

 # summary.quanti(x = "var", data = df)
 # tab <- summary.quanti(x = "var",group = "MUT",data = df)
 # tab <- summary.quanti(x = "var",group = "MUT",data = df,method = "non-param")
 # tab <- summary.quanti(x = "var",group = "MUT",data = df, idvar = "id", paired =TRUE)
 # tab <- summary.quanti(x = "var",group = "MUT",data = df, idvar = "id", paired =TRUE,method = "non-param")
 # kable(tab$summary,escape = F, row.names = F,align = "c", caption = c(paste(tab$txt_caption, tab$txt_test)) ) %>%
 #   kable_styling(latex_options = c("striped","hold_position", "repeat_header"), full_width = F, font_size = 14) %>%
 #   row_spec(0,background = "#993489", color = "white")
 # mtc_bis %>% summary.quanti( x = qsec)
 # summary.quanti( mtc_bis, x = qsec)$summary %>% kable_ueb()
 # mtc_bis %>% summary.quanti( x = "qsec")
 # summary.quanti( mtc_bis, x = "qsec")
 # mtc_bis %>% summary.quanti( x = qsec, group = vs)
 # summary.quanti( mtc_bis, x = qsec, group = vs)
 # mtc_bis %>% summary.quanti( x = "qsec", group = "vs")
 # summary.quanti( mtc_bis, x = "qsec", group = "vs")

uebvhir/anaStatsUEB documentation built on May 6, 2023, 3:46 a.m.