r - Unable to reference an object in a variable within colnames -
i unable reference object contained in variable "symb" within colnames function. example:
symb <- "ibm" colnames(paste0(symb)) <- c("open","high","low","close","volume","adjusted")
if understand question correctly, name columns of data frame called ibm, , variable symb character vector contains string "ibm". if so, might try
df <- get(symb) colnames(df) <- c("open","high","low","close","volume","adjusted") assign(symb, df)
Comments
Post a Comment