csgillespie / efficientR

Efficient R programming: a book
https://csgillespie.github.io/efficientR/
Other
721 stars 375 forks source link

6.3.2 Changing the order of "age" and "sex" #287

Closed thrkng closed 4 years ago

thrkng commented 4 years ago

changed the order of "sex" and "age" in the section 6.3.2.

Robinlovelace commented 4 years ago

What's the thinking behind this suggestion? Thanks for the PR in any case @thrkng.

thrkng commented 4 years ago

It's very trivial, but the sample data of agesex is like "m0-10", so I think the variable agesex should be separated into c("sex", "age") instead of c("age", "sex") because "m" is sex and "0-10" is age.