Package: probs 0.9.9

Joe gr. Schlarmann

probs: Elementary Probability on Finite Sample Spaces

Performs elementary probability calculations on finite sample spaces, which may be represented by data frames or lists. This package is meant to rescue some widely used functions from the archived 'prob' package (see <https://cran.r-project.org/src/contrib/Archive/prob/>). Functionality includes setting up sample spaces, counting tools, defining probability spaces, performing set algebra, calculating probability and conditional probability, tools for simulation and checking the law of large numbers, adding random variables, and finding marginal distributions. Characteristic functions for all base R distributions are included.

Authors:G. Jay Kerns [aut, cph], Joe gr. Schlarmann [cre]

probs_0.9.9.tar.gz
probs_0.9.9.tar.gz(r-4.5-noble)probs_0.9.9.tar.gz(r-4.4-noble)
probs_0.9.9.tgz(r-4.4-emscripten)probs_0.9.9.tgz(r-4.3-emscripten)
probs.pdf |probs.html
probs/json (API)
NEWS

# Install 'probs' in R:
install.packages('probs', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

1.70 score 3 scripts 920 downloads 27 exports 5 dependencies

Last updated 5 months agofrom:56ae58f674. Checks:OK: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 06 2024
R-4.5-linuxOKNov 06 2024

Exports:addrvcardscountrepempiricaleuchredeckgen2wayTablegenIndepTablegenLogRegDatagenXdataiidspaceintersectis.probspaceisinisrepmarginalnoordernsamppermsnProbprobspacerolldieroulettesetdiffsimtosscoinunionurnsamples

Dependencies:combinatMASSplyrRcppreshape

Readme and manuals

Help Manual

Help pageTopics
Adding Random Variables to a Probability Spaceaddrv
A Standard Set of Playing Cardscards
Count Repetitions Counts the number of repetitions of 'vals' in a given vector 'x'.countrep
Count Repetitions Counts the number of repetitions of 'vals' in a given vector 'x'.countrep.data.frame
Count Repetitions Counts the number of repetitions of 'vals' in a given vector 'x'.countrep.default
Empirical Summary of a Simulationempirical
A Deck of Playing Cards for Euchreeuchredeck
Generate Two-way Tablesgen2wayTable
Generate Independent Two-way TablegenIndepTable
Generate data for logistic regressiongenLogRegData
Generate continuous model matrix datagenXdata
Independent Identical Experiments Sets up a probability space corresponding to independent, identical experiments.iidspace
Intersection of Subsets Calculates the intersection of subsets of a probability space. Comparisons are made row-wise, so that in the data frame case, 'intersect(A,B)' is a data frame with those rows that are both in 'A' and in 'B'.intersect
Intersection of Subsets Calculates the intersection of subsets of a probability space. Comparisons are made row-wise, so that in the data frame case, 'intersect(A,B)' is a data frame with those rows that are both in 'A' and in 'B'.intersect.data.frame
Intersection of Subsets Calculates the intersection of subsets of a probability space. Comparisons are made row-wise, so that in the data frame case, 'intersect(A,B)' is a data frame with those rows that are both in 'A' and in 'B'.intersect.default
Intersection of Subsets Calculates the intersection of subsets of a probability space. Comparisons are made row-wise, so that in the data frame case, 'intersect(A,B)' is a data frame with those rows that are both in 'A' and in 'B'.intersect.ps
Testing for a Probability Space Decides whether a given object is a probability space.is.probspace
Test Whether One Vector Is In Another Vectorisin
Test Whether One Vector Is In Another Vectorisin.data.frame
Test Whether One Vector Is In Another Vectorisin.default
Is Repeated in a Vector Tests for a certain number of repetitions of 'vals' in a given vector 'x'.isrep
Is Repeated in a Vector Tests for a certain number of repetitions of 'vals' in a given vector 'x'.isrep.data.frame
Is Repeated in a Vector Tests for a certain number of repetitions of 'vals' in a given vector 'x'.isrep.default
Marginal Distributionsmarginal
Sort and Merge Probability Space Outcomesnoorder
Number of Samples from an Urnnsamp
Generate All Permutations of x Elements Taken m at a Timepermsn
Probability and Conditional Probability Calculates probability and conditional probability of events.Prob
Probability and Conditional Probability Calculates probability and conditional probability of events.Prob.default
Probability and Conditional Probability Calculates probability and conditional probability of events.Prob.ps
Probability Spaces Forms a probability space from a set of outcomes and (optional) vector of probabilities.probspace
Probability Spaces Forms a probability space from a set of outcomes and (optional) vector of probabilities.probspace.default
Probability Spaces Forms a probability space from a set of outcomes and (optional) vector of probabilities.probspace.list
Rolling a Dierolldie
Rouletteroulette
Set Difference of Subsets Calculates the (nonsymmetric) set difference of subsets of a probability space.setdiff
Set Difference of Subsets Calculates the (nonsymmetric) set difference of subsets of a probability space.setdiff.data.frame
Set Difference of Subsets Calculates the (nonsymmetric) set difference of subsets of a probability space.setdiff.default
Set Difference of Subsets Calculates the (nonsymmetric) set difference of subsets of a probability space.setdiff.ps
Simulate Draws from a Sample Spacesim sim.default sim.ps
Subsets of Probability Spaces This is a method for 'subset()' for the case when the input object is a probability space of class 'ps'.subset.ps
Tossing a Cointosscoin
Union of Subsets Calculates the union of subsets of a probability space.union
Union of Subsets Calculates the union of subsets of a probability space.union.data.frame
Union of Subsets Calculates the union of subsets of a probability space.union.default
Union of Subsets Calculates the union of subsets of a probability space.union.ps
Sampling from Urns This function creates a sample space associated with the experiment of sampling distinguishable objects from an urn.urnsamples
Sampling from Urns This function creates a sample space associated with the experiment of sampling distinguishable objects from an urn.urnsamples.data.frame
Sampling from Urns This function creates a sample space associated with the experiment of sampling distinguishable objects from an urn.urnsamples.default