Skip to content
Prev 303614 / 398506 Next

Error: level sets of factors are different?

The length of a vector of yes/no answers has little to do with the number of possible responses (2). Factors keep both pieces of information.

If you only have yes responses in your data set, when converted to factor you would have to tell R that other responses  were possible.

I prefer to avoid working with factors until I need them.  Use the str function to investigate where factors are being introduced and either use options to keep the data as character or convert it back to character if you can't figure that out.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
Sri krishna Devarayalu Balanagu <balanagudevarayulu at gvkbio.com> wrote: