Description Usage Arguments Value Examples
dropAllNA will drop all columns, rows, or both, where all entries in the data.frame are NA
1 |
data |
data.frame containing data |
axis |
which axis to remove from: 'row' removes all rows where all columns have missing data. 'col' removes all columns where all rows are NA. 'all' does both. |
data frame with the rows/columns missing
1 2 3 4 5 6 7 8 | #df <- data.frame(a = c(1, 2, NA, 4),
# b = c(5, 6, NA, 7),
# c = c(NA, NA, NA, NA),
# d = c(8, 9, NA, 10))
#dropAllNA(df) #default is 'all'
#dropAllNA(df, 'all') #remove rows and cols with missing
#dropAllNA(df, 'col') #remove cols with missing
#dropAllNA(df, 'row') #remove rows with missing
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.