Logical. If FALSE (the default) the unit of direction is radians.
from
Logical. Default is FALSE. If TRUE, the direction from (instead of to) the nearest cell that is not NA is returned
doEdge
Logical. If TRUE, the boundaries function is called first. This may be efficient in cases where you compute the distance to large blobs. Calling boundaries determines the edge cells that matter for distance computation