Next: unique() Up: MacAnova Help File Previous: twotailt()   Contents

typeof()

Usage:
typeNames <- typeof(arg1 [, arg2 ...]), arg1, arg2 ... arbitrary
  variables, including macros and built-in functions.



Keywords: variables
                                  Usage
typename <- typeof(arg), where arg is any variable including macro and
built-in function sets typename to the type of arg, "CHARACTER",
"LOGIC", REAL", "STRUCTURE", "NULL", "MACRO", "FUNCTION", "UNDEFINED" or
"GRAPH".

typenames <- typeof(arg1, arg2 ...), where arg1, arg2, ... are any
variables, makes typenames a CHARACTER vector with length(typenames) =
number of arguments, with typenames[i] the name of the type of argument
i.

                                Examples
Examples:

  Cmd> a <- sqrt(2); typeof(a)
  (1) "REAL"

  Cmd> b <- "pi"; typeof(b)
  (1) "CHARACTER"

  Cmd> typeof(a) == typeof(b) # test equality of types
  (1) F

  Cmd> typeof(PI,T,"type",structure(PI,T),LASTPLOT,notavar,typeof,help)
  (1) "REAL"
  (2) "LOGICAL"
  (3) "CHARACTER"
  (4) "STRUCTURE"
  (5) "GRAPH"
  (6) "UNDEFINED"
  (7) "FUNCTION"
  (8) "MACRO"

                            Cross references
See also topics nameof(), shapeof(), isarray(), ischar(), isdefined(),
isfactor(), isfunction(), isgraph(), islogic(), ismacro(), ismatrix(),
isname(), isnull(), isnumber(), isreal(), isscalar(), isvector().


Gary Oehlert 2006-01-30