I have a dataframe that has two columns and I want to replace some string from the first column by the second column. In the dataframe below, I want the 'em' tag to be replaced by 'a' tag with the url on the ulrs column.
df1 = data.frame(text = c("I like <em'>Rstudio</em> very much",
"<em'> Anaconda</em> is an amazing data science tool"),
urls = c('https://www.rstudio.com/', 'https://anaconda.org/'))
I am looking for a vector like below.
text = c("I like <a href = 'https://www.rstudio.com/'>Rstudio</a> very much",
"<a href = 'https://anaconda.org/'> Anaconda</a> is an amazing data science tool")