dwww Home | Show directory contents | Find package

R Under development (unstable) (2019-07-09 r76810) -- "Unsuffered Consequences"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> pkgname <- "libcoin"
> source(file.path(R.home("share"), "R", "examples-header.R"))
> options(warn = 1)
> options(pager = "console")
> library('libcoin')
> 
> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
> base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv')
> cleanEx()
> nameEx("LinStatExpCov")
> ### * LinStatExpCov
> 
> flush(stderr()); flush(stdout())
> 
> ### Name: LinStatExpCov
> ### Title: Linear Statistics with Expectation and Covariance
> ### Aliases: LinStatExpCov lmult
> ### Keywords: htest
> 
> ### ** Examples
> 
> wilcox.test(Ozone ~ Month, data = airquality, subset = Month %in% c(5, 8))
Warning in wilcox.test.default(x = c(41L, 36L, 12L, 18L, 28L, 23L, 19L,  :
  cannot compute exact p-value with ties

        Wilcoxon rank sum test with continuity correction

data:  Ozone by Month
W = 127.5, p-value = 0.0001208
alternative hypothesis: true location shift is not equal to 0

> 
> aq <- subset(airquality, Month %in% c(5, 8))
> X <- as.double(aq$Month == 5)
> Y <- as.double(rank(aq$Ozone))
> doTest(LinStatExpCov(X, Y))
$TestStatistic
[1] 3.140115

$p.value
[1] 0.001688815

> 
> 
> 
> cleanEx()
> nameEx("ctabs")
> ### * ctabs
> 
> flush(stderr()); flush(stdout())
> 
> ### Name: ctabs
> ### Title: Cross Tabulation
> ### Aliases: ctabs
> ### Keywords: univar
> 
> ### ** Examples
> 
> ctabs(ix = 1:5, iy = 1:5, weights = 1:5 / 5)
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    0  0.0  0.0  0.0  0.0    0
[2,]    0  0.2  0.0  0.0  0.0    0
[3,]    0  0.0  0.4  0.0  0.0    0
[4,]    0  0.0  0.0  0.6  0.0    0
[5,]    0  0.0  0.0  0.0  0.8    0
[6,]    0  0.0  0.0  0.0  0.0    1
> 
> 
> 
> ### * <FOOTER>
> ###
> cleanEx()
> options(digits = 7L)
> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
Time elapsed:  0.1 0 0.09 NA NA 
> grDevices::dev.off()
null device 
          1 
> ###
> ### Local variables: ***
> ### mode: outline-minor ***
> ### outline-regexp: "\\(> \\)?### [*]+" ***
> ### End: ***
> quit('no')

Generated by dwww version 1.15 on Thu May 23 11:16:04 CEST 2024.