Another Word For It Patrick Durusau on Topic Maps and Semantic Diversity

April 14, 2012

How R Searches and Finds Stuff

Filed under: R — Patrick Durusau @ 6:26 pm

How R Searches and Finds Stuff by Suraj Gupta.

From the post:

Or…
How to push oneself down the rabbit hole of environments, namespaces, exports, imports, frames, enclosures, parents, and function evaluation?

Motivation

There are a few reasons to bother reading this post:

  1. Rabbit hole avoidance
    You have avoided the above mentioned topics thus far, but now it’s time to dive in. Unfortunately you speak English, unlike the R help manuals which speak “Hairy C” (imagine a somewhat hairy native C coder from the 80s who’s really smart but grunts a lot…not the best communicator).
  2. R is acting a fool
    Your function used to work, now it spits an error. Absolutely nothing about this particular function has changed. You vaguely remember installing a new package, but what does that matter? Unfortunately my friend, it does matter.
  3. R is finding the wrong thing
    You attached the matlab package and call sum() on a numeric matrix. The result is a vector of column sums, not a length 1 numeric. This messes up everything. What were you thinking trying to make R act like Matlab? Matlab is for losers (and rich people).
  4. You want R to find something else
    You like a package’s plotting function. If you could intercept one call within the function and use your own calculation, it would be perfect. This seems like black magic to you, but something is strange about maintaining a full copy of the function just to apply your little tweak. Welcome to the dark arts.
  5. Package authoring
    You have authored a package. How does your kid plays with the other kids in the playground?

Apologies for being quite so “practical” but the rise of R as a data mining/analysis language means that people are also using it for the creation of topic maps. Do have to cover when the “rubber hits the road” every now and again. 😉

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress