Description Usage Arguments Value Author(s) References Examples

This function generates an n by m array x, each of whose m columns contains n random values lying in the interval [a,b], subject to the condition that their sum be equal to s. The distribution of values is uniform in the sense that it has the conditional probability distribution of a uniform distribution over the whole n-cube, given that the sum of the x's is s.
The function uses the `randfixedsum`

algorithm, written by Roger Stafford and implemented in MatLab. For details, see http://www.mathworks.com/matlabcentral/fileexchange/9700-random-vectors-with-fixed-sum/content/randfixedsum.m

1 |

`a` |
The function |

`b` |
The argument |

`s` |
The argument |

`n` |
The number of requested elements per column. Default |

`m` |
The number of requested columns. Default |

`Seed` |
The seed that is used. Default |

An object of class `RandVec`

with components,

`RandVecOutput` |
The randomly generated vectors. |

Wim Van der Elst, Ariel Alonso, & Geert Molenberghs

The function is an R adaptation of a matlab program written by Roger Stafford. For details on the original Matlab algorithm, see: http://www.mathworks.com/matlabcentral/fileexchange/9700-random-vectors-with-fixed-sum/content/randfixedsum.m

1 2 3 4 5 6 |

```
Loading required package: MASS
Loading required package: msm
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE
3: .onUnload failed in unloadNamespace() for 'rgl', details:
call: fun(...)
error: object 'rgl_quit' not found
[1] 1
[1] 1
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.