r-novice-inflammation icon indicating copy to clipboard operation
r-novice-inflammation copied to clipboard

A better way to begin Lesson 3

Open yuanxiesa opened this issue 4 years ago • 3 comments

Hi, I suggest removing the example of the "analyze" function at the very beginning. The reason is that I found the second example (function "print_words") is a more straight-forward and compelling example to demonstrate the limitation of hard-coding and the value of loops to the learners. I understand putting the "analyze" function at the beginning may show the continuity. But in practice, it is just not a powerful example and risks losing learners' attention.

Thanks!

yuanxiesa avatar Feb 29 '20 15:02 yuanxiesa

Hi. Thanks for the suggestion. Do you think reworking the analyze function to use mfrow to make the example shorter might help? The idea is to have a motivating example, but it is true that the current form is visually noisy.

In an actual workshop the instructors would probably gloss over the analyze function itself at this stage.

HaoZeke avatar Mar 27 '20 13:03 HaoZeke

HaoZeke,

I believe it is not the use of the function itself but rather the task itself and moreover the question it is linked to - the wording does not play nicely with the previous lesson, #2

How can I do the same thing to multiple data sets?

The notion of "function" is already introduced, so why not use it?

A possible change can be:

What do I do if I have different data sets, but need to repeat the same steps?

How can I apply a function to different data sets

Some sort of introductory sentence is also needed there at the start:

As we saw in the previous lesson, performing same steps again and again can be a routine task created as a function. One of such routine tasks can be performing the same analysis on different datasets

maria-pro avatar Apr 10 '20 03:04 maria-pro

Thank you for the clarifications! I think your changes make a lot of sense, would you be willing to put them in a PR?

HaoZeke avatar Apr 10 '20 18:04 HaoZeke