Questions tagged [r]
R is a language and environment for statistical computing and graphics similar to S.
35 questions
2
votes
1
answer
106
views
How can I generate visualizations in JavaScript using data and packages from R?
I have a tumor dataset in R that is a Seurat object. I am working on a project to develop a new visualization tool for single-cell RNA-seq data. I want to develop the visualization using JavaScript, ...
9
votes
4
answers
667
views
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 ...
2
votes
0
answers
67
views
What is the recommended way to start a long-running containerized analysis in R from NodeJS?
I have a frontend through which users can submit analysis requests, which are inserted into a database. These analysis requests are received in a NodeJS server using Postgres notify/listen. Using ...
0
votes
1
answer
71
views
Autoscaling containers on Azure
I have a web application that depends upon a set of R analytics. These R analytics read data from a database and perform machine learning, so have high CPU use.
The R analytics are accessed through ...
1
vote
0
answers
103
views
Architecture recommendation for dynamic integration of algorithms/scripts
I am looking for a simple software architecture that is able to evaluate user data using different versions of algorithms.
According to my concept, the user is able to upload tabular data via a Web ...
4
votes
1
answer
159
views
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 ...
1
vote
1
answer
220
views
best practice for data.table use in "formal" code
Consider a "large-ish" data set (~2-5M rows) that goes through multiple stages of cleaning/processing:
library(dplyr)
largedat %>%
mutate(
# overwrite v1 based on others
v1 = somefunc(...
-1
votes
1
answer
195
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)....
4
votes
2
answers
396
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 ...
6
votes
1
answer
537
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 ...
1
vote
2
answers
240
views
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 want.
Here's an example: I ...
0
votes
1
answer
791
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
1
answer
83
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 ...
6
votes
1
answer
2k
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 ...
2
votes
0
answers
123
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
3
answers
3k
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
1
answer
65
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....
3
votes
1
answer
591
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
1
answer
135
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
4
answers
1k
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
3
answers
310
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
1
answer
258
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
1
answer
195
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 ...
11
votes
2
answers
2k
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
1
answer
185
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
1
answer
357
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
1
answer
253
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 ...
10
votes
4
answers
3k
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
5
answers
111k
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
6
answers
4k
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
2
answers
435
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
6
answers
1k
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
2
answers
790
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
1
answer
328
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 ...
25
votes
6
answers
10k
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 ...