Learn R Programming

cardinalR (version 1.0.6)

gen_quadratic: Generate Quadratic

Description

This function generates a dataset representing a structure with a quadratic pattern.

Usage

gen_quadratic(n = 500, range = c(-1, 1))

Value

A tibble containing a quadratic structure.

Arguments

n

A integer value (default: 500) representing the sample size.

range

A numeric vector (default: c(-1, 1)) representing the range along x1 axis.

Examples

Run this code
set.seed(20240412)
quadratic <- gen_quadratic(n = 500)

Run the code above in your browser using DataLab