The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Title: Predicate Helper Functions for Testing Simple Atomic Vectors
Version: 1.0.0
Maintainer: Sam Semegne <sam.ahoi@hotmail.com>
Description: Predicate helper functions for testing atomic vectors in R. All functions take a single argument 'x' and check whether it's of the target type of base-R atomic vector (i.e. no class extensions nor attributes other than 'names'), returning TRUE or FALSE. Some additionally check for value (e.g. absence of missing values, infinities, blank characters, or 'names' attribute; or having length 1).
License: GPL-3
Encoding: UTF-8
RoxygenNote: 7.3.1
Depends: R (≥ 3.0.0)
Suggests: tinytest (≥ 1.4.1)
URL: https://github.com/samsemegne/vek
NeedsCompilation: no
Packaged: 2024-05-22 07:36:31 UTC; Sam
Author: Sam Semegne [aut, cre]
Repository: CRAN
Date/Publication: 2024-05-23 07:40:03 UTC

vek

Description

Predicate helper functions for testing atomic vectors.

All functions take a single argument x and check whether it's of the target type of base-R atomic vector, returning TRUE or FALSE. Some additionally check for value. Classes that extend any base-R atomic vector return FALSE. Vectors that carry any attributes other than 'names' return FALSE.

Function names may include a suffix that encodes what additional conditions are evaluated. A select combination of these conditions is provided for each type. Naming scheme:

For example:

Supported types: logical, integer, double, numeric, and character.

Usage

is_lgl_vec(x)

is_lgl_vec_x(x)

is_lgl_vec_x1(x)

is_lgl_vec_n(x)

is_lgl_vec_nx(x)

is_lgl_vec_nx1(x)

is_int_vec(x)

is_int_vec_x(x)

is_int_vec_x1(x)

is_int_vec_n(x)

is_int_vec_nx(x)

is_int_vec_nx1(x)

is_dbl_vec(x)

is_dbl_vec_x(x)

is_dbl_vec_y(x)

is_dbl_vec_z(x)

is_dbl_vec_xy(x)

is_dbl_vec_yz(x)

is_dbl_vec_xyz(x)

is_dbl_vec_x1(x)

is_dbl_vec_y1(x)

is_dbl_vec_xy1(x)

is_dbl_vec_yz1(x)

is_dbl_vec_xyz1(x)

is_dbl_vec_n(x)

is_dbl_vec_nx(x)

is_dbl_vec_ny(x)

is_dbl_vec_nz(x)

is_dbl_vec_nxy(x)

is_dbl_vec_nyz(x)

is_dbl_vec_nxyz(x)

is_dbl_vec_nx1(x)

is_dbl_vec_ny1(x)

is_dbl_vec_nxy1(x)

is_dbl_vec_nyz1(x)

is_dbl_vec_nxyz1(x)

is_chr_vec(x)

is_chr_vec_x(x)

is_chr_vec_b(x)

is_chr_vec_xb(x)

is_chr_vec_x1(x)

is_chr_vec_b1(x)

is_chr_vec_xb1(x)

is_chr_vec_n(x)

is_chr_vec_nx(x)

is_chr_vec_nb(x)

is_chr_vec_nxb(x)

is_chr_vec_nx1(x)

is_chr_vec_nb1(x)

is_chr_vec_nxb1(x)

is_num_vec(x)

is_num_vec_x(x)

is_num_vec_y(x)

is_num_vec_z(x)

is_num_vec_xy(x)

is_num_vec_yz(x)

is_num_vec_xyz(x)

is_num_vec_x1(x)

is_num_vec_y1(x)

is_num_vec_yz1(x)

is_num_vec_xy1(x)

is_num_vec_xyz1(x)

is_num_vec_n(x)

is_num_vec_nx(x)

is_num_vec_ny(x)

is_num_vec_nz(x)

is_num_vec_nxy(x)

is_num_vec_nyz(x)

is_num_vec_nxyz(x)

is_num_vec_nx1(x)

is_num_vec_ny1(x)

is_num_vec_nyz1(x)

is_num_vec_nxy1(x)

is_num_vec_nxyz1(x)

Arguments

x

any.

Value

logical. Returns TRUE or FALSE.

See Also

vector()

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.