| data_gen | R Documentation |
Generates either:
Structured (x, y) scatter data (linear, sine, circle, etc.), or
A matrix of scaled orthogonal polynomial features.
data_gen(type = "all", n = 500, degree = NULL, seed = NULL)
type |
Character string. Options:
|
n |
Integer. Number of samples to generate. Default is 500. |
degree |
Integer. Degree of polynomial features (only for |
seed |
Optional integer. Sets random seed for reproducibility. |
If type = "polynomial", returns a matrix (n x degree).
Otherwise a tibble with columns:
x: Numeric vector of x-values
y: Numeric vector of y-values
structure: Character name of the structure type
data_gen("linear", n = 200)
data_gen("polynomial", degree = 4, n = 200)
data_gen("all", n = 200)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.