matsindf_apply_types: Determine types of ... argument for matsindf_apply

Description Usage Arguments Details Value Examples

View source: R/matsindf_apply.R

Description

This is a convenience function that returns a logical list for the types of ... with components named dots_present, all_dots_num, all_dots_mats, all_dots_list, all_dots_vect, and all_dots_char.

Usage

1

Arguments

...

the list of arguments to be checked

Details

When arguments are present in ..., dots_present is TRUE but FALSE otherwise. When all items in ... are single numbers, all_dots_num is TRUE and all other list members are FALSE. When all items in ... are matrices, all_dots_mats is TRUE and all other list members are FALSE. When all items in ... are lists, all_dots_list is TRUE and all other list members are FALSE. When all items in ... are vectors (including lists), all_dots_vect is TRUE. When all items in ... are character strings, all_dots_char is TRUE and all other list members are FALSE.

Value

A logical list with components named dots_present, all_dot_num, all_dots_mats, all_dots_list, and all_dots_char.

Examples

1
2
3
4
5
matsindf_apply_types(a = 1, b = 2)
matsindf_apply_types(a = matrix(c(1, 2)), b = matrix(c(2, 3)))
matsindf_apply_types(a = c(1, 2), b = c(3, 4), c = c(5, 6))
matsindf_apply_types(a = list(1, 2), b = list(3, 4), c = list(5, 6))
matsindf_apply_types(a = "a", b = "b", c = "c")

MatthewHeun/matsindf documentation built on Nov. 12, 2018, 2:32 p.m.