Currently I have a column containing these special characters:
N700��
N713��
And I was wondering if there was a way to remove them?
test_df is the name of the dataframe and I'm trying to remove the special characters from these rows using the following:
test_df$TailNum <- gsub("[^[:alnum:][:space:]]", "", test_df$TailNum)
Error in gsub("[^[:alnum:][:space:]]", "", test_df$TailNum) : input string 1 is invalid In addition: Warning message: In gsub("[^[:alnum:][:space:]]", "", test_df$TailNum) : unable to translate 'N700' to a wide string
test_df[!grepl("[^[:alnum:][:space:]]", test_df$TailNum), ]
Error in df[!grepl("[^[:alnum:][:space:]]", test_df$TailNum), ] : object of type 'closure' is not subsettable In addition: There were 50 or more warnings (use warnings() to see the first 50)
For output: