my.ks.test: my.ks.test

Description Usage Arguments Value Author(s) Examples

Description

A faster version of ks.test when ties are present. Runs ks.test with args exact = TRUE and alternative = "two.sided". Errors if NAs or non-numeric data are present in x or y. In addition, errors if length(x) or length(y) < 1. Note that this function calls C code in the base R package which isn't typically "allowed" and, in addition, it is specifically stated that "Packages should not make .C/.Call/.External/.Fortran calls to a base package. They are not part of the API, for use only by R itself and subject to change without notice."

Usage

1

Arguments

x

Numeric; a numeric vector of data values.

y

Numeric; a numeric vector of data values.

check

Logical; should input checks be run.

...

Arguments to pass on.

Value

A list with the statistic as element 1 and the p.value as element 2.

Author(s)

Jason T. Serviss

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
my.ks.test(rnorm(100), rnorm(100))
my.ks.test(1:100, 101:200)
my.ks.test(rnorm(100), rnorm(50))
my.ks.test(1:100, 51:150)
## Not run: 
 x <- rnorm(1000)
 y <- rnorm(1000)
 microbenchmark(microbenchmark(ks.test(x, y), my.ks.test(x, y)))
 x <- 1:1000
 y <- 501:1500
 microbenchmark(microbenchmark(ks.test(x, y), my.ks.test(x, y)))

## End(Not run)

jasonserviss/seqTools documentation built on May 17, 2019, 7:28 p.m.