powered by
Utility function to create complex vectors from arguments specified as in grDevices::xy.coords() or otherwise
as_complex(x, y)# S4 method for xy,missing as_complex(x)# S4 method for numeric,numeric as_complex(x, y)# S4 method for numeric,missing as_complex(x, y)# S4 method for missing,numeric as_complex(x, y)
# S4 method for xy,missing as_complex(x)
# S4 method for numeric,numeric as_complex(x, y)
# S4 method for numeric,missing as_complex(x, y)
# S4 method for missing,numeric as_complex(x, y)
A complex vector specifying 2-dimensional coordinates
A numeric vector or missing, or an object inheriting from class "xy"
If x is a numeric an optional numeric vector, or missing. If x or y are missing they are taken as 0, but only one may be missing.
as_complex(cbind(1:3, 3:1)) as_complex(y = 1:3) ## real parts all zero
Run the code above in your browser using DataLab