[R] logical to vector?
jtor14 at gmail.com
Wed Mar 7 17:27:22 CET 2012
> as.numeric(c(TRUE, FALSE))
 1 0
On Wed, Mar 7, 2012 at 8:02 AM, Ed Siefker <ebs15242 at gmail.com> wrote:
> I am trying to use the coXpress function from
> the coXpress package. This function requires
> numerical vectors indicating which columns
> are in which group.
> The problem is, I can only figure out how
> to get a logical structure, not a numerical one.
> In other words, coXpress wants something like:
> I have something like:
> TRUE TRUE TRUE FALSE FALSE
> Can I convert one into the other easily?
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help