Logical. Default is FALSE. If TRUE, the direction from (instead of to) the nearest cell that is not NA is returned
degrees
Logical. If FALSE (the default) the unit of direction is radians.
method
character. Should be "geo", or "cosine". With "geo" the most precise but slower geodesic method of Karney (2003) is used. The "cosine" method is faster but less precise