Hello - I have read about a function, replace.df(), that is available in base R. It seems ideal since it would allow me to replace specific columns in one data frame with columns in another data frame, while keeping all other columns intact. The problem is that replace.df() does not seem to exist as a function. Can anyone confirm this or provide the library in which it is located? If it does not exist, is there another way to perform this column specific replacement?
practice <- read.csv("data.csv", header=T) practice1 <- aggregate(practice[, c(8,9,10,11,12,27,28)], by=list(practice$codenumber), FUN=function(x) sub("(.*):", "\\1.", x)) practice2 <- replace.df(practice, practice1, by=c("codenumber"), cols=c(8,9,10,11,12,27,28)) >>Error: could not find function "replace.df" Thank you. Alecia [[alternative HTML version deleted]] ______________________________________________ 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.