> Hi: > I want to add a constant to an existing col of the data.frame. I > have the following dataset: > > > structure(list(x = c(1, 1, 1, 1, 1), y = c(1, 1, 1, 1, 1)), .Names = > c("x", > "y"), row.names = c(NA, 5L), class = "data.frame") > > > I want to add a constant to col 1 and col 2 to get the following > data.frame > > structure(list(x = c(2, 2, 2, 2, 2), y = c(3, 3, 3, 3, 3)), .Names = > c("x", > "y"), row.names = c(NA, 5L), class = "data.frame") > > > Thanks, > Brijesh
-------------------------------------------------------------------------- This message w/attachments (message) may be privileged, ...{{dropped:30}} ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.