From 836521f81b2dcf98ad4e98a1e489b885e485a015 Mon Sep 17 00:00:00 2001 From: stepan <stepan.sindelar@oracle.com> Date: Tue, 31 May 2016 17:23:55 +0200 Subject: [PATCH] Regenerated ExpectedTestOutput --- .../truffle/r/test/ExpectedTestOutput.test | 1438 +++++++++++++++++ 1 file changed, 1438 insertions(+) diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test index 1f42b7a81b..6b051f3f57 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test @@ -18178,6 +18178,10 @@ NULL #environment(print) <environment: namespace:base> +##com.oracle.truffle.r.test.builtins.TestBuiltin_environment.testEnvironment +#{ f <- y~z; class(f) <- c('myclass', class(f)); environment(f) } +<environment: R_GlobalEnv> + ##com.oracle.truffle.r.test.builtins.TestBuiltin_environment.testenvironment1 #argv <- list(quote(cbind(X, M) ~ M.user + Temp + M.user:Temp + Soft)); .Internal(environment(argv[[1]])) NULL @@ -37512,6 +37516,14 @@ $n +##com.oracle.truffle.r.test.builtins.TestBuiltin_print.testPrint +#{ x <- 42; attr(x,'myattr') <- list(k=3); attributes(x) } +$myattr +$myattr$k +[1] 3 + + + ##com.oracle.truffle.r.test.builtins.TestBuiltin_print.testPrint #{ x<-c("11", "7", "2222", "7", "33"); names(x)<-1:5; print(x,quote=TRUE) } 1 2 3 4 5 @@ -106366,6 +106378,1432 @@ a b c d e #if (length(grep("FastR", R.Version()$version.string)) != 1) { TRUE } else { x<-rep(1, 100); xi1<-fastr.identity(x); f<-function(x) { y<-x; y }; f(x); x[1]<-7; xi2<-fastr.identity(x); xi1 == xi2 } [1] TRUE +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.frame(terms.formula(u~z*k+w*m)) } + u z k w m +1 5 1 2 3 4 +2 6 2 3 4 5 +3 7 3 4 5 6 +4 8 4 5 6 7 +5 9 5 6 7 8 +6 10 6 7 8 9 +7 11 7 8 9 10 +8 12 8 9 10 11 +9 13 9 10 11 12 +10 14 10 11 12 13 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.frame(terms.formula(y~(1 + w/k))) } + y w k +1 0 3 2 +2 1 4 3 +3 2 5 4 +4 3 6 5 +5 4 7 6 +6 5 8 7 +7 6 9 8 +8 7 10 9 +9 8 11 10 +10 9 12 11 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.frame(terms.formula(y~(z+k)*(w+u))) } + y z k w u +1 0 1 2 3 5 +2 1 2 3 4 6 +3 2 3 4 5 7 +4 3 4 5 6 8 +5 4 5 6 7 9 +6 5 6 7 8 10 +7 6 7 8 9 11 +8 7 8 9 10 12 +9 8 9 10 11 13 +10 9 10 11 12 14 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.frame(terms.formula(y~(z+k)^2)) } + y z k +1 0 1 2 +2 1 2 3 +3 2 3 4 +4 3 4 5 +5 4 5 6 +6 5 6 7 +7 6 7 8 +8 7 8 9 +9 8 9 10 +10 9 10 11 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.frame(terms.formula(y~-1+z)) } + y z +1 0 1 +2 1 2 +3 2 3 +4 3 4 +5 4 5 +6 5 6 +7 6 7 +8 7 8 +9 8 9 +10 9 10 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.frame(terms.formula(y~0+z)) } + y z +1 0 1 +2 1 2 +3 2 3 +4 3 4 +5 4 5 +6 5 6 +7 6 7 +8 7 8 +9 8 9 +10 9 10 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.frame(terms.formula(y~1+z)) } + y z +1 0 1 +2 1 2 +3 2 3 +4 3 4 +5 4 5 +6 5 6 +7 6 7 +8 7 8 +9 8 9 +10 9 10 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.frame(terms.formula(y~w%in%v)) } + y w v +1 0 3 6 +2 1 4 7 +3 2 5 8 +4 3 6 9 +5 4 7 10 +6 5 8 11 +7 6 9 12 +8 7 10 13 +9 8 11 14 +10 9 12 15 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.frame(terms.formula(y~w/k)) } + y w k +1 0 3 2 +2 1 4 3 +3 2 5 4 +4 3 6 5 +5 4 7 6 +6 5 8 7 +7 6 9 8 +8 7 10 9 +9 8 11 10 +10 9 12 11 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.frame(terms.formula(y~z)) } + y z +1 0 1 +2 1 2 +3 2 3 +4 3 4 +5 4 5 +6 5 6 +7 6 7 +8 7 8 +9 8 9 +10 9 10 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.frame(terms.formula(y~z*((m+w)^3))) } + y z m w +1 0 1 4 3 +2 1 2 5 4 +3 2 3 6 5 +4 3 4 7 6 +5 4 5 8 7 +6 5 6 9 8 +7 6 7 10 9 +8 7 8 11 10 +9 8 9 12 11 +10 9 10 13 12 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.frame(terms.formula(y~z*k)) } + y z k +1 0 1 2 +2 1 2 3 +3 2 3 4 +4 3 4 5 +5 4 5 6 +6 5 6 7 +7 6 7 8 +8 7 8 9 +9 8 9 10 +10 9 10 11 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.frame(terms.formula(y~z*k+w*m)) } + y z k w m +1 0 1 2 3 4 +2 1 2 3 4 5 +3 2 3 4 5 6 +4 3 4 5 6 7 +5 4 5 6 7 8 +6 5 6 7 8 9 +7 6 7 8 9 10 +8 7 8 9 10 11 +9 8 9 10 11 12 +10 9 10 11 12 13 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.frame(terms.formula(y~z:k)) } + y z k +1 0 1 2 +2 1 2 3 +3 2 3 4 +4 3 4 5 +5 4 5 6 +6 5 6 7 +7 6 7 8 +8 7 8 9 +9 8 9 10 +10 9 10 11 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.frame(terms.formula(y~z^2)) } + y z +1 0 1 +2 1 2 +3 2 3 +4 3 4 +5 4 5 +6 5 6 +7 6 7 +8 7 8 +9 8 9 +10 9 10 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.frame(terms.formula(u~z*k+w*m)) } + u z k w m +1 5 a m 3 4 +2 6 b f 4 5 +3 7 c m 5 6 +4 8 a f 6 7 +5 9 b m 7 8 +6 10 c f 8 9 +7 11 a m 9 10 +8 12 b f 10 11 +9 13 c m 11 12 +10 14 c f 12 13 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.frame(terms.formula(y~(1 + w/k))) } + y w k +1 0 3 m +2 1 4 f +3 2 5 m +4 3 6 f +5 4 7 m +6 5 8 f +7 6 9 m +8 7 10 f +9 8 11 m +10 9 12 f + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.frame(terms.formula(y~(z+k)*(w+u))) } + y z k w u +1 0 a m 3 5 +2 1 b f 4 6 +3 2 c m 5 7 +4 3 a f 6 8 +5 4 b m 7 9 +6 5 c f 8 10 +7 6 a m 9 11 +8 7 b f 10 12 +9 8 c m 11 13 +10 9 c f 12 14 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.frame(terms.formula(y~(z+k)^2)) } + y z k +1 0 a m +2 1 b f +3 2 c m +4 3 a f +5 4 b m +6 5 c f +7 6 a m +8 7 b f +9 8 c m +10 9 c f + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.frame(terms.formula(y~-1+z)) } + y z +1 0 a +2 1 b +3 2 c +4 3 a +5 4 b +6 5 c +7 6 a +8 7 b +9 8 c +10 9 c + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.frame(terms.formula(y~0+z)) } + y z +1 0 a +2 1 b +3 2 c +4 3 a +5 4 b +6 5 c +7 6 a +8 7 b +9 8 c +10 9 c + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.frame(terms.formula(y~1+z)) } + y z +1 0 a +2 1 b +3 2 c +4 3 a +5 4 b +6 5 c +7 6 a +8 7 b +9 8 c +10 9 c + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.frame(terms.formula(y~w%in%v)) } + y w v +1 0 3 6 +2 1 4 7 +3 2 5 8 +4 3 6 9 +5 4 7 10 +6 5 8 11 +7 6 9 12 +8 7 10 13 +9 8 11 14 +10 9 12 15 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.frame(terms.formula(y~w/k)) } + y w k +1 0 3 m +2 1 4 f +3 2 5 m +4 3 6 f +5 4 7 m +6 5 8 f +7 6 9 m +8 7 10 f +9 8 11 m +10 9 12 f + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.frame(terms.formula(y~z)) } + y z +1 0 a +2 1 b +3 2 c +4 3 a +5 4 b +6 5 c +7 6 a +8 7 b +9 8 c +10 9 c + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.frame(terms.formula(y~z*((m+w)^3))) } + y z m w +1 0 a 4 3 +2 1 b 5 4 +3 2 c 6 5 +4 3 a 7 6 +5 4 b 8 7 +6 5 c 9 8 +7 6 a 10 9 +8 7 b 11 10 +9 8 c 12 11 +10 9 c 13 12 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.frame(terms.formula(y~z*k)) } + y z k +1 0 a m +2 1 b f +3 2 c m +4 3 a f +5 4 b m +6 5 c f +7 6 a m +8 7 b f +9 8 c m +10 9 c f + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.frame(terms.formula(y~z*k+w*m)) } + y z k w m +1 0 a m 3 4 +2 1 b f 4 5 +3 2 c m 5 6 +4 3 a f 6 7 +5 4 b m 7 8 +6 5 c f 8 9 +7 6 a m 9 10 +8 7 b f 10 11 +9 8 c m 11 12 +10 9 c f 12 13 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.frame(terms.formula(y~z:k)) } + y z k +1 0 a m +2 1 b f +3 2 c m +4 3 a f +5 4 b m +6 5 c f +7 6 a m +8 7 b f +9 8 c m +10 9 c f + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelFrame +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.frame(terms.formula(y~z^2)) } + y z +1 0 a +2 1 b +3 2 c +4 3 a +5 4 b +6 5 c +7 6 a +8 7 b +9 8 c +10 9 c + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.matrix(model.frame(terms.formula(u~z*k+w*m))) } + (Intercept) z k w m z:k w:m +1 1 1 2 3 4 2 12 +2 1 2 3 4 5 6 20 +3 1 3 4 5 6 12 30 +4 1 4 5 6 7 20 42 +5 1 5 6 7 8 30 56 +6 1 6 7 8 9 42 72 +7 1 7 8 9 10 56 90 +8 1 8 9 10 11 72 110 +9 1 9 10 11 12 90 132 +10 1 10 11 12 13 110 156 +attr(,"assign") +[1] 0 1 2 3 4 5 6 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.matrix(model.frame(terms.formula(y~(1 + w/k)))) } + (Intercept) w w:k +1 1 3 6 +2 1 4 12 +3 1 5 20 +4 1 6 30 +5 1 7 42 +6 1 8 56 +7 1 9 72 +8 1 10 90 +9 1 11 110 +10 1 12 132 +attr(,"assign") +[1] 0 1 2 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.matrix(model.frame(terms.formula(y~(z+k)*(w+u)))) } + (Intercept) z k w u z:w z:u k:w k:u +1 1 1 2 3 5 3 5 6 10 +2 1 2 3 4 6 8 12 12 18 +3 1 3 4 5 7 15 21 20 28 +4 1 4 5 6 8 24 32 30 40 +5 1 5 6 7 9 35 45 42 54 +6 1 6 7 8 10 48 60 56 70 +7 1 7 8 9 11 63 77 72 88 +8 1 8 9 10 12 80 96 90 108 +9 1 9 10 11 13 99 117 110 130 +10 1 10 11 12 14 120 140 132 154 +attr(,"assign") +[1] 0 1 2 3 4 5 6 7 8 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.matrix(model.frame(terms.formula(y~(z+k)^2))) } + (Intercept) z k z:k +1 1 1 2 2 +2 1 2 3 6 +3 1 3 4 12 +4 1 4 5 20 +5 1 5 6 30 +6 1 6 7 42 +7 1 7 8 56 +8 1 8 9 72 +9 1 9 10 90 +10 1 10 11 110 +attr(,"assign") +[1] 0 1 2 3 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.matrix(model.frame(terms.formula(y~-1+z))) } + z +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +attr(,"assign") +[1] 1 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.matrix(model.frame(terms.formula(y~0+z))) } + z +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +attr(,"assign") +[1] 1 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.matrix(model.frame(terms.formula(y~1+z))) } + (Intercept) z +1 1 1 +2 1 2 +3 1 3 +4 1 4 +5 1 5 +6 1 6 +7 1 7 +8 1 8 +9 1 9 +10 1 10 +attr(,"assign") +[1] 0 1 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.matrix(model.frame(terms.formula(y~w%in%v))) } + (Intercept) w:v +1 1 18 +2 1 28 +3 1 40 +4 1 54 +5 1 70 +6 1 88 +7 1 108 +8 1 130 +9 1 154 +10 1 180 +attr(,"assign") +[1] 0 1 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.matrix(model.frame(terms.formula(y~w/k))) } + (Intercept) w w:k +1 1 3 6 +2 1 4 12 +3 1 5 20 +4 1 6 30 +5 1 7 42 +6 1 8 56 +7 1 9 72 +8 1 10 90 +9 1 11 110 +10 1 12 132 +attr(,"assign") +[1] 0 1 2 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.matrix(model.frame(terms.formula(y~z))) } + (Intercept) z +1 1 1 +2 1 2 +3 1 3 +4 1 4 +5 1 5 +6 1 6 +7 1 7 +8 1 8 +9 1 9 +10 1 10 +attr(,"assign") +[1] 0 1 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.matrix(model.frame(terms.formula(y~z*((m+w)^3)))) } + (Intercept) z m w m:w z:m z:w z:m:w +1 1 1 4 3 12 4 3 12 +2 1 2 5 4 20 10 8 40 +3 1 3 6 5 30 18 15 90 +4 1 4 7 6 42 28 24 168 +5 1 5 8 7 56 40 35 280 +6 1 6 9 8 72 54 48 432 +7 1 7 10 9 90 70 63 630 +8 1 8 11 10 110 88 80 880 +9 1 9 12 11 132 108 99 1188 +10 1 10 13 12 156 130 120 1560 +attr(,"assign") +[1] 0 1 2 3 4 5 6 7 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.matrix(model.frame(terms.formula(y~z*k))) } + (Intercept) z k z:k +1 1 1 2 2 +2 1 2 3 6 +3 1 3 4 12 +4 1 4 5 20 +5 1 5 6 30 +6 1 6 7 42 +7 1 7 8 56 +8 1 8 9 72 +9 1 9 10 90 +10 1 10 11 110 +attr(,"assign") +[1] 0 1 2 3 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.matrix(model.frame(terms.formula(y~z*k+w*m))) } + (Intercept) z k w m z:k w:m +1 1 1 2 3 4 2 12 +2 1 2 3 4 5 6 20 +3 1 3 4 5 6 12 30 +4 1 4 5 6 7 20 42 +5 1 5 6 7 8 30 56 +6 1 6 7 8 9 42 72 +7 1 7 8 9 10 56 90 +8 1 8 9 10 11 72 110 +9 1 9 10 11 12 90 132 +10 1 10 11 12 13 110 156 +attr(,"assign") +[1] 0 1 2 3 4 5 6 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.matrix(model.frame(terms.formula(y~z:k))) } + (Intercept) z:k +1 1 2 +2 1 6 +3 1 12 +4 1 20 +5 1 30 +6 1 42 +7 1 56 +8 1 72 +9 1 90 +10 1 110 +attr(,"assign") +[1] 0 1 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;; model.matrix(model.frame(terms.formula(y~z^2))) } + (Intercept) z +1 1 1 +2 1 2 +3 1 3 +4 1 4 +5 1 5 +6 1 6 +7 1 7 +8 1 8 +9 1 9 +10 1 10 +attr(,"assign") +[1] 0 1 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.matrix(model.frame(terms.formula(u~z*k+w*m))) } + (Intercept) zb zc km w m zb:km zc:km w:m +1 1 0 0 1 3 4 0 0 12 +2 1 1 0 0 4 5 0 0 20 +3 1 0 1 1 5 6 0 1 30 +4 1 0 0 0 6 7 0 0 42 +5 1 1 0 1 7 8 1 0 56 +6 1 0 1 0 8 9 0 0 72 +7 1 0 0 1 9 10 0 0 90 +8 1 1 0 0 10 11 0 0 110 +9 1 0 1 1 11 12 0 1 132 +10 1 0 1 0 12 13 0 0 156 +attr(,"assign") +[1] 0 1 1 2 3 4 5 5 6 +attr(,"contrasts") +attr(,"contrasts")$z +[1] "contr.treatment" + +attr(,"contrasts")$k +[1] "contr.treatment" + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.matrix(model.frame(terms.formula(y~(1 + w/k)))) } + (Intercept) w w:km +1 1 3 3 +2 1 4 0 +3 1 5 5 +4 1 6 0 +5 1 7 7 +6 1 8 0 +7 1 9 9 +8 1 10 0 +9 1 11 11 +10 1 12 0 +attr(,"assign") +[1] 0 1 2 +attr(,"contrasts") +attr(,"contrasts")$k +[1] "contr.treatment" + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.matrix(model.frame(terms.formula(y~(z+k)*(w+u)))) } + (Intercept) zb zc km w u zb:w zc:w zb:u zc:u km:w km:u +1 1 0 0 1 3 5 0 0 0 0 3 5 +2 1 1 0 0 4 6 4 0 6 0 0 0 +3 1 0 1 1 5 7 0 5 0 7 5 7 +4 1 0 0 0 6 8 0 0 0 0 0 0 +5 1 1 0 1 7 9 7 0 9 0 7 9 +6 1 0 1 0 8 10 0 8 0 10 0 0 +7 1 0 0 1 9 11 0 0 0 0 9 11 +8 1 1 0 0 10 12 10 0 12 0 0 0 +9 1 0 1 1 11 13 0 11 0 13 11 13 +10 1 0 1 0 12 14 0 12 0 14 0 0 +attr(,"assign") + [1] 0 1 1 2 3 4 5 5 6 6 7 8 +attr(,"contrasts") +attr(,"contrasts")$z +[1] "contr.treatment" + +attr(,"contrasts")$k +[1] "contr.treatment" + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.matrix(model.frame(terms.formula(y~(z+k)^2))) } + (Intercept) zb zc km zb:km zc:km +1 1 0 0 1 0 0 +2 1 1 0 0 0 0 +3 1 0 1 1 0 1 +4 1 0 0 0 0 0 +5 1 1 0 1 1 0 +6 1 0 1 0 0 0 +7 1 0 0 1 0 0 +8 1 1 0 0 0 0 +9 1 0 1 1 0 1 +10 1 0 1 0 0 0 +attr(,"assign") +[1] 0 1 1 2 3 3 +attr(,"contrasts") +attr(,"contrasts")$z +[1] "contr.treatment" + +attr(,"contrasts")$k +[1] "contr.treatment" + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.matrix(model.frame(terms.formula(y~-1+z))) } + za zb zc +1 1 0 0 +2 0 1 0 +3 0 0 1 +4 1 0 0 +5 0 1 0 +6 0 0 1 +7 1 0 0 +8 0 1 0 +9 0 0 1 +10 0 0 1 +attr(,"assign") +[1] 1 1 1 +attr(,"contrasts") +attr(,"contrasts")$z +[1] "contr.treatment" + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.matrix(model.frame(terms.formula(y~0+z))) } + za zb zc +1 1 0 0 +2 0 1 0 +3 0 0 1 +4 1 0 0 +5 0 1 0 +6 0 0 1 +7 1 0 0 +8 0 1 0 +9 0 0 1 +10 0 0 1 +attr(,"assign") +[1] 1 1 1 +attr(,"contrasts") +attr(,"contrasts")$z +[1] "contr.treatment" + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.matrix(model.frame(terms.formula(y~1+z))) } + (Intercept) zb zc +1 1 0 0 +2 1 1 0 +3 1 0 1 +4 1 0 0 +5 1 1 0 +6 1 0 1 +7 1 0 0 +8 1 1 0 +9 1 0 1 +10 1 0 1 +attr(,"assign") +[1] 0 1 1 +attr(,"contrasts") +attr(,"contrasts")$z +[1] "contr.treatment" + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.matrix(model.frame(terms.formula(y~w%in%v))) } + (Intercept) w:v +1 1 18 +2 1 28 +3 1 40 +4 1 54 +5 1 70 +6 1 88 +7 1 108 +8 1 130 +9 1 154 +10 1 180 +attr(,"assign") +[1] 0 1 + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.matrix(model.frame(terms.formula(y~w/k))) } + (Intercept) w w:km +1 1 3 3 +2 1 4 0 +3 1 5 5 +4 1 6 0 +5 1 7 7 +6 1 8 0 +7 1 9 9 +8 1 10 0 +9 1 11 11 +10 1 12 0 +attr(,"assign") +[1] 0 1 2 +attr(,"contrasts") +attr(,"contrasts")$k +[1] "contr.treatment" + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.matrix(model.frame(terms.formula(y~z))) } + (Intercept) zb zc +1 1 0 0 +2 1 1 0 +3 1 0 1 +4 1 0 0 +5 1 1 0 +6 1 0 1 +7 1 0 0 +8 1 1 0 +9 1 0 1 +10 1 0 1 +attr(,"assign") +[1] 0 1 1 +attr(,"contrasts") +attr(,"contrasts")$z +[1] "contr.treatment" + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.matrix(model.frame(terms.formula(y~z*((m+w)^3)))) } + (Intercept) zb zc m w m:w zb:m zc:m zb:w zc:w zb:m:w zc:m:w +1 1 0 0 4 3 12 0 0 0 0 0 0 +2 1 1 0 5 4 20 5 0 4 0 20 0 +3 1 0 1 6 5 30 0 6 0 5 0 30 +4 1 0 0 7 6 42 0 0 0 0 0 0 +5 1 1 0 8 7 56 8 0 7 0 56 0 +6 1 0 1 9 8 72 0 9 0 8 0 72 +7 1 0 0 10 9 90 0 0 0 0 0 0 +8 1 1 0 11 10 110 11 0 10 0 110 0 +9 1 0 1 12 11 132 0 12 0 11 0 132 +10 1 0 1 13 12 156 0 13 0 12 0 156 +attr(,"assign") + [1] 0 1 1 2 3 4 5 5 6 6 7 7 +attr(,"contrasts") +attr(,"contrasts")$z +[1] "contr.treatment" + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.matrix(model.frame(terms.formula(y~z*k))) } + (Intercept) zb zc km zb:km zc:km +1 1 0 0 1 0 0 +2 1 1 0 0 0 0 +3 1 0 1 1 0 1 +4 1 0 0 0 0 0 +5 1 1 0 1 1 0 +6 1 0 1 0 0 0 +7 1 0 0 1 0 0 +8 1 1 0 0 0 0 +9 1 0 1 1 0 1 +10 1 0 1 0 0 0 +attr(,"assign") +[1] 0 1 1 2 3 3 +attr(,"contrasts") +attr(,"contrasts")$z +[1] "contr.treatment" + +attr(,"contrasts")$k +[1] "contr.treatment" + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.matrix(model.frame(terms.formula(y~z*k+w*m))) } + (Intercept) zb zc km w m zb:km zc:km w:m +1 1 0 0 1 3 4 0 0 12 +2 1 1 0 0 4 5 0 0 20 +3 1 0 1 1 5 6 0 1 30 +4 1 0 0 0 6 7 0 0 42 +5 1 1 0 1 7 8 1 0 56 +6 1 0 1 0 8 9 0 0 72 +7 1 0 0 1 9 10 0 0 90 +8 1 1 0 0 10 11 0 0 110 +9 1 0 1 1 11 12 0 1 132 +10 1 0 1 0 12 13 0 0 156 +attr(,"assign") +[1] 0 1 1 2 3 4 5 5 6 +attr(,"contrasts") +attr(,"contrasts")$z +[1] "contr.treatment" + +attr(,"contrasts")$k +[1] "contr.treatment" + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.matrix(model.frame(terms.formula(y~z:k))) } + (Intercept) za:kf zb:kf zc:kf za:km zb:km zc:km +1 1 0 0 0 1 0 0 +2 1 0 1 0 0 0 0 +3 1 0 0 0 0 0 1 +4 1 1 0 0 0 0 0 +5 1 0 0 0 0 1 0 +6 1 0 0 1 0 0 0 +7 1 0 0 0 1 0 0 +8 1 0 1 0 0 0 0 +9 1 0 0 0 0 0 1 +10 1 0 0 1 0 0 0 +attr(,"assign") +[1] 0 1 1 1 1 1 1 +attr(,"contrasts") +attr(,"contrasts")$z +[1] "contr.treatment" + +attr(,"contrasts")$k +[1] "contr.treatment" + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testModelMatrix +#{y<-0:9;z<-1:10;k<-2:11;w<-3:12;m<-4:13;u<-5:14;v<-6:15;k <- factor(rep(c('m', 'f'), 5));z <- factor(c(rep(c('a', 'b', 'c'), 3), 'c')); ; model.matrix(model.frame(terms.formula(y~z^2))) } + (Intercept) zb zc +1 1 0 0 +2 1 1 0 +3 1 0 1 +4 1 0 0 +5 1 1 0 +6 1 0 1 +7 1 0 0 +8 1 1 0 +9 1 0 1 +10 1 0 1 +attr(,"assign") +[1] 0 1 1 +attr(,"contrasts") +attr(,"contrasts")$z +[1] "contr.treatment" + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testTermsform +#f <- terms.formula(u~z*k+w*m); attrs <- attributes(f); envIdx <- which(names(attrs)=='.Environment'); print(attrs[envIdx]); attrs[sort(names(attrs[-envIdx]))] +$.Environment +<environment: R_GlobalEnv> + +$class +[1] "terms" "formula" + +$factors + z k w m z:k w:m +u 0 0 0 0 0 0 +z 1 0 0 0 1 0 +k 0 1 0 0 1 0 +w 0 0 1 0 0 1 +m 0 0 0 1 0 1 + +$intercept +[1] 1 + +$order +[1] 1 1 1 1 2 2 + +$response +[1] 1 + +$term.labels +[1] "z" "k" "w" "m" "z:k" "w:m" + +$variables +list(u, z, k, w, m) + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testTermsform +#f <- terms.formula(y~(1 + w/k)); attrs <- attributes(f); envIdx <- which(names(attrs)=='.Environment'); print(attrs[envIdx]); attrs[sort(names(attrs[-envIdx]))] +$.Environment +<environment: R_GlobalEnv> + +$class +[1] "terms" "formula" + +$factors + w w:k +y 0 0 +w 1 2 +k 0 1 + +$intercept +[1] 1 + +$order +[1] 1 2 + +$response +[1] 1 + +$term.labels +[1] "w" "w:k" + +$variables +list(y, w, k) + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testTermsform +#f <- terms.formula(y~(z+k)*(w+u)); attrs <- attributes(f); envIdx <- which(names(attrs)=='.Environment'); print(attrs[envIdx]); attrs[sort(names(attrs[-envIdx]))] +$.Environment +<environment: R_GlobalEnv> + +$class +[1] "terms" "formula" + +$factors + z k w u z:w z:u k:w k:u +y 0 0 0 0 0 0 0 0 +z 1 0 0 0 1 1 0 0 +k 0 1 0 0 0 0 1 1 +w 0 0 1 0 1 0 1 0 +u 0 0 0 1 0 1 0 1 + +$intercept +[1] 1 + +$order +[1] 1 1 1 1 2 2 2 2 + +$response +[1] 1 + +$term.labels +[1] "z" "k" "w" "u" "z:w" "z:u" "k:w" "k:u" + +$variables +list(y, z, k, w, u) + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testTermsform +#f <- terms.formula(y~(z+k)^2); attrs <- attributes(f); envIdx <- which(names(attrs)=='.Environment'); print(attrs[envIdx]); attrs[sort(names(attrs[-envIdx]))] +$.Environment +<environment: R_GlobalEnv> + +$class +[1] "terms" "formula" + +$factors + z k z:k +y 0 0 0 +z 1 0 1 +k 0 1 1 + +$intercept +[1] 1 + +$order +[1] 1 1 2 + +$response +[1] 1 + +$term.labels +[1] "z" "k" "z:k" + +$variables +list(y, z, k) + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testTermsform +#f <- terms.formula(y~-1+z); attrs <- attributes(f); envIdx <- which(names(attrs)=='.Environment'); print(attrs[envIdx]); attrs[sort(names(attrs[-envIdx]))] +$.Environment +<environment: R_GlobalEnv> + +$class +[1] "terms" "formula" + +$factors + z +y 0 +z 1 + +$intercept +[1] 0 + +$order +[1] 1 + +$response +[1] 1 + +$term.labels +[1] "z" + +$variables +list(y, z) + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testTermsform +#f <- terms.formula(y~0+z); attrs <- attributes(f); envIdx <- which(names(attrs)=='.Environment'); print(attrs[envIdx]); attrs[sort(names(attrs[-envIdx]))] +$.Environment +<environment: R_GlobalEnv> + +$class +[1] "terms" "formula" + +$factors + z +y 0 +z 1 + +$intercept +[1] 0 + +$order +[1] 1 + +$response +[1] 1 + +$term.labels +[1] "z" + +$variables +list(y, z) + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testTermsform +#f <- terms.formula(y~1+z); attrs <- attributes(f); envIdx <- which(names(attrs)=='.Environment'); print(attrs[envIdx]); attrs[sort(names(attrs[-envIdx]))] +$.Environment +<environment: R_GlobalEnv> + +$class +[1] "terms" "formula" + +$factors + z +y 0 +z 1 + +$intercept +[1] 1 + +$order +[1] 1 + +$response +[1] 1 + +$term.labels +[1] "z" + +$variables +list(y, z) + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testTermsform +#f <- terms.formula(y~w%in%v); attrs <- attributes(f); envIdx <- which(names(attrs)=='.Environment'); print(attrs[envIdx]); attrs[sort(names(attrs[-envIdx]))] +$.Environment +<environment: R_GlobalEnv> + +$class +[1] "terms" "formula" + +$factors + w:v +y 0 +w 2 +v 2 + +$intercept +[1] 1 + +$order +[1] 2 + +$response +[1] 1 + +$term.labels +[1] "w:v" + +$variables +list(y, w, v) + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testTermsform +#f <- terms.formula(y~w/k); attrs <- attributes(f); envIdx <- which(names(attrs)=='.Environment'); print(attrs[envIdx]); attrs[sort(names(attrs[-envIdx]))] +$.Environment +<environment: R_GlobalEnv> + +$class +[1] "terms" "formula" + +$factors + w w:k +y 0 0 +w 1 2 +k 0 1 + +$intercept +[1] 1 + +$order +[1] 1 2 + +$response +[1] 1 + +$term.labels +[1] "w" "w:k" + +$variables +list(y, w, k) + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testTermsform +#f <- terms.formula(y~z); attrs <- attributes(f); envIdx <- which(names(attrs)=='.Environment'); print(attrs[envIdx]); attrs[sort(names(attrs[-envIdx]))] +$.Environment +<environment: R_GlobalEnv> + +$class +[1] "terms" "formula" + +$factors + z +y 0 +z 1 + +$intercept +[1] 1 + +$order +[1] 1 + +$response +[1] 1 + +$term.labels +[1] "z" + +$variables +list(y, z) + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testTermsform +#f <- terms.formula(y~z*((m+w)^3)); attrs <- attributes(f); envIdx <- which(names(attrs)=='.Environment'); print(attrs[envIdx]); attrs[sort(names(attrs[-envIdx]))] +$.Environment +<environment: R_GlobalEnv> + +$class +[1] "terms" "formula" + +$factors + z m w m:w z:m z:w z:m:w +y 0 0 0 0 0 0 0 +z 1 0 0 0 1 1 1 +m 0 1 0 1 1 0 1 +w 0 0 1 1 0 1 1 + +$intercept +[1] 1 + +$order +[1] 1 1 1 2 2 2 3 + +$response +[1] 1 + +$term.labels +[1] "z" "m" "w" "m:w" "z:m" "z:w" "z:m:w" + +$variables +list(y, z, m, w) + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testTermsform +#f <- terms.formula(y~z*k); attrs <- attributes(f); envIdx <- which(names(attrs)=='.Environment'); print(attrs[envIdx]); attrs[sort(names(attrs[-envIdx]))] +$.Environment +<environment: R_GlobalEnv> + +$class +[1] "terms" "formula" + +$factors + z k z:k +y 0 0 0 +z 1 0 1 +k 0 1 1 + +$intercept +[1] 1 + +$order +[1] 1 1 2 + +$response +[1] 1 + +$term.labels +[1] "z" "k" "z:k" + +$variables +list(y, z, k) + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testTermsform +#f <- terms.formula(y~z*k+w*m); attrs <- attributes(f); envIdx <- which(names(attrs)=='.Environment'); print(attrs[envIdx]); attrs[sort(names(attrs[-envIdx]))] +$.Environment +<environment: R_GlobalEnv> + +$class +[1] "terms" "formula" + +$factors + z k w m z:k w:m +y 0 0 0 0 0 0 +z 1 0 0 0 1 0 +k 0 1 0 0 1 0 +w 0 0 1 0 0 1 +m 0 0 0 1 0 1 + +$intercept +[1] 1 + +$order +[1] 1 1 1 1 2 2 + +$response +[1] 1 + +$term.labels +[1] "z" "k" "w" "m" "z:k" "w:m" + +$variables +list(y, z, k, w, m) + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testTermsform +#f <- terms.formula(y~z:k); attrs <- attributes(f); envIdx <- which(names(attrs)=='.Environment'); print(attrs[envIdx]); attrs[sort(names(attrs[-envIdx]))] +$.Environment +<environment: R_GlobalEnv> + +$class +[1] "terms" "formula" + +$factors + z:k +y 0 +z 2 +k 2 + +$intercept +[1] 1 + +$order +[1] 2 + +$response +[1] 1 + +$term.labels +[1] "z:k" + +$variables +list(y, z, k) + + +##com.oracle.truffle.r.test.library.stats.TestFormulae.testTermsform +#f <- terms.formula(y~z^2); attrs <- attributes(f); envIdx <- which(names(attrs)=='.Environment'); print(attrs[envIdx]); attrs[sort(names(attrs[-envIdx]))] +$.Environment +<environment: R_GlobalEnv> + +$class +[1] "terms" "formula" + +$factors + z +y 0 +z 1 + +$intercept +[1] 1 + +$order +[1] 1 + +$response +[1] 1 + +$term.labels +[1] "z" + +$variables +list(y, z) + + ##com.oracle.truffle.r.test.library.stats.TestStats.testCor #{ as.integer(cor(c(1,2,3),c(1,2,5))*10000000) } [1] 9607689 -- GitLab