File: fix.R

package info (click to toggle)
r-cran-matlab 1.0.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 640 kB
  • sloc: sh: 13; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 381 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
###
### $Id: fix.R 22 2022-05-30 18:03:47Z proebuck $
###


##-----------------------------------------------------------------------------
test.fix <- function(input, expected) {
    output <- do.call(getFromNamespace("fix", "matlab"), input)
    identical(output, expected)
}

X <- c(-1.9, -0.2, 3.4, 5.6, 7.0)
fix.expected <- c(-1, 0, 3, 5, 7)

test.fix(list(X), fix.expected)