Learn R Programming

MUVR2 (version 0.1.0)

sampling_from_distribution: Sampling from the distribution of something

Description

Sampling from the distribution of something

Usage

sampling_from_distribution(X, upperlimit, lowerlimit, extend, n)

Value

a resampled thing

Arguments

X

a vector (numeric or factor) where the distribution/probility will be generated

upperlimit

if X is numeric, set upper limit

lowerlimit

if X is numeric, set lower limit

extend

If X is numeric, how much you want to extend from the lower and upper existing X.

n

How many you want to sample

Examples

Run this code
data("mosquito")
sampling_from_distribution(Yotu)
data("freelive2")
sampling_from_distribution(YR2,
                           upperlimit=200,
                           lowerlimit=0,
                           n=length(YR2)
                           )

Run the code above in your browser using DataLab