R: Generate a sample indicator vector

randconf {fpc} | R Documentation

## Generate a sample indicator vector

### Description

Generates a logical vector of length `n` with `p TRUE`s.

### Usage

    randconf(n, p)

### Arguments

`n` | positive integer.
`p` | positive integer.

### Value

A logical vector.

### Author(s)

Christian Hennig c.hennig@ucl.ac.uk http://www.homepages.ucl.ac.uk/~ucakche/

### See Also

`sample`

### Examples

      randconf(10,3)

[Package fpc version 2.1-10 Index]