Hi All,
I'm trying to use the crunch package to exclude certain rows from my dataset. I found a simple code online and tried to make it work with my data but I'm getting an error message. The original online solution was:
dim(ds)
exclusion(ds) <-ds$perc_skipped > 15
exclusion(ds)
dim(ds)
I tried:
library(crunch)
dim(all_data_merged)
exclusion(all_data_merged) <- all_data_merged$completeness > 1
exclusion(all_data_merged)
dim(all_data_merged)
I get the error message: Error in exclusion(all_data_merged) : is.dataset(x) is not TRUE
I don't know what this means, it recognizes my dataset and executes the dim(all_data_merged) command with no trouble.
My goal is to be able to run summary statistics on my data without the rows that have the value of 1 in the completeness column. I don't want to delete those rows because I will need to run some statistics on them separately.
Would it be simpler to use the dplyr(filter) function?
Any help would be greatly appreciated!