tests/testthat/_snaps/polynomial.md

gen_quadratic() works

Code
  gen_quadratic(n = 500, p = 4)
Message
  v 2 noise dimensions have been generated successfully!!!
  v Data generation completed successfully!!!
Output
  # A tibble: 500 x 4
          x1      x2      x3       x4
       <dbl>   <dbl>   <dbl>    <dbl>
   1  0.812   0.353  -0.0991 -0.114  
   2  0.139   0.491   0.115   0.128  
   3 -0.479  -0.623  -0.0788 -0.130  
   4 -0.287  -0.0690 -0.0388  0.0214 
   5 -0.804  -1.05    0.0735  0.126  
   6  0.617   0.413  -0.0929 -0.111  
   7  0.801   0.501  -0.0258 -0.0625 
   8 -0.0689  0.0441  0.0236 -0.00953
   9  0.294   0.394  -0.0365 -0.130  
  10  0.118   0.565   0.0630  0.112  
  # i 490 more rows

gen_cubic() works

Code
  gen_cubic(n = 500, p = 4)
Message
  v 2 noise dimensions have been generated successfully!!!
  v Data generation completed successfully!!!
Output
  # A tibble: 500 x 4
          x1      x2      x3       x4
       <dbl>   <dbl>   <dbl>    <dbl>
   1  1.72   -0.203  -0.0991 -0.114  
   2  0.709   1.23    0.115   0.128  
   3 -0.219  -0.0743 -0.0788 -0.130  
   4  0.0699  0.374  -0.0388  0.0214 
   5 -0.705   0.547   0.0735  0.126  
   6  1.42    0.738  -0.0929 -0.111  
   7  1.70    0.0116 -0.0258 -0.0625 
   8  0.397   0.609   0.0236 -0.00953
   9  0.941   1.18   -0.0365 -0.130  
  10  0.677   1.29    0.0630  0.112  
  # i 490 more rows


Try the cardinalR package in your browser

Any scripts or data that you put into this service are public.

cardinalR documentation built on Aug. 21, 2025, 5:27 p.m.