Learn R Programming

pcds (version 0.1.8)

is.point: Check the argument is a point of a given dimension

Description

Returns TRUE if the argument p is a numeric point of dimension dim (default is dim=2); otherwise returns FALSE.

Usage

is.point(p, dim = 2)

Value

TRUE if p is a vector of dimension dim.

Arguments

p

A vector to be checked to see it is a point of dimension dim or not.

dim

A positive integer representing the dimension of the argument p.

Author

Elvan Ceyhan

See Also

dimension

Examples

Run this code
# \donttest{
A<-c(-1.22,-2.33); B<-c(2.55,3.75,4)
is.point(A)
is.point(A,1)

is.point(B)
is.point(B,3)
# }

Run the code above in your browser using DataLab