library(Hmisc)
impute(BostonHousing$ptratio, mean) # replace with mean
impute(BostonHousing$ptratio, median) # median
impute(BostonHousing$ptratio, 20) # replace specific number
# or if you want to impute manually
BostonHousing$ptratio[is.na(BostonHousing$ptratio)] <- mean(BostonHousing$ptratio, na.rm = T) # not run
Code Example |
---|
R :: r runif |
R :: emf from r plot |
R :: r count rows dataframe |
Rust :: rust take user input |
Rust :: rust reverse for loop |
Rust :: deconstruct hashmap into vecs rust |
Rust :: convert string to i32 rust |
Rust :: rust timestamp |
Rust :: how to open a file rust |
Rust :: String to int in Rust |
Rust :: rust string to f64 |
Rust :: rust char uppercase |
Rust :: how to check for os in rust |
Rust :: rust•armanriazi•borrowchecker•lifetime |
Rust :: rust initialize empty array |
Rust :: rust enum anonymous struct |
Rust :: armanriazi•rust•reference•vs•pointer |
Rust :: armanriazi•rust•mem•leak |
Rust :: rust•armanriazi•static•str |
Rust :: armanriazi•rust•thread•multi•arc•mutex |
Rust :: search in dir rust |
Rust :: rust find type |
Lua :: how to comment multiple lines in lua |
Lua :: luau make debounce |
Lua :: luau how to find value in table |
Lua :: roblox how to get the players mouse |
Lua :: repeat until in lua |
Lua :: lua convert function to string |
Lua :: roblox rotate head with camera |
Lua :: lua pairs |