I HAVE a dataframe named DF which has about 16 columns, out of which in 1 column named admit_dx, in which I would like to do string replacement by str_replace()
from stringr
package written below.
DF <- str_replace(DF$admit_dx, ';', '')
The above statement does my job while other columns went away from the dataframe. Please, anyone can suggest how to retain other columns while making changes in one particular column of the dataframe? (Note: I don't want to the modified column with other unaffected columns into a separate dataframe).