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

2006-07-30 Thread Paul Lemmens
On 7/30/06, Kartik Pappu <[EMAIL PROTECTED]> wrote: > 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

Re: [R] Random structure of nested design in lme

2006-07-30 Thread ESCHEN Rene
Spencer, Thank you for the kind and elaborate reply to my previous post. I did consider the option you suggested and many variations. Depending on the order of the random factors, lme will either give the same output as the aov model for soiltype or for habitat, but not both in the same model.

Re: [R] Functions ,Optim, & Dataframe

2006-07-30 Thread Dieter Menne
Michael Papenfus wisc.edu> writes: > > I have defined the following function: > > fr<-function(x) { > u<-x[1] > v<-x[2] > sqrt(sum((plnorm(c(3,6),u,v)-c(.55,.85))^2)) > } > which I then solve using optim > y<-optim(c(1,1),fr) > > > y$par > [1] 1.0029771 0.7610545 > This works fine

[R] Functions ,Optim, & Dataframe

2006-07-30 Thread Michael Papenfus
I have defined the following function: fr<-function(x) { u<-x[1] v<-x[2] sqrt(sum((plnorm(c(3,6),u,v)-c(.55,.85))^2)) } which I then solve using optim y<-optim(c(1,1),fr) > y$par [1] 1.0029771 0.7610545 This works fine. Now I want to use these two steps on a dataframe: mydat<-data.

Re: [R] RGB function

2006-07-30 Thread Duncan Murdoch
On 7/31/2006 12:36 AM, Kartik Pappu wrote: > Hi all, > > I created three separate square matrices (lets say R, G, and B). each > one contains a series of values between 0 and 1. I want to be able to > take for example R[1], G[1], B[1] and create a rgb color value into a > fourth matrix. I tried

[R] RGB function

2006-07-30 Thread Kartik Pappu
Hi all, I created three separate square matrices (lets say R, G, and B). each one contains a series of values between 0 and 1. I want to be able to take for example R[1], G[1], B[1] and create a rgb color value into a fourth matrix. I tried using the rgb function but I must be doing something w

Re: [R] placing rectangle behind plot

2006-07-30 Thread Gabor Grothendieck
Just to answer my own question I just discovered trellis.panelArgs() and that can be used to give the following solution: library(lattice) library(grid) x <- 1:10 xyplot(x ~ x | gl(2,1), layout = 1:2) trellis.focus("panel", 1, 1) grid.rect(w = 0.5, gp = gpar(fill = "light grey")) # r

Re: [R] question about dataframe ("sensory") in PLS package

2006-07-30 Thread Gabor Grothendieck
Try: ?sensory str(sensory) dput(sensory) lapply(sensory, class) lapply(sensory, dim) to see what it looks like inside. Seems that sensory is a data frame consisting of two columns each of which is a matrix except that each has a class of "AsIs". Thus try this (where I(...) creates objects of cl

[R] question about dataframe ("sensory") in PLS package

2006-07-30 Thread jz7
Dear all, I am trying to my dataframe for the PLS analysis using the PLS package. However I have some trouble generating the correct dataframe. The main problem is how to use one name to represent several columns in the dataframe. The example dataframe in PLS package is called "sensory". I cannot

Re: [R] placing rectangle behind plot

2006-07-30 Thread Gabor Grothendieck
Thanks. That's helpful. I would be interested in the case where 1. one does not have a variable latticeplot, as per your example, but just has the output of xyplot(x ~ x | gl(2,1), layout = 1:2) sitting on the screen, having been "printed" by a prior function. We can assume that no other g

[R] manova and table of means by factor levels

2006-07-30 Thread Matthew Harbur
I am resubmitting my question from earlier today -- this time with the proper plain text formatting. I have a dataset in which I have identified a three-way interaction. Factor A has 3 levels, factor B has 4 levels, and factor C has 3 levels.  I would like to produce the following: 1) A manova in

Re: [R] placing rectangle behind plot

2006-07-30 Thread Paul Murrell
Hi Gabor Grothendieck 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 > obscures a portion of the chart. I also tried adding col =

Re: [R] main= bquote(paste("Results for ", beta, "3", ==.(b1)))) doesn't work.

