quickCor: quickCor Function

View source: R/quickCor.R

quickCorR Documentation

quickCor Function

Description

La funciĆ³n quickCor

Usage

#' @usage \method{names}{mtc_bis}(x) <- value

Arguments

dat

an optional matrix or data frame (or similar: see model.frame) containing the variables in the formula formula.

x, y

numeric vectors of data values. x and y must have the same length.

nround

integer indicating the number of decimal places (round).

main

an overall title for the plot.

xtab

A logical value indicating whether the output is a xtable

pos

a character string indicating the legend location. Options: "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center".

sz.xtab

A character vector that is inserted just before the tabular environment starts. This can be used to set the font size and a variety of other table settings. Initial backslashes are automatically prefixed, if not supplied by user. Default value is NULL.

pearson

A logical value indicating whether the text output is Pearson. Default value is TRUE.

corplot

A logical value indicating whether the output is a plot. Default value is TRUE.

cex.txt

character expansion factor. NULL and NA are equivalent to 0.8. This is an absolute measure, not scaled by par("cex") or by setting par("mfrow") or par("mfcol"). Can be a vector.

cex.main

settings for main- and sub-title and axis annotation, see title and par.

xtab.type

Type of table to produce. Possible values for type are "latex" or "html". Default value is "latex".

sub

a sub title for the plot.

lm.fit

A logical value indicating if show a linear regression line. Default value is TRUE.

pos.text

on which MARgin line, starting at 0 counting outwards.

cor_cut

integer indicating the number cut relevant correlation

A

character vector that is inserted just before the tabular environment starts. This can be used to set the font size and a variety of other table settings. Initial backslashes are automatically prefixed, if not supplied by user. Default value is "small".

Value

results:

coeff:

plot

Author(s)

Miriam Mota miriam.mota@vhir.org

Examples

quickCor(x = "mpg", y = "hp", dat = mtc_bis,
nround = 3, xtab = FALSE, pearson = TRUE, corplot = TRUE, sub = "subtitle")
# Spearman correlation
quickCor(x = "mpg", y = "hp", dat = mtc_bis,
nround = 3, xtab = FALSE, pearson = FALSE, corplot = TRUE, sub = "subtitle")
# No es mostra recta de regressio
quickCor(x = "mpg", y = "hp", dat = mtc_bis,
nround = 3, xtab = FALSE, pearson = TRUE, corplot = TRUE, sub = "subtitle", lm.fit =FALSE)
# canviem la posicio de la llegenda
quickCor(x = "mpg", y = "hp", dat = mtc_bis,
nround = 3, xtab = TRUE, pearson = TRUE, corplot = TRUE, sub = "subtitle",
pos = "bottomright")

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