I have many variables that I have created using code like this:
for (i in 1:10) { assign(paste0(\"variable\", i), i )}
I now need to us
That is the wrong way to handle related items. Better to use a list or dataframe, but you will probably find out why in due course. For now:
do.matrix <- do.call(rbind, lapply( ls(patt="variable"), get) )
Or:
do.matrix <- do.call(rbind, lapply( paste0("variable", 1:10) , get) )