(This is a general-purpose function and works on many types of objects with some NAs. The object must support operations: sum, method (e.g. mean), and subsetting via []).
1 | MPimputeNAs(x, method = mean)
|
x |
matrix or dist object |
method |
function, is applied on x to find the imputed values. This function must be able to perform method(x, na.rm=TRUE) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.