2006-07-30 Thread Peter Dalgaard
"Marco Boks" <[EMAIL PROTECTED]> writes: > Hi, > > I need to plot the beta as the symbol, followed by the index 3 as the title > of a graph. > > This code works> main= bquote(paste("Results for ", beta ==.(b1)) > > but I also need the index 3. > I tried (simplified): > > >plot(x,y, main= bqu

Re: [R] main= bquote(paste("Results for ", beta, "3", ==.(b1)))) doesn't work.

2006-07-30 Thread Gabor Grothendieck
I assume the 3 is supposed to be a subscript. Try this: b1 <- x <- y <- 1 plot(x,y, main = bquote("Results for " ~ beta[3] ==.(b1))) On 7/30/06, Marco Boks <[EMAIL PROTECTED]> wrote: > Hi, > > I need to plot the beta as the symbol, followed by the index 3 as the title > of a graph. > > This

[R] manova and table of means by factor levels

2006-07-30 Thread Matthew Harbur
I have a dataset in which I have identified a three-way interaction. Factor A has 3 levels, factor B has 4 levels, and factor C has 3 levels. I would like to produce the following: 1) A manova in which I can test the effect of factor C for each combination of factor A * factor B. I know

[R] main= bquote(paste("Results for ", beta, "3", ==.(b1)))) doesn't work.

2006-07-30 Thread Marco Boks
Hi, I need to plot the beta as the symbol, followed by the index 3 as the title of a graph. This code works> main= bquote(paste("Results for ", beta ==.(b1)) but I also need the index 3. I tried (simplified): >plot(x,y, main= bquote(paste("Results for ", beta, "3", ==.(b1 and a few othe

Re: [R] standardized random effects with ranef.lme()

2006-07-30 Thread Doran, Harold
> > Why do the results differ although the estimates (random > effects and > > thus their variances) are almost identical? I noticed that > lme() does > > not compute the standard errors of the variances of the > random effects > > - for several reasons, but if this is true, how does > ran

[R] Power of a single sample binomial test

2006-07-30 Thread Chris Evans
The only references to this I can find searching the archives are to a student who asked in relation to his course work on a stats course. Promise I'm not doing that! I have a situation in which we want to test proportions against an expected proportion, binom.test() is great. I'd like to do some

Re: [R] overlaying the values of tab-delim file in to a pre-existing matrix

2006-07-30 Thread Gabor Grothendieck
Please provide reproducible examples (as discussed at end of each posting): Lines <- "Apple S 21.0 Apple A 21.6 Apple O 43.0 Orange A 45.0 Orange O 64.0 Orange S 32.5 Mango M 40.3 Mango A 32.6 Mango S 24.6 " tb <- read.table(textConnection(Lines)) # alternative 1 - create a matrix t

[R] overlaying the values of tab-delim file in to a pre-existing matrix

2006-07-30 Thread Srinivas Iyyer
Hello : I have matrix with dimensions(200 X 20,000). I have another file, a tab-delim file where first column variables are row names and second column variables are column names. Tab-delim file has smaller values than the matrix. Matrix = tmat tab-delim file read as data.frame = tb My aim

Re: [R] standardized random effects with ranef.lme()

2006-07-30 Thread Spencer Graves
Have you tried RSiteSearch("MLWin")? I just got 29 hits. I wonder if any one of these might relate to your question? If you would like more help on this issue from this listserve, please submit another post, preferably illustrating your question with the simplest possible

Re: [R] User defined covariate structure.

2006-07-30 Thread Spencer Graves
Have you tried using corARMA? Won't this give you the symmetric Toeplitz form you desire, albeit in a different parameterization? Hope this helps. Spencer Graves [EMAIL PROTECTED] wrote: > I am trying to use nlme but instead of using one of the “identity” variance

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

2006-07-30 Thread Doran, Harold
You can have one observation per subject with multiple subjects nested in a group. If you only have 1 observation per group, then there is no multilevel structure to your data. For example, 30 students in a classroom or 20 employees in an office division are appropriate data structures. On the

Re: [R] Log color scale

2006-07-30 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: > Kartik Pappu a écrit : > > >>However I need to plot my data in a log transformed color scale. Is >>this possible? I will be happy to explain further, but basically I >>need to do this because there are large variations in the max and min >>values of my raw data and I

Re: [R] uniroot

2006-07-30 Thread Uwe Ligges
nurza m wrote: > 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? And you think it is not the case? Why? We cannot help because you have not given a reproducible example (What is w and gp?), whi

Re: [R] Log color scale

2006-07-30 Thread vincent
Kartik Pappu a écrit : > However I need to plot my data in a log transformed color scale. Is > this possible? I will be happy to explain further, but basically I > need to do this because there are large variations in the max and min > values of my raw data and I am trying to highlight the diffe