File: EmpiricalDistribution.R

package info (click to toggle)
r-cran-distr 2.9.7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,344 kB
  • sloc: ansic: 199; sh: 13; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 1,261 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
###############################################################################
## Generating function to generate empirical distribution given some data
###############################################################################

## simple wrapper to DiscreteDistribution
EmpiricalDistribution <- function(data, .withArith = FALSE,
                                  .withSim = FALSE, .lowerExact = TRUE, .logExact = FALSE,
                                  .DistrCollapse = 
                                    getdistrOption("DistrCollapse"),
                                  .DistrCollapse.Unique.Warn = 
                                    getdistrOption("DistrCollapse.Unique.Warn"),
                                  .DistrResolution = getdistrOption("DistrResolution"),
                                  Symmetry = NoSymmetry()){
  DiscreteDistribution(supp = data, .withArith = .withArith, .withSim = .withSim,
                       .lowerExact = .lowerExact, .logExact = .logExact, 
                       .DistrCollapse = .DistrCollapse, 
                       .DistrCollapse.Unique.Warn = .DistrCollapse.Unique.Warn,
                       .DistrResolution = .DistrResolution,
                       Symmetry = Symmetry)
}