[R] boxcox transformation

2006-07-29 Thread Torsten Mathies
I've got a vector of data (hours to drive from a to b) y. After a qqplot I know, that they don't fit the normal probability. I would like to transform these data with the boxcox transformation (MASS), that they fit the model. When I try ybx-boxcox(y~1,0) qqnorm(ybx) the plot is

[R] (no subject)

2006-07-29 Thread John Morrow
Dear R-Helpers, I have a large data matrix (9707 rows, 60 columns), which contains missing data. The matrix looks something like this: 1) X X X X X X NA X X X X X X X X X 2) NA NA NA NA X NA NA NA X NA NA 3) NA NA X NA NA NA NA NA NA NA 5) NA X NA X X X NA X X X X NA X .. 9708) X NA

[R] [R-pkgs] Version 0.4.3 of odfWeave

2006-07-29 Thread Kuhn, Max
A new version of odfWeave is on CRAN. Changes include: - handling of locales. Errors were being produced when locales were set to anything but C. The fix changes the locale to C and changes back to the original locale when the user's code is executed. - a bug fix for default plot device units

Re: [R] Non-interpreted strings

2006-07-29 Thread Prof Brian Ripley
On Thu, 27 Jul 2006, [EMAIL PROTECTED] wrote: I am new to R, so please forgive me if there is an obvious answer to this question. I have done fairly extensive searching through R docs, google and a few R users and have not found an answer to my question. Is there a way to create a

[R] fancier plotting

2006-07-29 Thread Fred J.
Hi thank you for talking the time to help me with this. I have a sequence of numbers in a file and an equal sequence of various character, say(a b c d) each occurs more than once. I need to plot the numbers so that numbers corresponding to a in the other sequence would have green dots, those

Re: [R] Extracting from a matrix w/o for-loop

2006-07-29 Thread Adrian DUSA
Hi, On Friday 28 July 2006 20:21, Horace Tso wrote: Unless there is another level of complexity that i didn't see here, wouldn't it be a simply application of sapply as follow, sapply( 1:dim(M2)[[1]], function(x) M1[M2[x,1], M2[x,2]] ) Andy's previous answer involving matrix indexing

Re: [R] fancier plotting

2006-07-29 Thread jim holtman
Wasn't exactly sure what you wanted to do. Is this close? mypch - c(a=19, b=19, c=19, d=22) #point type mycol - c(a='green', b='red', c='black', d='blue') #color mydf - data.frame(x=c('a','b', 'b','c','d'), y=c(2, 4, 8, 6, 2)) plot(mydf$y, type='p', pch=mypch[mydf$x], col=mycol[mydf$x]) On

Re: [R] (no subject)

2006-07-29 Thread jim holtman
Is this what you want? set.seed(1) x - matrix(sample(c(1, NA), 100, TRUE), nrow=10) # creat some data x [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]11 NA1 NA1 NA11 1 [2,]111 NA NA NA1 NA NA 1 [3,] NA NA

Re: [R] memory problems when combining randomForests

