SyntaxFix
Write A Post
Hire A Developer
Questions
You can use a for loop:
for (i in 1:nrow(df)) { df$col3[i] <- df$col1[i] + df$col2[i] }