ix(unlist(split(z, interaction(x,y))), ncol=length(unique(y)))
+ dimnames(out) <- list(unique(x), unique(y))
+ out
+ }
> with(mydat, data2mat(x, y, z))
Mark Lyman
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
n or trust that z is never 0 and
replace all 0's with NA.
> mydat <- expand.grid(x=1:5, y=1:5)
> mydat <- data.frame(mydat, z=rnorm(25))
> mydat$z[sample(1:25,4)] <- NA
> mytab <- xtabs(z~x+y, mydat)
Mark Lyman
__
R-help@stat
> Really I'd like the call to list() to behave as though the text had
> been entered directly so that you get
>
> > list(1:2, 3:4, 5:6)
> [[1]]
> [1] 1 2
>
> [[2]]
> [1] 3 4
>
> [[3]]
> [1] 5 6
>
> eval(parse(text=paste("list(",to.convert,")",sep="")))
[[1]]
[1] 1 2
[[2]]
[1] 3 4
[[3]]
[1
Deepayan Sarkar gmail.com> writes:
>
> On 7/5/07, Mark Lyman gmail.com> wrote:
> > I would like to add points to a wireframe but with a conditioning
variable. I
> > found a solution for this without a conditioning variable here,
> > http://finzi.psych.upenn.edu
I would like to add points to a wireframe but with a conditioning variable. I
found a solution for this without a conditioning variable here,
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/65321.html. Does anyone know
how to plot a wireframe conditioned on a variable and add the points
conditi
nvals <- length(vals)
height <- box.ratio/(1+ nvals * box.ratio)
for (i in unique(y)) {
ok <- y == levels(y)[i]
nok <- sum(ok, na.rm = TRUE)
panel.text(x = x[ok], y = (i + height * (groups[ok] - (nvals + 1)/2)),
labels=as.character(signif(x[ok],2)), ...)
Antje yahoo.de> writes:
> Hello,
>
> I used an sapply to get some data back (s <- sapply(...) ). The output
> of s would then deliver something like this:
>
> B06_lamp.csv C06_lamp.csv D06_lamp.csv
> [1,] NULL NULL Numeric,512
> [2,] NULL NULL Numeric,512
he actual mean and standard error values. Is there a way to
> do this in R? Thanks for any help in advance.
> james
I believe that xYplot in the Hmisc package will do what you want
Mark Lyman
__
R-help@stat.math.ethz.ch mailing list
https://stat.
ormula would be:
> plot(eval(parse(text=mynames[1])),eval(parse(text=mynames[2])))
> detach(mydata)
Take a look at the help files for eval and parse. I still do not have a firm
grasp on how to use them and other related functions, like substitute, but
what I have been able figure out has been
to do so? Or maybe somebody has another solution?
>
> Thanks in advance,
>
> Simon
Here is one way. Take a look at help(offset), help(lm), and help(lm.predict).
> xx <- runif(30)
> yy <- rnorm(30)
> mydata<-data.frame(xx,yy)
> lm(yy~offset(15
I don't know how to use the fitted
> values function with a given function and given input-variables but yet
> unknown result-values.
Take a look at the predict function, ?predict.
Mark Lyman
__
R-help@stat.math.ethz.ch mailing
t to Lists So that Each Element of List is a variable
t.x<-as.list(as.data.frame(t(x)))
t.y<-as.list(as.data.frame(t(y)))
# Use mapply to apply function to the two lists; see ?mapply
mapply(cor.test,t.x,t.y)
Mark Lyman
__
R-help@stat.math.ethz.ch m
>
> Kim
>
I believe this will also do what you want:
> days<-c(1:10)[-5:-7]
> xx<-rnorm(7)
> data<-data.frame(xx,days)
> new.data<-merge(data,data.frame(days=1:10),all.y=TRUE)
It usually is not a good idea to use zeroes as placeholders for missing values.
Mar
Here is the code:
>
> ll <- c(x=10.1, sde=5.5)
> plot(1:10)
> text(x=9, y=2, pos=2, expression(paste(X[min], "=", paste(ll,
> collapse="+/-"
How about the following?
text(x=9, y=2, pos=2,substitute(X[min]==x%+-%sde,as.list(ll)))
Mark Lyman
_
Franco Mendolia gmx.de> writes:
>
> Hello!
>
> Is there a possibility in R to save data in pdf-format?
> I do not want to save a plot but some lines of simple text.
>
> Regards,
>
> Franco Mendolia
You could also use pdf() and textplot() in
none3
> d none 2
> ad cfh 4
> bf cdt 5
>empty 2
>empty 2
> gf cdh 4
> d none 5
>
> and want to eliminate all components that have id=none and empty . The
remaining data
version.
Mark Lyman
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
identical (see ?identical) to check if they are exactly the same. See the
examples in the help for identical.
Mark Lyman
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://w
the interaction and lm.fit2 does
not. The anova function will return the appropriate F-test. The danger with
worrying about what type of sums of squares to use is that often we do not think
about what hypotheses we are testing and if those hypotheses make sense in our
situation.
Mark Lyman
__
lapply(m,function(x)x[x>2])
[[1]]
[1] 3 4
[[2]]
[1] 4 5
[[3]]
[1] 4
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented
Is there a way to specify a Z matrix using the lmer function, where the
model is written as y = X*Beta + Z*u + e?
I am trying to reproduce smoothing methods illustrated in the paper
"Smoothing with Mixed Model Software" my Long Ngo and M.P. Wand.
published in the /Journal of Statistical Softwar
Looking at the errors your code produces, it looks like you need to make
Dock and Slip factors.
dock_2004_data$Dockf<-factor(dock_2004_data$Dock)
dock_2004_data$Slipf<-factor(dock_2004_data$Slip)
rich.aov <- aov(X.open ~ Dockf*Slipf, data=dock_2004_data)
TukeyHSD(rich.aov, c("Dockf", "Slipf"))
I am using version 0.98-7 of the Matrix package. I used the RGui
"Install Packages..." menu option to get the lme4 package from CRAN and
this version of the Matrix was automatically downloaded as well.
Martin Maechler wrote:
>>>>>>"Mark" == Mark Lyman &l
I am relatively new to R so I am not confident enough in what I am doing
to be certain this is a bug. I am running R 2.1.1 on a Windows XP
machine and the lme4 package version 0.98-1. The following code fits the
model I want using the nlme package version 3.1-60.
mltloc$loc <- factor(mltloc$loc
I have one fixed effect, sor, with two levels. I have eight lots and
three wafers from each lot. I have included the data below.
I would like to fit a mixed model that estimates a covariance parameter
for wafer, which is nested in lot, and two covariance parameters for
lot, one for each level o
25 matches
Mail list logo