matsindf (version 0.3.0)

matsindf_apply_types: Determine types of ... argument for matsindf_apply

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

matsindf_apply_types(...)

Arguments

...

the list of arguments to be checked

Value

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

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.

Examples

Run this code
# NOT RUN {
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")
# }

Run the code above in your browser using DataLab