Description Usage Arguments Details Value Examples

`asInteger`

is intended to be used for vectors while `asInt`

is
a specialization for scalar integers and `asCount`

for scalar
non-negative integers.
Convertible are (a) atomic vectors with all elements `NA`

and (b) double vectors with all elements being within `tol`

range of an integer.

Note that these functions may be deprecated in the future.
Instead, it is advised to use `assertCount`

,
`assertInt`

or `assertIntegerish`

with
argument `coerce`

set to `TRUE`

instead.

1 2 3 4 5 6 7 8 9 10 | ```
asInteger(x, tol = sqrt(.Machine$double.eps), lower = -Inf,
upper = Inf, any.missing = TRUE, all.missing = TRUE, len = NULL,
min.len = NULL, max.len = NULL, unique = FALSE, sorted = FALSE,
names = NULL, .var.name = vname(x))
asCount(x, na.ok = FALSE, positive = FALSE,
tol = sqrt(.Machine$double.eps), .var.name = vname(x))
asInt(x, na.ok = FALSE, lower = -Inf, upper = Inf,
tol = sqrt(.Machine$double.eps), .var.name = vname(x))
``` |

`x` |
[any] |

`tol` |
[ |

`lower` |
[ |

`upper` |
[ |

`any.missing` |
[ |

`all.missing` |
[ |

`len` |
[ |

`min.len` |
[ |

`max.len` |
[ |

`unique` |
[ |

`sorted` |
[ |

`names` |
[ |

`.var.name` |
[ |

`na.ok` |
[ |

`positive` |
[ |

This function does not distinguish between
`NA`

, `NA_integer_`

, `NA_real_`

, `NA_complex_`

`NA_character_`

and `NaN`

.

Converted `x`

.

1 2 3 |

```
[1] 1 2 3
[1] 1
[1] 1
```

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.