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
sin_data(100, 4)
#> # A tibble: 100 × 4
#> V1 V2 V3 V4
#> <dbl> <dbl> <dbl> <dbl>
#> 1 2.43 1.72 -0.352 -0.345
#> 2 -0.537 -0.452 0.644 0.601
#> 3 -0.578 -0.161 -0.377 -0.368
#> 4 0.921 1.63 1.30 0.964
#> 5 0.949 0.160 -1.95 -0.930
#> 6 0.196 -0.0319 0.903 0.786
#> 7 -1.49 0.0836 1.06 0.871
#> 8 -0.355 1.06 -0.126 -0.126
#> 9 -1.03 -2.72 0.0416 0.0417
#> 10 -0.322 -0.115 0.0701 0.0702
#> # ℹ 90 more rows
sin_data(100, 2, 200)
#> # A tibble: 100 × 2
#> V1 V2
#> <dbl> <dbl>
#> 1 -0.381 -0.392
#> 2 -1.72 -1.05
#> 3 0.203 0.131
#> 4 0.589 0.539
#> 5 0.963 0.818
#> 6 0.151 0.104
#> 7 -0.513 -0.546
#> 8 0.941 0.779
#> 9 0.541 0.449
#> 10 -0.144 -0.164
#> # ℹ 90 more rows