newcorrtable: Create an empty correlation matrix of a given data.frame

Description Usage Arguments Value Examples

Description

newcorrtable returns an empty correlation matrix of a data.frames columns or rows. Empty means: filled with the numeric value "0". This correlation matrix data.frame can be used to store the results of functions which calculate correlation values for all bivariate relations.

Usage

1

Arguments

matrix

data.frame

dim

switch to define, whether the new correlation matrix should be created for columns or rows.

1 (default): table is created for column (variables) relations.

2: table is created for row (objects) relations.

Value

empty correlation matrix data.frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
testmatrix <- data.frame(c1 = c(5,2,3,8), c2 = c(5,6,7,0), c3 = c(5,6,7,9))

# correlation table is created for the columns of the input data.frame testmatrix
newcorrtable(testmatrix)
newcorrtable(testmatrix, 1)
corrtabcolumns <- newcorrtable(matrix = testmatrix, dim = 1)

# correlation table is created for the rows of the input data.frame testmatrix
newcorrtable(testmatrix, 2)
corrtabrows <- newcorrtable(matrix = testmatrix, dim = 2)

nevrome/varnastats documentation built on May 9, 2019, 10:43 a.m.