r.diff: A(nother) p-hacking tool

Description Usage Arguments Note Examples

View source: R/r.diff.R

Description

it performs correlation tests on numerical variables from a data frame. It performs correlations divided by groups and, along a plot, it gives back also the difference between Rs numbers

Usage

1
2
r.diff(dataset, group, select = "",
       Show = 40, sort_by = c("r.all", "difference"))

Arguments

dataset

A data frame that contains numeric variables. Only numeric vector are taken.

group

The group by which t.tests are performed. it must be a factor of 2 items, or a continuous numeric variable that will be coerced into a 2-item factor by median split

select

Select only one variable (correlating with others) to show.

Show

how many correlations are plotted.

sort_by

the data frame can be sorted by the difference between the two r ('difference') or by the overall r (all observations from the two groups; 'r.all').

Note

CAUTION! It automatically stores a list named "X" in the global environment

Examples

1
2
mtcars$vs.F <- as.factor(mtcars$vs)
r.diff(mtcars, mtcars$vs.F)        # it automatically stores a list named "X" in the global environment

alemiani/explora documentation built on May 28, 2019, 4:54 p.m.