Learn R Programming

rfml (version 0.1.0)

cor,ml.data.frame,ANY-method: Correlation Matrix

Description

Returns the Pearson correlation coefficient matrix of all numeric fields in a ml.data.frame

Usage

"cor"(x, y = NULL, use = NULL, method = NULL)

Arguments

y
not used when doing a matrix
use
not implemented
method
not implemented

Value

The correlation coefficient matrix

Details

The function eliminates all fields pairs for which either the first element or the second element is empty. After the elimination, if the length of the input is less than 2, the function returns the empty sequence. After the elimination, if the standard deviation of the first column or the standard deviation of the second column is 0, the function returns the empty sequence.

Examples

Run this code
## Not run: 
#  library(rfml)
#  locConn <- ml.connect()
#  # create a ml.data.frame based on a search
#  mlIris <- ml.data.frame(locConn, collection = "iris")
#  # return the correlation matrix
#  cor(mlIris)
# ## End(Not run)

Run the code above in your browser using DataLab