R - use rbind on multiple variables with similar names -


i have many variables have created using code this:

for (i in 1:10) {     assign(paste0("variable", i), )} 

i need use rbind on variables combine them. tried no avail:

rbind(assign(paste0("variable", 1:10))) 

any suggestions on do?

that wrong way handle related items. better use list or dataframe, find out why in due course. now:

do.matrix <- do.call(rbind, lapply( ls(patt="variable"), get) ) 

or:

do.matrix <- do.call(rbind, lapply( paste0("variable", 1:10) , get) ) 

Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -