[R] Extracting variables from random effects formulas

From: Rebecca Sela <rsela_at_stern.nyu.edu>
Date: Thu, 29 May 2008 00:24:38 -0400 (EDT)

I would like to be able to extract the names of the variables in a formula that specifies random effects. For example, given: random = ~ 1+year | st_name
I'd like to be able to get "year" and "st_name" out of random. Neither terms(random) nor random[2] seems to work. Is there a way to get variable names out?

Thanks in advance!


R-help_at_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. Received on Thu 29 May 2008 - 04:34:28 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 29 May 2008 - 05:30:43 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive