Learn R Programming

rfml (version 0.1.0)

var,ml.col.def-method: Variance

Description

Returns the sample variance of a ml.data.frame field.

Usage

"var"(x, na.rm = FALSE)

Arguments

x
a ml.data.frame field.
na.rm
not used currently

Value

The sample variance

Details

The function returns a empty value if the number of rows of the ml.data.frame that x belongs to is less than 2.

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 variance
#  var(mlIris$Sepal.Length)
# ## End(Not run)

Run the code above in your browser using DataLab