This function calculates the orthogonal projection of a point (cloud) in a Euclidean space to a affine subspace.

1 | ```
affine_projection(cloud, subspace)
``` |

`cloud` |
An m-by-n matrix of coordinates for m points in n-dimensional space. |

`subspace` |
An k-by-n matrix of coordinates spanning the (k - 1)-dimensional affine subspace. |

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.