View source: R/datasets-generators.R
torus | R Documentation |
The user should provide the number of points n_samples
to be generated on
the torus and the dimension dim
of the torus on which points would be
generated in R^{2 \mathrm{dim}}
. The sample
argument is optional and
is set to "random"
by default. The generated points are
returned as an array of shape n_\mathrm{samples} \times R^{2
\mathrm{dim}}
.
torus(n_samples, dim, sample = c("random", "grid"))
n_samples |
An integer value specifying the sample size. |
dim |
An integer value specifying the dimension |
sample |
A string specifying the sampling type. Choices are |
A numeric array of shape n_\mathrm{samples} \times R^{2
\mathrm{dim}}
storing the sampled points.
torus(10, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.