File: test.reorder.factor.R

package info (click to toggle)
gdata 3.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 964 kB
  • sloc: sh: 27; makefile: 15
file content (11 lines) | stat: -rw-r--r-- 192 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
## Test results before and after loading gdata

m <- factor(c("a", "b", "c"))

(m1 <- reorder(m, X=c(3, 2, 1)))

library(gdata)

(m2 <- reorder(m, X=c(3, 2, 1)))

stopifnot(identical(m1, m2))