search for: 324803

Displaying 1 result from an estimated 1 matches for "324803".

Did you mean: 24803
2010 Jun 17
1
Column name defined by function variable
Hi all, probably a simple problem for you but I am stuck. This simple function adds columns (with differing length) to data frames: add.col <- function(df, new.col) { n.row <- dim(df)[1] length(new.col) <- n.row cbind(df, new.col) } Now I would like to extend that method. A new parameter 'name' shouild allow people to pass in a name for that new column. Is that possible and