[R] dataframe question
Vadlamani, Satish {FLNA}
SATISH.VADLAMANI at fritolay.com
Mon Feb 8 01:51:29 CET 2010
Folks:
Good day. Please see the code below. three_wk_out is a dataframe with columns wk1 through wk209. I want to change the format of the columns. I am trying the code below but it does not work. I need $week in the for loop interpreted as wk1, wk2, etc. Could you please help? Thanks.
Satish
R code below
week_list <- paste("wk",c(1:209),sep="")
for (week in week_list)
{
three_wk_out$week <- as.numeric(three_wk_out$week)
}
More information about the R-help
mailing list