Dear R-helpers,

I'm trying to selectively swap labels between two factors, depending  
on an indicator variable i.

Can you point me to a solution, and perhaps how I could have found it?

labels(fact1) is a character vector of r row numbers
levels(fact1) is a character vector of the n < r unique levels
How do I then get the character vector of length r of the levels of  
fact1?
Once I have that, is there anything else I need to know about  
swapping labels between factors in a df?

_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:     P.O.Box 400400    Charlottesville, VA 22904-4400
Parcels:    Room 102        Gilmer Hall
         McCormick Road    Charlottesville, VA 22903
Office:    B011    +1-434-982-4729
Lab:        B019    +1-434-982-4751
Fax:        +1-434-982-4766
WWW:    http://www.people.virginia.edu/~mk9y/

______________________________________________
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