Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [r]

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

-2
votes
1answer
61 views

Interest of having two functions doing the exact same thing [closed]

ls and objects functions are both from the base package and are exactly the same as discussed here. I've seen other examples of duplicated functions (in the tidyverse and base if I remember correctly)....
3
votes
2answers
132 views

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 ...
5
votes
1answer
192 views

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 ...
0
votes
0answers
71 views

Which is the best way to conditionally set the value of a variable?

In the R language two ways exist to conditionally set the value of a variable: variable <- if(condition) true_value else false_value or if(condition) variable <- true_value else variable <-...
-1
votes
2answers
86 views

What's a good term for an R value of length 1?

What's a good term for an R value of length 1? In R, the simplest kind of value is an "atomic" vector with a primitive type like double, but it can have any length, so the term "atomic" is not what I ...
0
votes
1answer
243 views

UML class diagram for MVC project that run R project

I'm working on ASP.NET MVC project where controller calling static class that run R scripts from external R project Controller public ActionResult Index() { Rscript.Run("...
0
votes
0answers
37 views

Is it bad practice to not separate the class definition and constructor into separate files? (specifically in R package development)

I am developing an R package and for some reason all of the current packages I have looked at put the class definition and class constructor in separate files. Usually a myClass--class.R file and a ...
0
votes
0answers
86 views

How to translate from managed to native class definitions

I have an input file, being the DLL of a C# piece of code, containing managed class definitions. I also have a *.json file, who determines how the conversion should be done. As an example, this is ...
0
votes
1answer
52 views

Can longitudinal data be seen as complying with 1st normal form?

This is probably a sloppy way to see it, but I wonder if the idea of longitudinal datasets (to be used in ggplot2, for instance), can be exlpained as complying with the criteria of data in a 1st ...
4
votes
1answer
969 views

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

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 ...
1
vote
0answers
69 views

Mass Spectrometry Data Analysis

I'm currently in the process of writing a program in R to perform analysis of data from a mass spectrometry experiment. Well, that's the idea. I'm fairly new to R, and didn't actually perform the mass ...
2
votes
3answers
504 views

Is there a way to comment a source file using a separate file?

I'm using a large and complex library including R and C++ code, available online via a subversion repository. Trying to figure out how it works I took a bunch of notes in the source code itself, in ...
2
votes
1answer
45 views

increasing website pipeline performance by replacing for loops with vector statements perturbs output

I am inexperienced with iteration in R and am hoping to speed up a process as I am implementing some analysis in a website. I realise that this may be a Q for SO but I couldn't get an answer from them....
1
vote
0answers
112 views

Microsoft SQL server R Services GPL

R is licensed under GPL. How does Microsoft offer SQL R services without providing the source code for the SQL server. It does provide a the source for the R base packages. Does this mean that any ...
3
votes
1answer
395 views

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 ...
-3
votes
1answer
104 views

What does set.seed(any number) command means? [duplicate]

I am currently studying R. While studying that I came across a command set.seed(any number) . After googling also I didn't understood much except that it has something to do with Random number ...
5
votes
3answers
472 views

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. ...
3
votes
3answers
265 views

Can you do iterative development in c#? [closed]

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 ...
3
votes
1answer
169 views

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 ...
-2
votes
1answer
164 views

Providing production code samples as part of an invited freelance work proposal? [closed]

I have only recently started to market myself as a 'programmer' rather than an analyst or something else entirely. In a recent search of freelance/part-time/contract work, I came across an ad for a ...
7
votes
2answers
1k views

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" (...
2
votes
1answer
150 views

Expected time for lazy evaluation with nested functions?

A colleague and I are doing a free R course, although I believe this is a more general lazy evaluation issue, and have found a scenario that we have discussed briefly and I'd like to find out the ...
8
votes
1answer
305 views

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 ...
3
votes
1answer
189 views

How do references work in R?

I'm finding R confusing because it has such a different notion of reference than I am used to in languages like C, Java, Javascript... Ruby, Python, C++, well, pretty much any language I have ever ...
9
votes
4answers
2k views

Why are scientific programming languages so weird? [closed]

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 ...
60
votes
5answers
106k views

R vs Python for data analysis [closed]

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 ...
3
votes
6answers
1k views

How to visualize the design of a program in order to communicate it to others

I am (re-)designing some packages for R, and I am currently working out the necessary functions, objects, both internal and for the interface with the user. I have documented the individual functions ...
2
votes
2answers
337 views

Where to place the R code for R+Sweave+LaTeX workflow

I spent the last week learning 3 new tools: R, Sweave, and LaTeX. One question that came to my mind when working through my first project: Where do I place the majority of the R code? The tutorials ...
6
votes
6answers
974 views

Is there a canonical resource on R programming? [closed]

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 ...
1
vote
2answers
765 views

Mahout's Flexibility for generating recommendations

I am currently working on a system that will generate product recommendations like those on Amazon: "People who bought this also bought this.." This is how I plan to do it: Process the data using ...
2
votes
1answer
317 views

Incanter for real world statistical projects [closed]

I'm interested in statistical computing. R is a leader platform obviously but what about Incanter? Incanter is at the top of my list since I'm a Clojure and JVM guy. Do you have any real world ...
24
votes
6answers
9k views

Surviving MATLAB and R as a Hardcore Programmer [closed]

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 ...