Giter Club home page Giter Club logo

Comments (6)

mattsigal avatar mattsigal commented on June 9, 2024 2

This is because the name vector included in the package is only of length 331. You can either use a smaller n or use name(replace=TRUE).

from wakefield.

swestenb avatar swestenb commented on June 9, 2024

Update: Can be fixed by setting replace=TRUE when drawing names within the r_data_frame function. This code works:

df = r_data_frame(
  n = 500,
  name(replace=TRUE),
  id,
  race,
  age,
  sex,
  hour,
  iq,
  height,
  died
)
View(df)

from wakefield.

trinker avatar trinker commented on June 9, 2024

@swestenb @mattsigal I'd appreciate a pull request with a longer name vector. This issue comes up often.

from wakefield.

mattsigal avatar mattsigal commented on June 9, 2024

@trinker, seems reasonable to expand that list. Looking at the documentation for the dataset, you would prefer them to be gender-neutral (but then again, looking at the dataset itself - I've never met a female Matthew or Walter)?

from wakefield.

mattsigal avatar mattsigal commented on June 9, 2024

In #19 I have provided a much more extensive list of names (length = 95025). These pertain to the unique entries found in the babynames package (https://cran.r-project.org/web/packages/babynames/).

from wakefield.

trinker avatar trinker commented on June 9, 2024

@mattsigal Thanks for the PR! I'm closing this issue now.

from wakefield.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.