[.Matdist | R Documentation |
Extract a WeightedDiscrete or Matdist from a Matdist.
## S3 method for class 'Matdist' md[i]
md |
Matdist from which to extract Distributions. |
i |
indices specifying distributions to extract. |
If length(i) == 1
then returns a WeightedDiscrete otherwise
returns a Matdist.
m <- as.Distribution( t(apply(matrix(runif(200), 20, 10, FALSE, list(NULL, sort(sample(1:20, 10)))), 1, function(x) x / sum(x))), fun = "pdf" ) m[1] m[1:2]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.