brad-cannell / r4epi

Repository for the R for Epidemiology book
http://www.r4epi.com/
Other
18 stars 50 forks source link

Show them how we can pass values stored as vectors #133

Open mbcann01 opened 8 months ago

mbcann01 commented 8 months ago

Probably at the end of 5.5.5 nesting functions. Several of them were struggling in with making factors using:

yn_levs <- c(0, 1)

yn_labs <- c("No", "Yes")

factor(x, yn_levs, yn_labs)

show them how this works. Maybe with the seq() example from very early on.