2006-07-29 Thread Eleni Rapsomaniki
Hello again, The reason why I thought the order at which rows are passed to randomForest affect the error rate is because I get different results for different ways of splitting my positive/negative data. First get the data (attached with this email) pos.df=read.table(C:/Program

Re: [R] maximum likelihood

2006-07-29 Thread Ben Bolker
Alexandre Bonnet bonnet at gmail.com writes: *hi,* *using articial data, i'm supposed to estimate model* *y(t) = beta(1) + beta(2)*x(t) + u(t), u(t) = gamma*u(t-1) + v(t), t = 1,...,100* *which is correctly specified in two ways: ML ommiting the first observation, and ML using all

Re: [R] (no subject)

2006-07-29 Thread Douglas Bates
On 7/29/06, jim holtman [EMAIL PROTECTED] wrote: Is this what you want? set.seed(1) x - matrix(sample(c(1, NA), 100, TRUE), nrow=10) # creat some data x [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]11 NA1 NA1 NA11 1 [2,]111

Re: [R] negative binomial lmer

2006-07-29 Thread Douglas Bates
On 7/28/06, Gregor Gorjanc [EMAIL PROTECTED] wrote: Ben Bolker bolker at ufl.edu writes: ... I haven't tried it, but you could also consider using a Poisson-lognormal (rather than neg binomial, which is Poisson-gamma) distribution, which might make this all work rather well in lmer:

Re: [R] random effects with lmer() and lme(), three random factors

2006-07-29 Thread Douglas Bates
On 7/28/06, Xianqun (Wilson) Wang [EMAIL PROTECTED] wrote: Hi, all, I have a question about random effects model. I am dealing with a three-factor experiment dataset. The response variable y is modeled against three factors: Samples, Operators, and Runs. The experimental design is as follow:

[R] Colours in Lattice

2006-07-29 Thread Lorenzo Isella
Dear All, I am practicing with the image and wireframe (the latter in the lattice package) plotting tools. I am a bit puzzled by the colors I observe in some test plots I have been generating. Consider: rm(list=ls()) library(lattice) x - seq(-2*pi, 2*pi, len = 100) y - seq(-2*pi, 2*pi, len =

[R] placing rectangle behind plot

2006-07-29 Thread Gabor Grothendieck
I am trying to create a lattice plot and would like to later, i.e. after the plot is drawn, add a grey rectangle behind a portion of it. The following works except that the rectrangle is on top of and obscures a portion of the chart. I also tried adding col = transparent to the gpar list but that

[R] uniroot

2006-07-29 Thread nurza m
Hello, I am struggling to find the root of a exponent function. uniroot is complaining about a values at end points not of opposite sign? s- sapply(1:length(w),function(i) + { + + + + + uniroot(saeqn,lower=-5000,upper=0.01036597923,l=list(t=w[i],gp=gp))$root + }) Error in uniroot(saeqn,

[R] Reading multiple txt files into one data frame

2006-07-29 Thread Kartik Pappu
Hello All, I have a device that spews out experimental data as a series of text files each of which contains one column with several rows of numeric data. My problem is that for each trial it gives me one text file (and I run between 30 to 50 trials at a time) and I would ideally like to merge

Re: [R] Reading multiple txt files into one data frame

2006-07-29 Thread jim holtman
This will read in all the data files in a directory. I am assuming that your file names are the same as the column names you want. # use file names as column headers setwd(...where ever you want it) result - list() for (i in list.files()){ result[[i]] - scan(i, what=0) # assume single

[R] Log color scale

2006-07-29 Thread Kartik Pappu
Hi all, In response to a previous post about plotting a numeric square matrix as a colored matrix, I was referred to both image and the color2D.matplot function in the plotrix package. Both have worked for me thanks!! However I need to plot my data in a log transformed color scale. Is this

Re: [R] placing rectangle behind plot

2006-07-29 Thread Sebastian P. Luque
Hi Gabor, On Sat, 29 Jul 2006 17:20:29 -0400, Gabor Grothendieck [EMAIL PROTECTED] wrote: I am trying to create a lattice plot and would like to later, i.e. after the plot is drawn, add a grey rectangle behind a portion of it. The following works except that the rectrangle is on top of and

Re: [R] placing rectangle behind plot

2006-07-29 Thread Gabor Grothendieck
The reason I explicitly specified in the problem that the rectangle should not be drawn first is that the xyplot is issued as part of a larger routine that I don't want to modify. On 7/29/06, Sebastian P. Luque [EMAIL PROTECTED] wrote: Hi Gabor, On Sat, 29 Jul 2006 17:20:29 -0400, Gabor

Re: [R] nested repeated measures in R

2006-07-29 Thread Spencer Graves
For nested, repeated measures of normally distributed data, the best capability available in R (and perhaps anywhere) is in the 'nlme' package. Excellent documentation is available in Pinheiro and Bates (2000) Mixed-Effects Models in S and S-Plus (Springer). This book is also a

[R] Question about data used to fit the mixed model

2006-07-29 Thread Nantachai Kantanantha
Hi everyone, I would like to ask a question regarding to the data used to fit the mixed model. I wonder that, for the response variable data used to fit the mixed model (either via spm or lme), we must have several observations per subject (i.e. Yij, i = 1,..,M, j = 1,.., ni) or it can be