Based on user input seeds, this function generates a data frame of n pseudo-random numbers and names the column containing these as "RN" for "random numbers." This is achieved by calling junkgen.

mlsjunkgend(n = 1, w, x, y, z, round = 5)

Arguments

n

the number of pseudo-random numbers to generate; defaults to 1

w

the first seed required by the MLS Junk Generator algorithm

x

the first seed required by the MLS Junk Generator algorithm

y

the first seed required by the MLS Junk Generator algorithm

z

the first seed required by the MLS Junk Generator algorithm

round

the number of decimal places to which to round the pseudo-random numbers; default = 5

Value

A numeric vector containing a single pseudo-random number

Examples

# Generate a pseudo-random number data frame with 10 observations from user-specified seeds w <- 1 x <- 2 y <- 3 z <- 4 mlsjunkgend(n = 10, w = w, x = x, y = y, z = z) # returns a data frame of 10 observations
#> RN #> 1 0.95516 #> 2 0.66908 #> 3 0.21235 #> 4 0.34488 #> 5 0.11995 #> 6 0.56398 #> 7 0.59235 #> 8 0.11432 #> 9 0.33525 #> 10 0.70271
# Specifying different values for n and round mlsjunkgend(n = 5, w = w, x = x, y = y, z = z, round = 2)
#> RN #> 1 0.96 #> 2 0.67 #> 3 0.21 #> 4 0.34 #> 5 0.12
# returns a data frame identical to the above example but with only 5 observations # rounded to 2 decimal places # using the default value of n (1) is identical to assigning the rounded result of # junkgen to a data frame of 1 observation round(junkgen(w = w, x = x, y = y, z = z), 5) # returns "[1] 0.95516"
#> [1] 0.95516
mlsjunkgend(w = w, x = x, y = y, z = z)
#> RN #> 1 0.95516
# returns the following: # RN # 1 0.95516