require(mosaic)
# using ggplot2::midwest as an example binom.test(~category, data=midwest) prop.test(~category, data=midwest)
Note: For lazy loaded data, using deparse(lazyeval::lazy(data)$expr)
doesn't contain what we want, so I'm reverting to using substitute()
here.
This error message was previously cryptic. Better now.
require(mosaicData) favstats(~sex, data=HELPrct)
Adding in ability to select multiple names and get a merged data set.
World <- CIAdata(c("pop", "area", "life", "fert")) head(World)
This was throwing an error because of missing ncp
:
suppressPackageStartupMessages(library(mosaic, quietly = TRUE)) xpt(.67, df = 49)
Trouble caused because there is no default for ncp
in pt()
Indeed
Supplying ncp = 0 uses the algorithm for the non-central distribution, which is not the same algorithm used if ncp is omitted. This is to give consistent behaviour in extreme cases with values of ncp very near zero.
Fixed with explicit test for missing.
...
was missing in a couple of function and so xlim
(and other things) were
not being passed along.
suppressPackageStartupMessages(library(mosaic)) xpt(41.944,df=4, ncp=0, xlim=c(41,43)) xpchisq(41.944,df=4, ncp=0, xlim=c(41,43)) xpf(41.944,df1=4,df2=3, ncp=0, xlim=c(41,43))
suppressPackageStartupMessages(library(mosaic)) x <- rnorm(100) qdata(~x, 0.9) %>% class() qdata(~x, c(0.8, 0.9)) %>% class() qdata(~x, 0.9) qdata(~x, c(0.8, 0.9)) cdata(~x, 0.9) %>% class() cdata(~x, c(0.8, 0.9)) %>% class() cdata(~x, 0.9) cdata(~x, c(0.8, 0.9))
Problem was the use of n
as a parameter.
suppressPackageStartupMessages(library(mosaic)) pdist("hyper", 4, m = 10, n = 8, k = 7) phyper(4, m = 10, n = 8, k = 7)
suppressPackageStartupMessages(library(mosaic)) x <- rnorm(100) qdata(~x, 0.9) %>% class() qdata(~x, c(0.8, 0.9)) %>% class() qdata(~x, 0.9) qdata(~x, c(0.8, 0.9)) cdata(~x, 0.9) %>% class() cdata(~x, c(0.8, 0.9)) %>% class() cdata(~x, 0.9) cdata(~x, c(0.8, 0.9))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.