I am trying to assign data to an existing dataframe with a name generated in a loop. A basic example might be
A = data.frame(a = c(1,2,3), b=c(3,6,2)) for
Maybe you want this:
R> A <- data.frame(a=c(1,2,3), b=c(3,6,2)) R> colnames(A) <- paste("Names", 1:ncol(A), sep="") R> A Names1 Names2 1 1 3 2 2 6 3 3 2 R>
but as Tyler said in the comment, it is not entirely clear what you are asking.