Get angle from origin to vector of x,y coordinates
xyAngle(
x,
y = NULL,
directed = FALSE,
deg = TRUE,
origin.x = 0,
origin.y = 0,
...
)
numeric vector or two-column matrix with columns
representing x,y coordinates when y is NULL
.
numeric vector or NULL
.
logical indicating whether to return angles around
the full circle, or only half circle. For example, in degrees
c(1,1)
indicates 45 degrees, c(-1,-1)
indicates -135 degrees.
When directed=FALSE
then c(-1,-1)
indicates 45 degrees.
logical indicating whether to return degrees, or when
deg=FALSE
it returns radians.
numeric input defining the coordinates to use as the origin. When non-zero it implies the first point of each segment.
additional arguments are ignored.
This function gets the angle from origin to x,y coordinates, allowing for vectorized input and output.
Other jam utility functions:
avg_angles()
,
avg_colors_by_list()
,
call_fn_ellipsis_deprecated()
,
cell_fun_bivariate()
,
collapse_mem_clusters()
,
colorRamp2D()
,
deconcat_df2()
,
display_colorRamp2D()
,
enrichList2geneHitList()
,
filter_mem_genes()
,
filter_mem_sets()
,
find_colname()
,
get_hull_data()
,
get_igraph_layout()
,
gsubs_remove()
,
handle_igraph_param_list()
,
isColorBlank()
,
make_legend_bivariate()
,
make_point_hull()
,
mem_find_overlap()
,
order_colors()
,
rank_mem_clusters()
,
rotate_coordinates()
,
subgraph_jam()
,
subset_mem()
,
summarize_node_spacing()
# by default output is in degrees
xyAngle(1, 1);
#> [1] 45
# output in radians
xyAngle(1, 1, deg=FALSE);
#> [1] 0.7853982
# optionally different origin
xyAngle(1, 1, origin.x=1, origin.y=0);
#> [1] 90