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

More explanation of functions? [episode 1 or 2]

Open mellertd opened this issue 5 years ago • 7 comments

Reading through 1. Analyzing Patient Data and it seems like functions are kind of glossed over (there are hyperlinks to explanations), whereas variables get a lot of explanation with diagrams. It seems a little uneven, particularly since functions are passed to another function as arguments later in the lesson (where apply is discussed). Are learners experiencing any problems with the function concept?

Regardless, I think it might be a good idea to add a learning objective. Something like "Learn how to use functions to perform operations on data".

mellertd avatar Aug 31 '18 19:08 mellertd

Hello @mellertd and thanks for raising this topics :-)

I had considered your suggested learning objective as general to the entire lesson or even to the Carpentries. I'd be happy to review a PR with a specific wording suggestion. "Operations" could for example be confusing functions and operators. Also, "built-in functions" could be useful to distinguish those in 1. from the more specific objectives in 2. Creating Functions ;-)

Are learners experiencing any problems with the function concept?

I haven't heard such a question from learners, but I also have taught far less often than @diyadas or others.

Cheers! Katrin

katrinleinweber avatar Sep 01 '18 05:09 katrinleinweber

Hello!

I had not noticed particular difficulties with functions. If anything, I'd prefer a PR on episode 2, creating functions - it would indeed be a good way to reinforce episode 1. Something along the lines of

In episode 1, we learned about several of R's built-in functions, which can be applied to variables to perform distinct operations. What if you wanted to perform an operation (or several) for which R doesn't yet have a function? You can write your own functions in R. In this lesson, we'll learn how to write a function so that we can repeat several operations with a single command. This will be useful later for repeating our analysis of inflammation data on all 12 files.

would be a better opening paragraph than the current one. Wording could be improved :) The file to edit for this PR is located in the _episodes_rmd directory.

diyadas avatar Sep 01 '18 05:09 diyadas

Hi @mellertd: Are you interested in starting the PR Diya suggested or should someone else do it?

katrinleinweber avatar Apr 04 '19 08:04 katrinleinweber

Sorry this fell off my radar. I thought the wording looked pretty good in Diya's response. Totally swamped at the moment so if someone can take it, that would be great. Otherwise I'll get to it as soon as I can (and will set a reminder for myself!)

mellertd avatar Apr 04 '19 16:04 mellertd

Still on Creating Functions, I think the first objective might be confusing to a novice from a non programming background. If one is told to define a function with such a background, it would imply to give the meaning of the word function and even the meaning may be different from what is expected herein. So I my view it is preferable to give an explicit definition of the word function as used in here, and mention that definition of function is actually creating a group of statements of code that perform some task.

nelsonky avatar Jun 12 '19 09:06 nelsonky

Thanks. Am still new though on this and would want to learn more as we improve.

On Thu, 13 Jun 2019 at 12:06, Katrin Leinweber [email protected] wrote:

Yeah, good point! Please send a Pull Request by using the Improve this page link on top of the lesson page :-) I'd be happy to review it! I suggest to align the wording of the "Objectives" to the "Questions" so we can drop the "Define".

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/swcarpentry/r-novice-inflammation/issues/392?email_source=notifications&email_token=AEHRGNF247UBVFFHDUM2BCDP2IEXVA5CNFSM4FSW44BKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXTBHWI#issuecomment-501617625, or mute the thread https://github.com/notifications/unsubscribe-auth/AEHRGNHILF6X4FUG7PQVHULP2IEXVANCNFSM4FSW44BA .

--

Best Regards, Nelson Kemboi Yego, +254 723 695 775/ +250783124018

nelsonky avatar Jun 13 '19 09:06 nelsonky

Sure :-) I reviewed your PR https://github.com/swcarpentry/r-novice-inflammation/pull/435.

katrinleinweber avatar Jun 14 '19 15:06 katrinleinweber