Learn R Programming

SNscan (version 1.0)

rmulti.one: Generate Random (0, 1) Multinomial Data

Description

Generate random multinomial data in which all value no more than 1.

Usage

rmulti.one(size, p)

Arguments

size
Integer, the number of random samples from the multinomial distribution.
p
Numeric vector, probability vector for all categories (the sum of p should be 1).

Value

Random (0,1) vector

See Also

rmultinom

Examples

Run this code
rmulti.one(size=5, p=rep(1/10,10))

Run the code above in your browser using DataLab