Generating sine wave sample
sinData.Rd
n-1 points are drawn from a normal distribution with mean=0, sd=1, the points in the final direction are calculated as the sine of the values of direction n-1 with additional jittering controled by the jitter factor f.
Examples
sinData(4, 100)
#> New names:
#> • `` -> `...1`
#> • `` -> `...2`
#> • `` -> `...3`
#> • `` -> `...4`
#> # A tibble: 100 × 4
#> ...1 ...2 ...3 ...4
#> <dbl> <dbl> <dbl> <dbl>
#> 1 -0.314 2.00 -0.652 -0.607
#> 2 -1.29 -0.382 0.810 0.725
#> 3 0.117 -1.67 0.721 0.660
#> 4 1.39 -0.420 0.802 0.719
#> 5 -0.182 0.435 -1.01 -0.848
#> 6 -0.668 2.18 1.02 0.851
#> 7 1.25 -0.0606 0.525 0.501
#> 8 -0.572 -0.196 0.729 0.667
#> 9 0.345 0.513 -0.174 -0.173
#> 10 -0.461 -0.0379 0.945 0.810
#> # ℹ 90 more rows
sinData(2, 100, 200)
#> New names:
#> • `` -> `...1`
#> • `` -> `...2`
#> # A tibble: 100 × 2
#> ...1 ...2
#> <dbl> <dbl>
#> 1 1.48 1.00
#> 2 0.734 0.681
#> 3 -2.57 -0.544
#> 4 0.242 0.201
#> 5 -0.0139 0.0103
#> 6 -1.10 -0.887
#> 7 -0.161 -0.144
#> 8 0.763 0.675
#> 9 1.72 0.982
#> 10 0.236 0.259
#> # ℹ 90 more rows