Description Usage Arguments Details Value Author(s) See Also Examples
Adds a column to a data frame probability space containing the values of a random variable computed from the existing columns of the space.
1 |
space |
a data frame with a |
FUN |
a function to be applied to each row of outcomes in |
invars |
a character vector indicating input columns of |
name |
an (optional) name to give the defined random variable. |
... |
an expression defining a random variable. |
There are two ways to add a random variable to a data frame probability space; see the examples. The argument FUN has precedence and will be used if specified. If name is not specified, then the new random variable will be called X. Note that this function only works for data frames, as a method for objects of class ps has not been implemented.
The input data frame with an additional column called name.
G. Jay Kerns gkerns@ysu.edu.
See transform to add a column to a data frame of outcomes (not yet a probability space).
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.