Is there a way to convert column values to html tags? For example, I have these columns in a dataframe.
dput(df)
structure(list(ColA = c("1", "1,2"), ColB = c("asd", "asd,dfdsf"
)), class = "data.frame", row.names = c(NA, -2L))
df
ColA ColB
1 asd
1,2 asd,dfdsf
Expected output
ColA ColB Colc
1 asd <table border=1><tr><th>Ratings</th><th>Text</th></tr><tr><td>1</td><td>asd</td></tr><tr></tr></table
1,2 asd,dfdsf <table border=1><tr><th>Ratings</th><th>Text</th></tr><tr><td>1</td><td>asd</td></tr><tr><td>2</td><td>dfdsf</td></tr></table>
The values in Colc are the values in ColA and ColB. However, I am trying to make a table from it. Can anyone help me?