Skip to content

set.seed() only works for the first row of a dataframe. #73

Description

@cfreder2

Neat package.

One minor thing, running this will result in a different person for the second row of the dataframe. The seed is only respected for the first run.

set.seed(1842)
randomNames(2, which.names = "both", return.complete.data = T)

The workaround:
set.seed(1842)
df1 <- bind_rows(randomNames(1, gender = T, ethnicity = T, which.names = "both", return.complete.data = T),
randomNames(1, gender = T, ethnicity = T, which.names = "both", return.complete.data = T),
randomNames(1, gender = T, ethnicity = T, which.names = "both", return.complete.data = T))

Any thoughts on allowing us to set the seed so we can always reproduce the same set of names?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions