The methods below are convenience short-cuts to take samples from data frames and data sets. They result in a data frame or data set, respectively, the rows of which are a sample of the complete data frame/data set.

1 2 3 4 5 6 |

`x` |
a data frame or data set. |

`size` |
an (optional) numerical value, the sample size,
defaults to the total number of rows of |

`replace` |
a logical value, determines whether sampling takes place with or without replacement. |

`prob` |
a vector of sampling probabities or NULL. |

A data frame or data set.

1 2 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.