File: test_noSpecial.R

package info (click to toggle)
r-cran-reformulas 0.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 668 kB
  • sloc: makefile: 2
file content (10 lines) | stat: -rw-r--r-- 475 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
library(reformulas)

expect_equal(noSpecials(y~1+us(1|f)), y ~ 1)
expect_equal(noSpecials(y~1+us(1|f),delete=FALSE), y ~ 1 + (1|f))
expect_equal(noSpecials(y~us(1|f)), y ~ 1)
expect_equal(noSpecials(y~us(1|f), delete=FALSE), y ~ (1|f))
expect_equal(noSpecials(y~us+1), y ~ us + 1)
expect_equal(noSpecials(~us(1|f)+1), ~1)
expect_equal(noSpecials(~s(stuff) + a + b, specials = "s"), ~a + b)
expect_equal(noSpecials(cbind(b1, 20-b1) ~ s(x, bs = "tp")), cbind(b1, 20 - b1) ~ 1)