I feel a bit embarrassed as I am trying to add two columns in R to get the product.
I have tried
sum(col1,col2)
but this returns
You can use a for loop:
for (i in 1:nrow(df)) { df$col3[i] <- df$col1[i] + df$col2[i] }