The R-side equivalent of what nvar()'s X = rd(0, 3)
or Y = sin(X) + rd would generate inside TDA: tda_rd(n, a,
b) is uniform on [a, b] (rd's two-argument form,
a + random1() * (b - a)),
and tda_rd(n) alone – rd with no arguments –
is uniform on [0, 1], not the wider, arbitrary range a
hand-rolled substitute might reach for. tda_rdn is the same
idea for rdn, a standard normal.
Details
These use R's random number generator, not tda_runif's
reproduction of TDA's exact stream – for building a data frame to
pass to TDA (rather than reproducing an existing TDA example's
numbers bit for bit), R's generator is what set.seed()
already controls.