Description Usage Arguments Value Details Examples

This function builds on `sample`

to provide sampling from a vector, but with all
zero entries fixed. This way, `zfsample(c(0,1,0,2))`

may result in (0,1,0,2) or (0,2,0,1), but the
positions that were initially zero will remain zeroed.

1 |

`x` |
Either a vector of one or more elements from which to choose, or a positive integer. |

`replace` |
Should sampling be with replacement? |

a vector of the same length of 'x' with elements drawn from 'x'.

The actual sampling is done by `sample`

, so its help page should be checked
for details on the parameter handling. The parameter 'size' is always passed as `length(x)`

,
and 'prob' is not supported.

1 2 3 4 5 6 7 8 |

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.