Returning the changed value as in Erik's answer is probably the
most common and R-like solution but here are two others. The
assign/get approach is perhaps the closest to what you are asking
for.
# replacement function approach
# replacement function - rhs is formula whose response is assigned t
I think ONE answer to what you actually want to do might be
f <- function(dataf, col1 = "column1", col2 = "column2") {
dataf[[col1]] <- dataf[[col2]] # just as an example
dataf
}
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.o
2 matches
Mail list logo