<- factor(c(rep(c("A","B","C"), 2), NA), exclude = NULL)
> x
[1] ABCABC
Levels: A B C
> table(x, exclude = "B")
x
ABC
2221
Finally, if I remove NA, it works again:
> x <- factor(rep(c(&q
quot;:
> x <- factor(c(rep(c("A","B","C"), 2), NA), exclude = NULL)
> x
[1] ABCABC
Levels: A B C
> table(x, exclude = "B")
x
ABC
2221
Finally, if I remove NA, it works again:
> x <- fact
> I was willing to use argument 'exclude' in function xtabs to remove some
> levels of factors (xtabs help page says '"exclude: a vector of values to
> be excluded when forming the set of levels of the classifying factors").
I think I see what's happening, and it's a little confusing to me, too.
Dear all
I was willing to use argument 'exclude' in function xtabs to remove some
levels of factors (xtabs help page says '"exclude: a vector of values to be
excluded when forming the set of levels of the classifying factors").
I tried:
> mydata <- data.frame(
treatment = c("B", "A", "C",
4 matches
Mail list logo