Last active
August 29, 2015 14:05
-
-
Save johnmyleswhite/af220de4ab2e48c3f890 to your computer and use it in GitHub Desktop.
Factor arithmetic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> x <- 1 | |
> f <- factor(x) | |
> f[1] * f[1] | |
[1] NA | |
Warning message: | |
In Ops.factor(f[1], f[1]) : * not meaningful for factors | |
> p <- f[1] * f[1] | |
Warning message: | |
In Ops.factor(f[1], f[1]) : * not meaningful for factors | |
> class(p) | |
[1] "logical" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment