Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Hating learning R any advice for a perl guy?

by igelkott (Priest)
on May 17, 2017 at 13:24 UTC ( [id://1190459]=note: print w/replies, xml ) Need Help??


in reply to Hating learning R any advice for a perl guy?

having to learn R

Had to do the same a couple years ago. Initially tried to minimize my expose to R with Statistics::R but was frustrated with the limitations on types of data structures which could be passed back and forth. Wrote my first R scripts in a C/Perl style with for loops, which resulted in painfully slow execution. In the end, I basically abandoned my Perl mindset and embraced vectors and implied loops. Simple Perl constructs can be so awkward in R that, in my opinion, it might be better not to think about Perl at all when learning R.

Basically, R is an interactive tools which can be scripted ... but that's not really what it's made for. Data types can change unexpectedly (eg, a single-column matrix silently changes into a vector) and array indexing calls a function. The trick is to find the R way to do things since those call C-functions rather than pure R.

I currently code in Perl, Python and R on a regular basis. I occasionally get mixed up but treating R like the completely unrelated language it is helped reduce the frustration.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1190459]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-29 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found