variables - R - How to set named value from data frame -


i have data frame stores multiple variables used through remainder of r script, example data frame structured follows:

varname  vardefinition vara     1 varb     2 

is possible loop through table define named values vara (equal 1) , varb (equal 2) per details in table?

hope following helps case:

> for(i in 1:nrow(vart)) {     assign(paste(vart$varname[i]), vart$vardefinition[i])   }  > vara [1] 1  > varb [1] 2 

Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -