constant | R Documentation |
Helper function for imputing constants
constant(n = 1)
n |
The value to return |
Returns a function that always returns the value of n.
A function that when used simply returns n.
Jared P. Lander
constant(4)(1:10)
theDF <- data.frame(A=1:10, B=1:10, C=1:10)
theDF[c(1, 4, 6), c(1)] <- NA
theDF[c(3, 4, 8), c(3)] <- NA
simple.impute(theDF, constant(4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.