Displaying 20 results from an estimated 500 matches similar to: "xyplot strip=function for two conditioning variables"
2008 Mar 19
1
[PS] Two Way ANOVA
Ben,
I would like to test the sulfur on the clover field, nitrogen on the clover field and then test for the presence of interaction.
Sorry about the last email, seems it really screwed itself over, here it is again, hopefully nicer:
Nitrogen(0) Nitrogen(20)
Sulfur(0) 4.54 5.73
Sulfur(3) 4.64
2008 Feb 29
2
Two Way ANOVA
Hi,
I am using the:
pcf.aov<-aov(meas~op+part, data=pcf.ex2),
command to perform a two way ANOVA. When I save the:
sumpcf<- summary.aov(pcf.aov),
result of the summary.aov command in a variable I need to access the
individual pieces of information in the summary. The summary appears
to be a list and I am having a hard time finding a way to get at the
information in the summary.
2009 May 18
9
Concatenating two vectors into one
Dear users,
a very simple question:
Given two vectors x and y
x<-as.character(c("A","B","C","D","E","F"))
y<-as.factor(c("1","2","3","4","5","6"))
i want to combine them into a single vector z as A1, B2, C3 and so on.
z<-x*y is not working, i tried several others
2008 Jun 20
2
Problem with "date"-x-axis in lattice
Hello list,
i am trying to plot a continous variable y against a "date" variable, both
in one dataframe named "df", using a code like this
library(lattice)
plot1<-xyplot(y~date, data=df, type="b")
"date" is of class "Date", of course, format="%d.%m.%Y", and spans two
calendar years. The problem is that the x-axis is labeled with
2008 Jul 16
2
barchart with bars attached to y=0-line
Dear R users,
i am using the following code to produce barcharts with lattice:
Compound<-c("Glutamine", "Arginine", "Glutamate", "Glycine", "Serine",
"Glucose", "Fructose", "Raffinose",
"Glycerol", "Galacglycerol", "Threitol", "Galactinol", "Galactitol")
2008 Jul 28
2
axis.break on Date-x-axis in lattice xyplot
Dear list,
i am using the following code to produceĀ a lattice xyplot, but the
axis.break-function is seemingly not executed.
Date<-seq(as.Date("2006-08-29"), as.Date("2007-08-28"), by="2 weeks")
Period<-
var1<-rnorm(27, 90000000, 30000000)
var2<-rnorm(27, 500000000,250000000)
var3<-rnorm(27, 1000000,500000)
var4<-rnorm(27, 600000,300000)
2010 Feb 03
1
color blending and transparency
I am using ggplot and posted this question at that helplist. It was
suggested that I try a more general R-help list for a possible solution to
this problem.
Within ggplot, I am using geom_area with red and blue and expect where they
overlap should be purple. But instead, it's dark red.
Playing with alpha and with different colors doesn't seem to solve the
problem.
Here's a very
2011 Aug 14
1
Renaming levels of a factor in a dataframe
Dear Helplist:
I am trying, unsuccessfully, to rename levels of a factor in a dataframe. The dataframe consists of two factor variables and one numeric variable as follows:
Factor Site has 2 levels AB and DE, factor Fish has 30 levels, 15 associated with each Site e.g. 1-1, 1-2,.....2-1, 2-2.... I am trying to rename the levels of factor Site from AB to Fw and DE to Est while keeping them as
2002 Aug 13
1
Ex ante forecasting from structural equation models (SEM package)
Dear Helplist,
I want to produce forecasts from a structural equation model. With the SEM
package the model setup and its estimation is possible. However, I have not
figured out how to obtain ex ante forecasts, i.e. applying the Gauss-Seidel
algorithm to the estimated structural equations for provided values of the
exogenous variables (i.e.: y_t = -inv(A)*B*x_t).
Does anyone know if the there is
2002 Sep 02
1
reshape()
Dear Helplist
I have a dataframe that holds the Southern Oscillation Index over the
last few years:
R> soi[1:3,]
Year Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
1 1993 -9 -10 -12 -24 -9 -18 -11 -18 -9 -15 -1 0
2 1994 -2 -1 -14 -26 -13 -12 -18 -20 -19 -16 -9 -15
3 1995 -4 -5 2 -19 -9 -3 4 -1 3 -2 0 -8
QUESTION: how do I coerce reshape() into giving me this:
2008 Jul 10
2
xYplot customizing y-axis scaling
Dear list,
using the packages Hmisc and lattice i produced some nice xYplots. However,
since the data range of the conditioning variable is very big, i need to
define more than one y-scale for the plot (in some panels you just see a
flat line of data points very close to the x-axis), e.g. different y-axis
scales for the different rows of the plot.
Is there a way to do so?
Thanks,
Henning
2009 Jan 16
1
(no subject)
Dear users,
i just installed the lastest version of R, 2.8.1 on my computer (OS Windows
XP). Then i tried to update the packages copied from my old R version by
>update.packages(ask=F)
However i get the following warning:
"Warning: unable to access index for repository
http://cran.ch.r-project.org/bin/windows/contrib/2.8
Warning: unable to access index for repository
2002 Jun 26
3
sapply() and Monte Carlo
Dear Helplist
Some time ago, Professor Ripley gave me a tip which I thought was very
very useful for Monte Carlo simulation; I thought I'd pass it on to
the list, and ask whether this or a similar example could be added to
the sapply() manpage.
Suppose I have ten N(0,1) random variables and I'm interested in the
pair that are closest together:
R> min(diff(sort(rnorm(10))))
[1]
2010 Dec 06
2
ggplot2: Controlling line width of panel borders
Dear R-users,
i encountered some problems when trying to adjust the line width of the
axes and stripes in a plot created with ggplot2.
I use the "barley" dataset of the lattice package to illustrate my problem:
library(ggplot2)
library(lattice)
barley[["SD"]] <- 5
limits <- aes(ymax=barley$yield + barley$SD,ymin=barley$yield - barley$SD)
p1 <-
2002 Jun 12
4
table problems
dear helplist,
my student has fifty trees, numbered one to fifty, and a vector
recording which tree a certain possum slept in on 12 nights.
R> c
[1] 3 14 17 22 26 26 17 40 43 25 46 46
R>
Thus it slept in tree #3 on Monday, then tree #14 on Tues, and so on.
I wish to test the null hypothesis that the animal chooses trees
randomly; try
R> table(c)
c
3 14 17 22 25 26 40 43 46
1 1
2005 May 18
3
How to convert array to c()
Dear R-helper,
Is there possible to make this array:
> a <- array(1:12, c(4, 3))
> a
[,1] [,2] [,3]
[1,] 1 5 9
[2,] 2 6 10
[3,] 3 7 11
[4,] 4 8 12
>
like:
c(1,5,9)
c(2,6,10)
c(3,7,11)
c(4,8,12)
Thank you very much in advance.
Regards,
Muhammad Subianto
2002 Jun 13
0
possum sleeping: thanks and fisher.test() FEXACT error
Dear helplist
Many many thanks to everyone who helped me. The trick was to use
tabulate() or, better,
tab <- rep(0,50)
names(tab) <- 1:50
tab[names(table(sleeps))] <- table(c)
My original dataset was a list of 50 trees and a length 12 vector
recording which tree a certain possum slept in on 12 nights. As
Professor Ripley points out, a Monte-Carlo simulation is easy to set
up, and it
2002 Aug 12
0
Attaching marginal summary plots to the main matrix plot
Take a look at the manual page for "layout". The final example does pretty
much what you're asking about (with a scatterplot and histograms, but the
idea should be the same).
Hope this helps,
Matthew Wiener
Applied Computer Science & Mathematics Dept.
Merck Research Labs
Rahway, NJ 07090
732-594-5303
-----Original Message-----
From: Adaikalavan Ramasamy [mailto:ramasamy at
2008 Sep 30
0
adding planes/lines to 3d surface plots? (persp, wireframe)
Dear helplist members,
I have been using 'wireframe()' to make 3d plots using the following call:
wireframe (temp ~ xc2 * mc2, screen = list(z = 230, x = -70, y = 0),
scales = list (arrows = FALSE))
and these three vectors:
xc2 mc2 temp
[1,] 0.1 0.04 0.049797615
[2,] 0.2 0.04 0.049161159
[3,] 0.3 0.04 0.048006702
[4,] 0.4 0.04 0.046208311
[5,] 0.5 0.04
1998 Sep 09
2
diag() losing dimnames
Using diag() to extract the diagonal of a matrix loses all but the first dimname
(R 0.62.3). The problem seems to be in [ ]:
>
> x <- matrix(1:9,3,3)
> dimnames(x) <- list(c("a", "b", "c"), c("a", "b", "c"))
> x
a b c
a 1 4 7
b 2 5 8
c 3 6 9
> diag(x)
a NA NA
1 5 9
> x[c(1,5,9)]
a NA NA
1 5 9
>
Paul