Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Naturals-class

Class "Naturals"


Description

The distribution-classes contain a slot where the sample space is stored. Typically, discrete random variables take naturals as values.

Usage

Naturals()

Objects from the Class

Objects could theoretically be created by calls of the form new("Naturals", dimension, name). Usually an object of this class is not needed on its own. It is generated automatically when a univariate discrete distribution is instantiated.

Slots

dimension

Object of class "character": the dimension of the space, by default = 1

name

Object of class "character": the name of the space, by default = "Natural Space"

Extends

Class "Reals", directly.
Class "EuclideanSpace", by class "Reals".
Class "rSpace", by class "Reals".

Methods

initialize

signature(.Object = "Naturals"): initialize method

liesIn

signature(object = "Naturals", x = "numeric"): Does a particular vector only contain naturals?

Author(s)

Thomas Stabla statho3@web.de,
Florian Camphausen fcampi@gmx.de,
Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de,
Matthias Kohl Matthias.Kohl@stamats.de

See Also

Examples

N <- Naturals()
liesIn(N,1) # TRUE
liesIn(N,c(0,1)) # FALSE
liesIn(N,0.1) # FALSE

distr

Object Oriented Implementation of Distributions

v2.8.0
LGPL-3
Authors
Florian Camphausen [ctb] (contributed as student in the initial phase --2005), Matthias Kohl [aut, cph], Peter Ruckdeschel [cre, cph], Thomas Stabla [ctb] (contributed as student in the initial phase --2005), R Core Team [ctb, cph] (for source file ks.c/ routines 'pKS2' and 'pKolmogorov2x')
Initial release
2019-03-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.