Unable to remove certain junk values from a column in a dataframe

I have a column called as Region in a dataframe which is of character type.It has certain junk values as below which i want to remove:


But when i try to remove using things like subset they don't get removed as follows:

subset(pro_202_data,Region != c("#VALUE!","10.1","10.2","138","145","161"))

i have tried using only != but that also doesn't work.

Please help.

Try this:

subset(pro_202_data, !Region %in% c("#VALUE!","10.1","10.2","138","145","161"))

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.