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

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -