Learn R Programming

psych (version 1.2.8)

psych.misc: Miscellaneous helper functions for the psych package

Description

This is a set of minor, if not trivial, helper functions. lowerCor finds the correlation of x variables and then prints them using lowerMat which is a trivial, but useful, function to round off and print the lower triangle of a matrix.

progressBar prints out ... as a calling routine (e.g., tetrachoric works through a tedious calculation.

Usage

psych.misc()
lowerCor(x,digits=2,use="pairwise",method="pearson")
lowerMat(R, digits = 2)
progressBar(value,max,label=NULL)

Arguments

R
A rectangular matrix or data frame (probably a correlation matrix)
x
A data matrix or data frame
digits
round to digits
use
Should pairwise deletion be done, or one of the other options to cor
method
"pearson", "kendall", "spearman"
value
the current value of some looping variable
max
The maximum value the loop will achieve
label
what function is looping

Value

  • The lower triangle of a matrix, rounded to digits with titles abbreviated to digits + 3 (lowerMat) or a series of dots (progressBar).

    lowerCor prints the lower diagonal correlation matrix but returns (invisibly) the full correlation matrix found with the use and method parameters.

Examples

Run this code
lowerMat(Thurstone)
lowerCor(bfi[1:10])

Run the code above in your browser using DataLab