I want to remove rows in the dataset where a column 'ABC' contains NA,
so I write:
dataset = dataset[dataset$ABC !='NA',]
the result:
instead of removing those rows that column 'ABC' is NA, it changes every column of those rows to NA
Example:
row AAA BBB ABC
1 3 2 1
2 3 3 NA
3 1 2 3
result:
row AAA BBB ABC
1 3 2 1
2 NA NA NA
3 1 2 3
where am I wrong? Thanks