Re: [R] Changing layout in grid.arrange

2015-05-08 Thread Roy Mendelssohn - NOAA Federal
Thanks, it took some digging in the internet, but I figured out how to do it. The first thing is how to pass options to grid.arrange when used in do.call. It takes a list, which I tried in several different ways, the list has to be of a certain form, so something like: > args.list <- c(plots,

Re: [R] Changing layout in grid.arrange

2015-05-08 Thread Jim Lemon
Hi Roy, If this helps, you can get the layout like this: split.screen(figs=matrix(c(rep(0,5),rep(0.5,10),rep(1,5), rep(seq(0.8,0,by=-0.2),2),rep(seq(1,0.2,by=-0.2),2)),ncol=4)) for(scr in 1:10) { screen(scr) par(mar=c(0,0,0,0)) plot(0.5,0.5,xlim=c(0,1),ylim=c(0,1), axes=FALSE,xlab="",ylab=""

Re: [R] nlminb supplying NaN parameters to objective function

2015-05-08 Thread Jean Marchal
Prof. Nash, awesome! This sounds promising. Thank you for the explanation, Jean 2015-05-08 14:16 GMT-07:00 Prof J C Nash (U30A) : > Your problem is saying (on my machine) that it cannot compute the > gradient. Since it does this numerically, my guess is that the step to > evaluate the gradient

[R] nlminb supplying NaN parameters to objective function

2015-05-08 Thread Prof J C Nash (U30A)
Your problem is saying (on my machine) that it cannot compute the gradient. Since it does this numerically, my guess is that the step to evaluate the gradient violates the bounds and we get log(-something). I also get > Warning messages: > 1: In dnbinom(x = dummyData[, "Y"], mu = mu, size = param

Re: [R] Grep out columns using a list of strings

2015-05-08 Thread Boris Steipe
How about %in% ? # preparing something that looks like I think your data looks like: ap <- c("aajkss", "dfghjk", "sdfghk", "xxcvvn") af <- matrix(1:10, nrow=2) colnames(af) <- c("aajkss", "b", "c", "dfghjk", "e") # doing what I think you need done: ap[ap %in% colnames(af)] Cheers, B. (PS. a r

[R] Specifying Directory to Search When Updating a Package

2015-05-08 Thread Rich Shepard
R packages here are installed in /usr, not /usr/local/. Most of the time when I run 'update.packages()' each finds headers in /usr/include. Today, the package 'rgl' failed to build because it was looking for freetype.h in /usr/local/include/freetype2/. By making a softlink from /usr/include/f

Re: [R] Getting INDIVIDUAL effects of multiple qualitative variables (ordered and unordered factors)

2015-05-08 Thread Rafael Costa
Dear Richard, I really appreciate your help. ## Your download host seems to want to give me software, so I am not taking > it. > *To download my file, please uncheck the "Use our download manager and get recommended downloads" option. *But If you prefer, I might send my file attached by email.

[R] Grep out columns using a list of strings

2015-05-08 Thread Kate Ignatius
Hi, I have a list of 150 strings, say, ap,: aajkss dfghjk sdfghk ... xxcvvn And I would l like to grep out these strings from column names in another file, af,. I've tried the following but none seem to work: aps <- af[,grep(ap, colnames(af), value=TRUE)] aps <- af[,grep(ap, colnames(af), va

[R] trouble installing RcppOctave

2015-05-08 Thread C W
Dear R list, I am trying install the RcppOctave package to run Matlab packages in R. I did the following, > install.packages("RcppOctave") After some time of installation, I get the following error. I have homebrew installed, I also have Octave and Matlab install. installing the source packag

[R] CoDA ANOVA Error

2015-05-08 Thread Rich Shepard
I'm running linear regressions and ANOVAs on 5 sets of compositional data following van den Boogaart and Tolosana-Delgado's book, pp. 129 ff. Four of the five data sets compute without error; one does not. To test results, load package 'compositions'. The input data: structure(c(0.1896810318

[R] Revolutions blog roundup: April 2015

2015-05-08 Thread David Smith
Since 2008, Revolution Analytics staff and guests have written about R every weekday at the Revolutions blog: http://blog.revolutionanalytics.com and every month I post a summary of articles from the previous month of particular interest to readers of r-help. In case you missed them, here are

Re: [R] Question about cochran test in R

2015-05-08 Thread Henric Winell
Hi Luis, (Let's keep R-help in the loop for the benefit of others.) On 2015-05-08 10:25, Luis Fernando GarcĂ­a wrote: Thanks a lot for your replies Henry! Your answer was specially a bless! Many thanks this was an issue which was breaking my head. I have another couple of questions, may be yo

[R] Confusing 2 classes in a multiclass problem

2015-05-08 Thread Lorenzo Isella
Dear All, I hope this is not too off topic. Apologies for not sending now any code, but the point is really for me to understand how to proceed. Let's say that you have a multiclass classification problem and the outcome you want to predict is given by 9 different classes {A, B...}. By training se

[R] Changing layout in grid.arrange

2015-05-08 Thread Roy Mendelssohn - NOAA Federal
Hi All: I am doing something very similar to the the example in the grid.arrange package: require(ggplot2) plots = lapply(1:10, function(.x) qplot(1:10,rnorm(10), main=paste("plot",.x))) require(gridExtra) do.call(grid.arrange, plots) If you run this, the layout is 4 rows and 3 columns with g

Re: [R] Plot by FIPS Code using Shapefiles

2015-05-08 Thread Shouro Dasgupta
Excellent suggestions Professors! I really appreciated it. This is what I am using: library(data.table) > library(rgdal) > library(colourschemes) > library(RColorBrewer) > library(maptools) > library(maps) > library(ggmap) > library(classInt) max_change is my csv file while shapes is my spatial

Re: [R] package implementing continuous binomial?

2015-05-08 Thread Stefan Evert
> I don't think Benjamin should use the zipfR package just for > these functions [and even the zipfR package help page on these > can be read as saying so .. ] Exactly. They are simply there because it's much easier to write and read code with wrappers that parametrize the incomplete Beta and

Re: [R] package implementing continuous binomial?

2015-05-08 Thread Martin Maechler
> David Winsemius > on Thu, 7 May 2015 12:10:25 -0700 writes: > On May 6, 2015, at 7:00 PM, Benjamin Tyner wrote: >> Hi >> >> I'm wondering if anyone is aware of an R package implementing (i.e., >> providing a pdf, cdf, and/or quantile function) for the continuou

Re: [R] does segfault mean (always) a bug?

2015-05-08 Thread Martin Maechler
> William Dunlap > on Wed, 6 May 2015 09:53:50 -0700 writes: > It looks like a problem in the Matrix package. Indeed. Thanks to Bill Dunlap for the diagnostics below (and other offline information and) I have been able to fix the bug yesterday in the R-forge version of Matrix.