powered by
This function takes a dataframe as input and removes any rows that have NA as values.
drop.na.data(df, vars=names(df))
A subset of 'df' that only has non-missing values in the columns specified by 'vars'
a dataframe
sub set of variable (column) names to use in searching for missing values
path <- system.file("extdata","primate-example.data.csv", package="mmodely") data <- read.csv(path, row.names=1) df.nona <- drop.na.data(data, vars=names(df))
Run the code above in your browser using DataLab