Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.

In reply to Re: Hating learning R any advice for a perl guy? by igelkott
in thread Hating learning R any advice for a perl guy? by Anonymous Monk

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-05-28 08:17 GMT
Find Nodes?
    Voting Booth?

    No recent polls found