##
## Computes: vector variable lengths, angles between vector variables and
## variable correlations from data.frame or matrix objects (n x p)
## n = rows (objects)
## p = columns (variables)
##
dt <- dt.tools(iris,
2) # No numeric columns are removed in dt.tools
# Exploring the object 'bp' created by the function 'var.tools'
class(dt)
names(dt)
str(dt)
dt$length
dt$angle
dt$r
dt
# Checking the determinations
(iris.tools <- round(dt.tools(iris,
center=2)$r,
5))
(iris.obsv <- round(cor(iris[-5]),
5))
all(iris.tools == iris.obsv)
Run the code above in your browser using DataLab