I want to replace all numeric values in a column in my data frame with a string value. The following doesn't seem to work.
df <- within(df, myCol[is.numeric(myCol)] <- 'NOTMISSING')
Even though the df has some values as NA and others as numbers, all values are being replaced with NOTMISSING.
df <- within(df, myCol[is_numeric(myCol)] <- 'NOTMISSING')
Any pointers highly appreciated.