swirldev / swirl_courses

:mortar_board: A collection of interactive courses for the swirl R package.
http://swirlstats.com
Other
4.32k stars 7.24k forks source link

[Suggestion] Example values in R Programming/Basic Building Blocks #401

Open therealssj opened 6 years ago

therealssj commented 6 years ago

the examples including collections use c(0, 10, 100) imo c(1, 10, 100) is a better value for two reasons

  1. 0 is like no-op and can lead to confusion sometimes. For e.g., I was going thru recycling example and it said that when the collection lengths are not integral multiples of each other a warning is shown but recycling is still done. The example in this c(1,2,3,4) + c(0, 10, 100) and the output was 1 12 103 4. I immediately had a doubt here, did recycling happen or not? I can't infer it 100% for the value 4 which remains unchanged.

  2. using c(1, 10, 100) immediatelty clicks as 10^0, 10^1, 10^2

I havent looked over the reposityory thoroughly so If you could point to me where the example values are stored, I would be happy to submit a PR.

P.S might be a good idea to label this as suggestion

Thnx for your work! :)