Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [r]

R is a free, open-source programming language & software environment for statistical computing, bioinformatics, visualization & general computing. Please use minimal reproducible examples others can run using copy & paste. Show desired output entirely. Use dput() for data & specify all non-base packages with library(). Don't embed pictures for data or code, use indented code blocks instead. For statistics questions, use https://stats.stackexchange.com.

r
4 votes
3 answers
2k views

Memory Usage in Foreach Function

I was wondering if there is any way to get the foreach package in R to use a pre-allocated structure to put results. basically it involves lots of small linalg operations on very big data sets. My ...
James in Ottawa's user avatar
0 votes
1 answer
815 views

R accessing DB query results by column and row number

I am new to R language. I have successfully loaded a query's resultset into a variable. Now I want to access the resultset data by column name and row number. And I need to verify if it is Null (it is ...
Enjoy coding's user avatar
  • 4,306
4 votes
2 answers
5k views

Generating a lagged time series cross sectional variable in R

I am a new R user. I have a time series cross-sectional dataset and, although I have found ways to lag time series data in R, I have not found a way to create lagged time-series cross-sectional ...
Julie's user avatar
  • 43
27 votes
3 answers
8k views

Efficiency of operations on R data structures

I'm wondering if there's any documentation about the efficiency of operations in R, specifically those related to data manipulation. For example: I imagine it's efficient to add columns to a data ...
cbare's user avatar
  • 12.4k
41 votes
5 answers
65k views

Grid in an R plot

Is there a command to easily add a grid onto an R plot?
Christian's user avatar
  • 26.1k
7 votes
4 answers
7k views

maximum plot points in R?

I have come across a number of situations where I want to plot more points than I really ought to be -- the main holdup is that when I share my plots with people or embed them in papers, they occupy ...
eytan's user avatar
  • 6,035
61 votes
1 answer
120k views

Dealing with timestamps in R

I have multiple lists of measurements. In each list have the timestramp formated as a string ("2009-12-24 21:00:07.0") and I know that each measurement in the list is separated by 5 seconds. I want to ...
Christian's user avatar
  • 26.1k
0 votes
1 answer
1k views

Turning a list of characters that contain numbers into integers in R

Is there a faster way in R to turn a list of characters like c("12313","21323") into an integer list like c(12313, 21323) other than writing a for loop myself?
Christian's user avatar
  • 26.1k
1 vote
1 answer
853 views

R Ports For Mobile Devices

I'm learning R and like the language very much because of its flexibility, but I want to know: Are there any ports of R for mobile devices? Where can I get them?
Nathan Campos's user avatar
7 votes
2 answers
10k views

Importing data from an XML file into R

I want to import an XML file from polarpersonaltrainer.com that stores heartrate data into a R data.frame. Is there a package that makes importing XML easy or do I have to write my own parser?
Christian's user avatar
  • 26.1k
0 votes
2 answers
306 views

Inner sort with R - Once by numeric then by alpha

I have a data.frame, like this: nums<-c(5,7,8,9,10,3,2,1) text<-c("a","b","c","d","a 09","b 09","c 09","d 09") this <- data.frame() this <- cbind(text,nums) "a" 5 "b" 7 "c" 8 "d" ...
Brandon Bertelsen's user avatar
2 votes
1 answer
225 views

R and Daily Projects

I'm now reading some books of R, but I want to know if I can use this language as I use Perl or Ruby. Things like: Image Processing File Compression Use APIs Interact With Internet But it's usual ...
Nathan Campos's user avatar
0 votes
1 answer
460 views

creating a pdf in R that is vertically justified

Question: how can you create a pdf where the output is vertically justified, with for example, a one inch margin on top using pdf(). For example in pdf(file='test.pdf', paper='letter', pagecentre=F)...
andrewj's user avatar
  • 3,005
3 votes
1 answer
859 views

Strange error when building R packages for Windows

On one of my PCs, when I build any R package I get the following fatal error * checking for file 'forecast/DESCRIPTION' ... OK * preparing 'forecast': * checking DESCRIPTION meta-information ... OK * ...
Rob Hyndman's user avatar
  • 31.4k
1 vote
3 answers
267 views

Given a time series for many unique IDs, I need the top 100 deltas for each period

I have a time series of data in TSV like so: ID \t Date \t Value ------------------------------- 1234567 \t 2009-01-01T00:00:00.000Z \t 121 12131 \t 2009-06-01T00:00:00.000Z \t 151 12131 \t 2009-07-...
rjurney's user avatar
  • 5,059

15 30 50 per page