powered by
Create an object that represents a probability measure that is supported on a two-dimensional grid.
otgrid( mass, x = NULL, y = NULL, sorted = FALSE, normalize = FALSE, remove.zeros = FALSE )
object of class "otgrid". It contains the following elements:
"otgrid"
x
y
n
m
mass
total
Also note that the functions print and plot are available for objects of class "otgrid".
print
plot
matrix of non-negative weights.
vector of support points of the first marginal.
vector of support points of the second marginal.
logical value specifying whether or not the support points are sorted.
logical value specifying whether or not the total mass should be rescaled to 1.
logical value specifying whether or not marginals with no mass should be removed from the grid.
If x and y are not specified, then a equispaced unit grid is chosen.
plot plot.otgrid
plot.otgrid
x <- otgrid(cbind(1:2, 0, 3:4), remove.zeros = TRUE) print(x) # note that it's only 2 x 2 plot(x)
Run the code above in your browser using DataLab