Questions tagged [r]

R is a language and environment for statistical computing and graphics similar to S.

34 questions
60
votes
5 answers

R vs Python for data analysis

I have been programming for about a year and I am really interested in data analysis and machine learning. I am taking part in a couple of online courses and am reading a couple of books. Everything I am doing uses either R or Python and I am…
The_Cthulhu_Kid
  • 781
  • 1
  • 7
  • 11
25
votes
6 answers

Surviving MATLAB and R as a Hardcore Programmer

I love programming in languages that seem geared towards hardcore programmers. (My favorites are Python and D.) MATLAB is geared towards engineers and R is geared towards statisticians, and it seems like these languages were designed for people…
dsimcha
  • 17,224
  • 9
  • 64
  • 81
10
votes
4 answers

Why are scientific programming languages so weird?

It seems to me that programming languages meant for use in science and engineering are consistently weird compared to general-purpose languages. Some examples off the top of my head: In Matlab, each function has to be placed in a separate file In…
haroba
  • 225
  • 2
  • 3
9
votes
4 answers

How to document alternative code I considered but didn't go with due to performance?

I write code in R, and often find myself attempting to optimize the code for better performance. In a given script that tackles a specific problem, I test different code alternatives and compare them to each other with benchmarking. At the end, I…
Emman
  • 209
  • 1
  • 4
9
votes
2 answers

Does an Rcpp-dependent package require a GPL license?

I'm writing a commercial package that uses R (GPL) for its computation. The GPL FAQ clearly states that GPLed programming language interpreters do not impose licensing restrictions on the "program" (text file with R code). So far, so good. Part of…
r2evans
  • 326
  • 2
  • 9
8
votes
1 answer

Suggested method for extracting a standalone C library from an existing R package?

My group has been developing an R package to simulate plant growth (see GitHub repository). The R package uses .Call to interface with C. We have decided that it would be worthwhile to create a standalone C library. The two key reasons are 1) to use…
6
votes
1 answer

What is considered best practice around using git / VCS's when doing a complete code rewrite?

I am a data scientist who programs in R, but am relatively new to using version control (yes, I know!) and I am still learning lots about it. FYI: I use BitBucket and Sourcetree I understand the general idea behind it - that you commit new updates /…
MusTheDataGuy
  • 381
  • 1
  • 11
6
votes
1 answer

What does AGPL v3 R-studio mean for code written on it?

Rstudio has a community version for free: https://www.rstudio.com/products/rstudio/#Desktop But mentions the license is AGPL v3. Does this effect the licensing or IP rights of code written on the platform or is it referring to extending the IDE…
Bren
  • 179
  • 4
6
votes
6 answers

Is there a canonical resource on R programming?

Considering I have no programming background, Is there a resource out there that's the de-facto standard for describing best practices, design methodologies, and other helpful information on R programming? What about that resource makes it special?
Rosalyn Gao
  • 125
  • 2
5
votes
4 answers

Writing R packages to replace .R scripts?

In our company we have a handful of R users who have collectively written some ~30 .R scripts over the last year. The scripts are mostly 100 lines or less, defining useful and reusable functions. Currently everyone's .Rprofile contains some code…
logworthy
  • 175
  • 3
4
votes
1 answer

Is it reasonable for an R package to import another package just for coding convenience?

I am writing my first R package, converting my existing scripts into a bona fide package. I frequently use the magrittr pipe operator %>% in my code because I find it makes code more intuitively readable and saves typing. However, in order to use…
Josh
  • 151
  • 4
4
votes
2 answers

What is considered good/best practice around handling ad-hoc coding requests?

I am a data scientist and do lots of programming in R/RStudio. I like to be organised (as I'm sure (hope) most programmers do) and as such I always use the Project feature in RStudio to keep my work organised so that I can comfortably switch between…
MusTheDataGuy
  • 381
  • 1
  • 11
3
votes
1 answer

Can I use R via RDOTNET without having to provide the source code of my application

Can I use R via RDOTNET without having to provide the source code of my application. R is covered under GNU GPLv3. RDOTNET is under New BSD. From the RDOTNET description: "R.NET enables the .NET Framework to interoperate with the R statistical…
cheedep
  • 133
  • 5
3
votes
3 answers

Can you do iterative development in c#?

I'm primarily a Python/R developer. In those languages, the way I develop is to sketch out a data and class structure, write the methods and their tests in interactive mode, then refactor them up into class methods and properties and sort out the…
Carbon
  • 181
  • 6
3
votes
1 answer

Why use atomic vectors or matrices in R at all?

In reading Hadley Wickham's Advanced R I learned about the difference between atomic vectors and lists; and matrices/arrays and dataframes. This is something I hadn't really appreciated before, and seems to make sense. My question is, if lists and…
Phil
  • 161
  • 6
1
2 3