# Unwhich

From DescTools v0.99.19
by Andri Signorell

##### Inverse Which

The inverse function to `which`

creates a logical
vector/matrix from indices.

##### Usage

`Unwhich(idx, n, useNames = TRUE)`

##### Arguments

- idx
- the indices as returned by
`which`

. - n
- integer, the length of the original vector.
- useNames
- logical, determining if the names of the indices should be preserved.

##### Value

`TRUE`

on the positions `i`

.##### References

##### See Also

##### Examples

```
ll <- c(TRUE, FALSE, TRUE, NA, FALSE, FALSE, TRUE)
names(ll) <- letters[seq(ll)]
i <- which(ll)
# back again (loosing the names of the FALSEs)
Unwhich(i, length(ll))
```

*Documentation reproduced from package DescTools, version 0.99.19, License: GPL (>= 2)*

### Community examples

Looks like there are no examples yet.