Description Usage Arguments Details Value Author(s) Examples

View source: R/preselectedsample.R

Creates a random sample keeping the proportions of 1 and 0 that are in `label`

.

1 | ```
preselected.sample(label, ns)
``` |

`label` |
vector of 0 and 1. |

`ns` |
sample size, contain |

The aim of this method is to select randomly `ns`

index of `label`

. This function returns a vector of size `ns`

composed of random rank of `label`

.

`index.learn ` |
a vector of size |

Caroline Bazzoli, Thomas Bouleau, Sophie Lambert-Lacroix

1 2 3 4 5 | ```
#load data
data(BreastCancer)
index<-preselected.sample(BreastCancer$Y,10)
index
BreastCancer$Y[index]
``` |

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.