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

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -