Hola, me llamo R

Homework was due soon and I was fighting with my completely entangled code:

“Everything looks good” I repeated to myself a hundred times even though I was not getting the expected result,… “everything looked good indeed”.

programmers-be-like

Learning the coding language was and still is pretty stressful. You cannot avoid thinking that some things take only one or two clicks in excel…., but anyways, I managed to write what I wanted the program to do in its language and: “->Run”!………. Some error popped out and I had NO clue what it meant.
After checking my code piece by piece I finally found the problem; that problem that haunts all of those who happen to have English as their second language:  “lenght”. There it was, laughing at me while I was pulling my hair out.
But then it hit me: I needed a spell check package. I could not afford to waste so much time due to these types of errors.

I started looking for packages and the first that popped up was “aspell” but when attempting to install it, R was kind enough to shatter my dreams of good spelling:

package ‘Aspell’ is not available (for R version 3.0.3)

No worries, keep looking. -> “Hunspell” and Ispell were not available either for my current R version! Damn…
Finally I found an easy, AVAILABLE and friendly package with a Youtube example called “qdap” that has a built in dictionary and the possibility to add words to it so one can check the spelling of the strings generated.

When learning a language, one usually starts with basic things for a couple of sessions:

Reading comprehension:
My name is Joe the cowboy and I like horses!

Listening: The Rolling Stones – I Can’t Get No (Satisfaction)

I can’t get no satisfaction
I can’t get no satisfaction
‘Cause I try and I try and I try and I try
I can’t get no, I can’t get no

Learning the coding language  for R feels like:

Reading comprehension:

‘Tis better to be vile than vile esteemed,
When not to be receives reproach of being,
And the just pleasure lost, which is so deemed
Not by our feeling, but by others’ seeing.
For why should others’ false adulterate eyes
Give salutation to my sportive blood?

Listening: Alanis Morissete – Ironic

“Well life has a funny way of sneaking up on you
When you think everything’s okay and everything’s going right
And life has a funny way of helping you out when
You think everything’s gone wrong and everything blows up
In your face”

Just try to get it right the first time…

Add the extra layer of typos and voilá, first day of coding 😀
Hopefully this package will be useful not only for me, but for people having similar issues when typing too fast.

Like learning any other language, continuously coding has helped me to understand better the coding language and unexpectedly get better with my English grammar.
One thing for sure is that after this class I’ll never forget how to spell lenght,…. Damn!

Daniel

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Hola, me llamo R

  1. gedavis27 says:

    Great find. Every time I get frustrated at my slow pace at picking up R, someone reminds me that it really is learning a language, and no one learns a language with the snap of their fingers. While it is a bit easier picking up things in R if you’ve had previous coding experience, it’s the little changes in spelling, or syntax that will getcha. I wonder if they have a package out there for people who have learned Python, for example, and want to convert their code to R.

    I took spanish throughout middle school and high school, then went to Italy for a study abroad semester, knowing no Italian until I got there. I was able to pick up the basics fairly easily with the prior spanish knowledge, but little things like spelling “how much” (cuando in spanish, and quando in italian, got me hung up all the time). Once I got the hang of the Italian side, I then went to Costa Rica, where alas, I was spelling with the Italian influence, something my host mother marked up in red all over my homework. While I can’t use this excuse for R, since I don’t have a previous knack for any one programming language, it’s helpful to remember how easy it is to make little mistakes in any process of learning a language- and at least with R, we hopefully won’t insult anyone by falsely translating!

  2. martinew says:

    I get length wrong all the time too. I think it’s because the G, T, and H keys are all by each other in the middle of the keyboard and it makes way more sense to type ght. It’s the stoopid keyboard…

  3. lficarra says:

    This is really interesting! I see how it could be useful, but I wonder if it becomes more complicated than it is worth as your code gets more intricate. For instance, I wonder how it handles object names, which are not typically proper words. Does it know all of the functions you are using? Because most of those are not properly spelled words. I wonder if we feed this package some of the code we have been writing in this class, will this package freak out and say that everything is spelled incorrectly?

Leave a Reply

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s