[R] integrating multi-dimensional dat along one dimension

2012-07-13 Thread Cable, Sam B Civ USAF AFMC AFRL/RVBXI
I just want to integrate a 3D data set along one dimension to obtain a 2D data set. Something like: (given array "d" with dim nx,ny,nz ...) data_int<-array(dim=c(nx,ny)) for (n in 1:ny) { for (m in 1:nx) { data_int[m,n]<-sum(d[m,n,]) } } The thing is, given R's facility w

[R] How to overlay a global map on a filled contour?

2012-08-09 Thread Cable, Sam B Civ USAF AFMC AFRL/RVBXI
I would like to plot some lat-lon data in a filled contour, and then overlay a map of the globe on top. I am trying something like this: filled.contour(lons, lats, glb.data, plot.axes={axis(1);axis(2);map(projection='rectangular',parameters=0,add =T)} ) The filled contour plots fine, and

Re: [R] How to overlay a global map on a filled contour?

2012-08-09 Thread Cable, Sam B Civ USAF AFMC AFRL/RVBXI
;. I am hoping there is a better way. Thanks. -Original Message- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: Thursday, August 09, 2012 4:39 PM To: Cable, Sam B Civ USAF AFMC AFRL/RVBXI Cc: r-help@r-project.org Subject: Re: [R] How to overlay a global map on a filled conto

Re: [R] Horizontal grid in background of barplot

2012-09-05 Thread Cable, Sam B Civ USAF AFMC AFRL/RVBXI
A horribly pedestrian alternative to plotrix: barplot(x,beside=TRUE, ylim=c(0,90), etc.) par('usr')# just getting plot limits [1] 0.44 15.56 0.00 90.00 par(new=T) lines(c(0.44,15.56),c(20,20)) lines(c(0.44,15.56),c(40,40)) etc. [[alternative HTML version deleted]] ___

[R] JavaGD package

2011-12-14 Thread Cable, Sam B Civ USAF AFMC AFRL/RVBXI
Am trying to install package JGR and, by necessity, JavaGD on a few Linux platforms. R rev. 2.14.0. Had some success on one platform, but am running into a problem on a new platform. I installed rJava, JavaGD, iplots, and JGR. Things went - I thought - without a hitch. Now, when I try to use J

[R] configure can't find readline -- but it's there!

2011-12-29 Thread Cable, Sam B Civ USAF AFMC AFRL/RVBXI
Am trying to install 2.14.0 on a CentOS system. The configure script apparently can't find something to do with the readline library: Configure: error: --with-readline=yes (default) and headers/libs are not available Yes, I know I need readline 4.2 or later. "yum" assures me that rev 5.1

Re: [R] configure can't find readline -- but it's there!

2011-12-30 Thread Cable, Sam B Civ USAF AFMC AFRL/RVBXI
hursday, December 29, 2011 9:28 PM To: Cable, Sam B Civ USAF AFMC AFRL/RVBXI Cc: r-help@r-project.org Subject: Re: [R] configure can't find readline -- but it's there! Hi, The typical solution would be to install the readline-devel RPM, which is where the header files, etc. would be a

[R] file input with readLines

2011-10-03 Thread Cable, Sam B Civ USAF AFMC AFRL/RVBXI
I am using readLines to read a fairly large ASCII file. readLines reads a fixed number of lines, then other R code processes the data, then readLines reads the same number of lines again, then other R code processes the data, then Sort of like: conn<-file('filename','r') for (chunk i

Re: [R] file input with readLines

2011-10-03 Thread Cable, Sam B Civ USAF AFMC AFRL/RVBXI
More on my previous question ... I have put in timing statements to try to get a better idea of where the problem is, like so: conn<-file('filename','r') for (chunk in 1:10) { print(paste('begin read at',date())) Lines<-readLines(conn,n=25) print(paste('begin processing at',date()))

[R] troubles installing R

2011-10-31 Thread Cable, Sam B Civ USAF AFMC AFRL/RVBXI
I am trying to install R on a pretty up-to-date CentOS system. I have tried installing 2.14.0 and 2.13.2. In both cases, the configure step fails, and does not produce a Makefile. So, of course, I can't issue "make". The errors that I can find in config.log are, first, several missing files: ac