Nothing
AddVariance <-
function(x, k, parameters) {
#
# Adds variance if necessary.
#
# Args:
# x: Data (matrix).
# k: Number of variables (scalar).
# parameters: Data and program parameters (list).
#
# Returns:
# Data with ncessary variance added (matrix).
#
for (i in 1:k) {
if (var(x[, i]) == 0) {
x[, i] <- x[, i] + rnorm(parameters$n, 0, .0001)
cat(" * variance added to variable", i, "\n")
}
}
return(x)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.