orthogonal | R Documentation |

If slope-point form of an equation is given, we might be interested in the slope-intercept form of the orthogonal to the equation running through the point.

```
orthogonal(b, xy)
```

`b` |
The slope. |

`xy` |
The point. |

A named vector with intercept ["a"] and slope ["b"], as in
`graphics::abline`

.
If the slope was 0, there is no slope-intercept form as this is a vertical
line. Then the intercept is `NA`

and the slope gives the value of
x.

```
orthogonal(1, c(x = 0, y = 0))
orthogonal(0, c(x = 4, y = 0))
orthogonal(-1, c(x = -2, y = -2))
orthogonal(Inf, c(x = 0, y = 4))
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.