Say I have a list of variables, 

listVar <- list(age,sex)

I am looking for a way to either

1- create a vector c("age","sex") from it, or
2- get the names one by one in a for loop such as these

    a)  for (i in 1:length(listVar)) rownames(result)[i] <- ???

    b)  for(i in listVar) print (variable's name)


Any help much appreciated.
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to