r - Replacing character values with NA in a data frame -


I have a data frame (in random places) a character value ( "foo" ) That I want to replace with NA

What is the best way to do this in the entire data frame?

this:

  df [df == "foo"] & Lt; - NA  

Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -