SyntaxFix
Write A Post
Hire A Developer
Questions
I believe that using "cbind" is the simplest way to add a column to a data frame in R. Below an example:
myDf = data.frame(index=seq(1,10,1), Val=seq(1,10,1)) newCol= seq(2,20,2) myDf = cbind(myDf,newCol)