How to (correctly) load a package

Adventures with R

The great Fela sang “Teacher no teach me nonsense” .

While taking a course in Machine Learning the other day, I came across this:

To find this kind of code on a course amazed even me, an R neophyte, as there is so much wrong with this function that is wrong and it really left me puzzled. What made it worse was that the course is being organised by a highly reputable software giant.

But please, if you’re loading (or more correctly, attaching) a package within a function, do not call library(); rather make use of require(). This blog by the author of the knitr package explains it better than I ever could.

View original post

Leave a comment

Filed under Uncategorized

Your comments:

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.