fillCols | R Documentation |
Looks for columns in a data set that have a single unique non-missing value
and fills in all NA
with that value
fillCols(data)
data |
data.frame |
data.frame
Devin S. Johnson
#library(crawl) data1 <- data.frame(constVals=rep(c(1,NA),5), vals=1:10) data1[5,2] <- NA data1 data2 <- fillCols(data1) data2 mat1 <- matrix(c(rep(c(1,NA),5), 1:10), ncol=2) mat1[5,2] <- NA mat1 mat2 <- fillCols(mat1) mat2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.