Closed jdblischak closed 9 years ago
Maybe I'm tripping, but are the Rmd and html version in sync? https://jdblischak.github.io/bc/novice/r/03-loops-R.html
Maybe I'm tripping, but are the Rmd and html version in sync? https://jdblischak.github.io/bc/novice/r/03-loops-R.html
No. You're right. I merged my local branches to the gh-pages to help everyone see the final rendered form. Unfortunately the local branches were not up-to-date. I am fixing that for this lesson and ensuring the problem doesn't occur for the other lessons as well. So sorry about that!
Alright. They are in sync now. That could have been a disaster. Luckily, this was the only lesson that was out-of-date. Thanks again for catching that!
I think this is an excellent translation of the python lecture, good job!
On Tue, Sep 9, 2014 at 10:44 PM, Bernhard Konrad notifications@github.com wrote:
I think this is an excellent translation of the python lecture, good job!
Thanks for the review, Bernhard! I've incorporated your suggestions.
This is ready for review. Unfortunately the Markdown file is not properly rendered by GitHub because of the html we purposely add for proper display from our website. To compare both the rendered Python and R versions of the lessons, follow the instructions below:
Then compare the rendered files
_site/novice/r/03-loops-R.html
and_site/novice/python/03-loop.html
.Quick summary of the major changes
I used the easier syntax
for (for item in collection)
instead offor (i in seq_along(collection))
because it is easier for novices that are first learning how to write afor
loop and also because it is in line with the novice Python lesson. The Python equivalent to R'sseq_along(collection)
would berange(len(collection))
.I removed many topics that are more specific to the Python lesson. For example, I see no natural way to discuss mutable vs immutable types in a novice R lesson. Also, there is no need to introduce the
list
class in this lesson because R is vectorized.@gavinsimpson added an in-depth explanation of loops in R that nicely explains many of the misconceptions that many new R users have. I felt that this discussion was too advanced for novices that just wrote their first
for
loops. Thus I separated it into a separate supplementary file and linked to it from the main lesson. This way online learners that have more experience programming in R can benefit from this explanation.