Description Usage Arguments Details See Also
By default, checks type_of
objects and two objects are
considered type_alike
if they have the same type. There is special
handling for integers, reals, and functions.
1 | type_alike(target, current, mode = 0L, fuzzy.int.max.len = 100)
|
target |
the object to test type alikeness against |
current |
the object to test the type alikeness of |
mode |
integer(1L) in 0:2, see details |
fuzzy.int.max.len |
max length of numeric vectors to consider for
integer likeness (e.g. |
For integers and reals, if current
is integer or integer-like
(e.g. 1.0) it will match real or integer target
values. Closures,
built-ins, and specials are all treated as type function.
Specific behavior can be tuned with the mode
parameter the values
of which range from 0L
to 2L
, with a lower value
corresponding to more relaxed comparison level.
0: integer like reals (e.g. 1.0
) can match against integer
templates, and integers always match real templates; all
function types are considered of the same type
1: integers always match against numeric templates, but not vice versa, and integer-like reals are treated only as reals; functions only match same function type (i.e. closures only match closures, builtins builtins, and specials specials)
2: types must be equal for all objects types (for functions, this is unchanged from 1)
type_of, alike
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.