[R] Bootstrap library(boot) boot.ci function

2015-01-17 Thread varin sacha
Hi dear R-experts, I want to compare the bootstrap percentile interval, the Z interval, the T interval, etc.So I use a function (I have modified a few things) I have found on stats.stackexchange. simfun - function(n=20) {x - rnorm(n)m.x - mean(x)s.x - sd(x)z - m.x/(1/sqrt(n))t -

Re: [R] Bootstrap library(boot) boot.ci function

2015-01-17 Thread David Winsemius
Moderator’s note; There were two messages from this person in the moderation queue and since they appeared identical in the moderation panel, I accepted accepted one and rejected the other. I’m now wondering (and have no way of checking) whether the OP sent a second non-HTML version and I

Re: [R] Specifying strip names in xyplot (strip.custom)

2015-01-17 Thread Ahmed Attia
Hi I attach the data and a xyplot I made using strip.default; # This is my code; trellis.device(col=F) xyplot(GrainM~Nrate|S*Loc, data = Ahmed, layout=c(5,3,1), xlab=expression(bold(paste(N rate (kg , ha^-1,, #xlab=expression(paste(Herbicide rate (g isoxaflutole , ha^-1, ))),

Re: [R] labelCoubtries() doesn't work. Where is my mistake?

2015-01-17 Thread Jim Lemon
Hi Claudia, It seems that you are using the rworldmap package. The simplest solution to your problem seems to be the identifyCountries function. Just call: identifyCountries() instead of labelCountries and left click on the countries you want labeled. Jim On Sat, Jan 17, 2015 at 3:33 AM,

Re: [R] Specifying strip names in xyplot (strip.custom)

2015-01-17 Thread Duncan Mackay
I think this is want you want but without an example I am not certain dat = expand.grid(t1 = gl(3,4), t2 = gl(5,4)) dat$y = rnorm(240) dat$x = 1:12 xyplot(y~x|t2*t1,dat, as.table = T) my.strip - function(which.given, ..., factor.levels) { levs - if (which.given == 2)

Re: [R] character type and memory usage

2015-01-17 Thread Martin Morgan
On 01/16/2015 10:21 PM, Mike Miller wrote: First, a very easy question: What is the difference between using what=character and what=character() in scan()? What is the reason for the character() syntax? I am working with some character vectors that are up to about 27.5 million elements long.

Re: [R] Latest version of Rtools is incompatible with latest version of R !!

2015-01-17 Thread PRAMEET LAHIRI
No. I tried removing devtools and then reinstalling it many times. The problem is still there. I have also used build_github_devtools() but it still show the following message -  WARNING: Rtools 3.2 found on the path at c:/Rtools is not compatible with R 3.1.2. Please download and install

Re: [R] Specifying strip names in xyplot (strip.custom)

2015-01-17 Thread Duncan Mackay
Hi Ahmed Without a dataset it is harder to know what is exactly going on How does the following look library(latticeExtra) useOuterStrips(strip = strip.custom(factor.levels = top factor levels par.strip.text = list(cex = 0.9)),

[R] Last call internship position for working with R in Porto Alegre (RS), Brazil

2015-01-17 Thread Fernando Henrique Ferraz Pereira da Rosa
Dear all, We are filling some positions to work with statistics (and a lot of R) in greater Porto Alegre Area (RS), in Brazil. If you are interested please see more details here: https://www.facebook.com/photo.php?fbid=10152750369209601set=a.10151426344089601.1073741828.518839600type=1 , here:

[R] Evaluated expression in lattice key

2015-01-17 Thread Naresh Gurbuxani
In a conditional xyplot, I would like to add some numerical results in every panel. Consider below example. df - data.frame(x = rnorm(100), name = A) df - within(df, {y - x + 0.2 * rnorm(100)}) df2 - data.frame(x = rnorm(100), y = rnorm(100), name = B) df - rbind(df, df2) rm(df2) with(df,

[R] extra arguments in do.call applied to a list of dataframes

2015-01-17 Thread Remi Genevest
Hello, I have a list of dataframes with different number of rows and I want to bind columns by rownames and put some NAs where rownames do not match. I was thinking about doing something like this : do.call(merge,c(mylist,by=row.names,all.x=TRUE)) but I get the following error message :

Re: [R] extra arguments in do.call applied to a list of dataframes

2015-01-17 Thread Ista Zahn
I would just move the row.names to a column, and use Reduce instead of do.call. Like this: mylist - lapply(mylist, function(x) data.frame(row = rownames(x), x)) Reduce(function(x, y){merge(x, y, by = row, all=TRUE)}, mylist) Best, Ista On Sat, Jan 17, 2015 at 11:37 AM, Remi Genevest