r

R: ARIMA, ARMA and AICs?

data <-c(88, 84, 85, 85, 84, 85, 83, 85, 88, 89, 91, 99, 104, 112, 126, 138, 146,151, 150, 148, 147, 149, 143, 132, 131, 139, 147, 150, 148, 145, 140, 134, 131, 131, 129, 126, 126, 132, 137, 140, 142, 150, 159, 167, 170, 171, 172, 172, 174, 175, 172, 172, 174, 174, 169, 165, 156, 142, 131, 121, 112, 104, 102, 99, 99, 95, 88, 84, 84, 87...

Bootstrap output matrix missing

When I try to calculate Gest in spatstat I get the error: bootstrap output matrix missing. Does anyone know what am I doing wrong? ...

How to get vertex eigenvalue centralities in R with igraph

I have a network loaded into an igraph object G that has 198 vertices and 214 edges. If I run: eig<-evcent(G)$vector The resulting eig is a vector with 2172 elements, rather than 198 elements. The documentation on the package claims it returns the "centralities of positions v." Any ideas on how to get the eigenvalue centralities f...

split a string vector [R]

I have the following vector: tmp3 <- c("1500 2", "1500 1", "1510 2", "1510 1", "1520 2", "1520 1", "1530 2", "1530 1", "1540 2", "1540 1") I would like to just retain the second number in each of the atoms of this vector so it would read: c(2, 1,2,1,2,1,2,1,2,1). ...

Is R language interpreted?

I am trying to find out whether the R programming language is interpreted or compiled. Can't seem to find this info. Edit I should have said interpreted or compiled to begin with. Commenters are absolutely right - static or dynamic has nothing to do with whether the language is interpreted or dynamic. ...

What I Can Do With R?

Hello, I was seeing that here we have a new language(for me it is), R, but I was viewing it's site and as I can see we only can do graphics with it, but there is more things that we can do with it? ...

Is R Embeddable

Hello, I'm thinking to start learning R, but I want to know one thing, Is it embeddable(Windows CE, Palm OS)? ...

Hidden Features Of R?

What are some of the R statistical language's "hidden features"? Similar threads: Hidden Features of C++ Hidden Features of C# Hidden Features of JavaScript Hidden Features of Java Hidden Features Tag ...

Making R package work in both Windows and Linux

I have written a very basic package in R. In fact, I followed this tutorial for creating a basic package. My package works just fine in linux. eg: > install.packages("linmod", repos=NULL) Warning in install.packages("linmod", repos = NULL) : argument 'lib' is missing: using '/home/jpgoel/R/i486-pc-linux-gnu-library/2.9' * Installing...

Filtering a data frame in R

Hi, let's suppose that I have data frame like expr_value cell_type 1 5.345618 bj fibroblast 2 5.195871 bj fibroblast 3 5.247274 bj fibroblast 4 5.929771 hesc 5 5.873096 hesc 6 5.665857 hesc 7 6.791656 hips 8 7.133673 hips 9 7.574058 hips 10 7.2080...

Per panel smoothing in ggplot2

I'm plotting a group of curves, using facet in ggplot2. I'd like to have a smoother applied to plots where there are enough points to smooth, but not on plots with very few points. In particular I'd like to stop the plot failing when one of the panels only has 1 or 2 points. Example: a <- data.frame( x=1:100, y=sin(seq(0.1,10,0.1) )) ...

R Package Download and Usage Statistics

I have submitted a package to CRAN and am interested in how much it has been used. Is there a way to get the number of downloads from the CRAN website? ...

Getting R to remember previous directory

I have to keep navigating to my directory when I go to File > Change dir..., which is particularly annoying. Does anyone know how to make R remember the previously used directory? ...

Applying a function to a distance matrix in R.

This question came today in the manipulatr mailing list. http://groups.google.com/group/manipulatr/browse_thread/thread/fbab76945f7cba3f I am rephrasing. Given a distance matrix (calculated with dist) apply a function to the rows of the distance matrix. Code: library(plyr) N <- 100 a <- data.frame(b=1:N,c=runif(N)) d <- dist(a,diag...

foreach row in an R dataframe

I may be Doing It Wrong™ but I have a dataframe and for each row in that dataframe I have to do some complicated lookups and append some data to a file. In my procedural world, I'd do something like: for (row in dataFrame) { #look up stuff using data from the row #write stuff to the file } what is the R way to do this? Updat...

Is there a free Statistics Package for Delphi?

Is there an open source and/or free statistics package or library for Delphi? I'm looking for something that can compile directly into the executable, so no DLL's. It needs to be compatible with Delphi 2009 and later (the Unicode versions). Hopefully there is something comprehensive available out there. By comparison, I am used to the a...

Debugging generic functions in R

How do you debug a generic function (using debug, or mtrace in the debug package)? As an example, I want to debug cenreg in the NADA package, specifically the method that takes a formula input. You can retrieve the method details like this: library(NADA) getMethod("cenreg", c("formula", "missing", "missing")) function (obs, censored,...

What useful R package doesn't currently exist?

I have been working on a few R packages for some general tools that aren't currently available in R: blogging, report delivery, logging, and scheduling. This led me to wonder: what are the most important things that people wish existed in R that currently aren't available? My hope is that we can use this to pinpoint some gaps, and po...

Generating non-duplicate permutation pairs in R

Sorry for the non-descriptive title but I don't know whether there's a word for what I'm trying to achieve. Let's assume that I have a list of names of different classes like c( '1', '2', '3', '4') I'd like to generate all possible permutation pairs out of this so that there are no reverse-duplicates. So what I'd like to have is some...

How to run R on a server without X11, and avoid broken dependencies

I'm running R 2.9 on a large EC2 Ubuntu instance, loaded with RAM, but without a terminal. When I load a library that has display dependencies, such as the sqldf package, I receive the following error: library(sqldf) ... Loading required package: tcltk Loading Tcl/Tk interface ... Error in fun(...) : couldn't connect to display "localh...