I have a number of files that I have to merge and the name of the dataframe they will merge into is given in a variable. It looks like I got somehow stuck in R naming conventions. A minimum (silly) examples of what I intend to do is below.
Update code updated to be stand alone and added the solution proposed by @DaveArmstrong
tump<-data.frame(n="imp", a=1, b=2)
tamp<-data.frame(n="imp", a=3, b=4)
timp<-data.frame(n="base", a=5, b=6)
# This works
eval(as.name(paste("t" ,tump$n, sep="")))
# Returns timp
# n a b
# 1 base 5 6
#*****************************
#This works
rbind(eval(as.name(paste("t" ,tump$n, sep=""))), tamp)
# Merges timp and tamp
# n a b
# 1 base 5 6
# 2 imp 3 4
#
# ERROR
eval(as.name(paste("t" ,tump$n, sep="")))<-
rbind(eval(as.name(paste("t" ,tump$n, sep=""))), tamp)
#
#Error in eval(as.name(paste("t", tump$n, sep = ""))) <- rbind(eval(as.name(paste("t", :
#target of assignment expands to non-language object
#
# This is the solution proposed by Dave and it works
result<-assign(paste("t" ,tump$n, sep=""), rbind(get(paste("t" ,tump$n, sep="")), tamp))
result