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.
508,438
questions
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 ...
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 ...
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 ...
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 ...
41
votes
5
answers
65k
views
Grid in an R plot
Is there a command to easily add a grid onto an R plot?
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 ...
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 ...
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?
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?
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?
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" ...
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 ...
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)...
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
* ...
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-...