http://qs321.pair.com?node_id=1190515


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

Lately, I seem to be using R about as much as Perl. I like both languages, but they are quite different. I have found that programming in R has influenced how I write Perl and vice versa.

I think one of the biggest advantages of R is that spreadsheet-like data is supported with a native data structure, i.e. a data.frame.

Certain modules make using Perl much more pleasant/efficient (e.g. Moose, Path::Tiny, etc.). The same goes for R. I find that I routinely use certain CRAN packages such as data.table, ggplot2, dplyr, reshape2, etc.

When I encounter a task that involves spreadsheet-like data, I tend to go to R; however, there are times I want to stick with Perl. In these cases, I tend to use the Data::Table module (which is heavily influenced by R). I do sometimes wish that more R-like things would make their way back into Perl. For example, Python has a port of ggplot2, while I don't think Perl has such a thing.

Also, there are some things that you can do in R to make things more perl-like. For example, most of the built-in regular-expression functions in R (such as gsub, grep, and grepl) take an argument perl = TRUE which will enable Perl-compatible regexps.

I tend to dislike IDEs, so I don't always use Rstudio when programming in R. I'll often use vim and run scripts with Rscript. If you are a vim user, you may want to enable vim keybindings in Rstudio (in Preferences->Editing->Keybindings).

So, my advice would be to find packages that you like. Perhaps you could find some problems and implement solutions in both R and Perl. That way you might start to see the strengths of both languages...and hopefully make working with R more pleasant.