Description Usage Arguments Details Author(s) See Also Examples

Generates a lookup vector such that `x_at_y(x, y)[y] == x`

. Particularly useful
for generating lookup tables for nested indices in conjunction with `compose_data`

.

1 |

`x` |
Values in the resulting lookup vector. There should be only
one unique value of |

`y` |
Keys in the resulting lookup vector. Should be factors or integers. |

`missing` |
Missing levels from |

`x_at_y(x, y)`

returns a vector `k`

such that `k[y] == x`

. It also
fills in missing values in `y`

: if `y`

is an integer, `k`

will contain
entries for all values from `1`

to `max(y)`

; if `y`

is a factor,
`k`

will contain entries for all values from `1`

to `nlevels(y)`

.
Missing values are replaced with `missing`

(default `NA`

).

Matthew Kay

1 2 3 4 5 6 7 8 9 10 |

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.