Displaying 20 results from an estimated 7000 matches similar to: "how superpose two graphics ?"
2000 Jul 28
3
log likelihood and deviance
I'm fitting glm models and the summary gives the deviance of the model .
I would like to obtain the log likelihood
How can I do ?
Thanks
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not
2008 May 18
2
how can i superpose 2 graphs
Hio
i tried to do this by:
par(new=TRUE)
but the result is one picture but y-axis has 2 diff?rent graduations.how can
i correct this?( i want one graduation on y axis).
--
View this message in context: http://www.nabble.com/how-can-i-superpose-2--graphs-tp17305355p17305355.html
Sent from the R help mailing list archive at Nabble.com.
2010 Oct 17
1
lattice xyplot - formatting of multiple Y variables when using subgroups
Hi all,
Using xyplot I want to print to Y variables (y1, y2) versus X, conditional
on the group.
How can I obtain a line (type="l") for one relationship (ie. y1 ~ x) and
points (type="p") for the other (y2 ~ x) ?
library(lattice)
# create some sample data
df<-data.frame(group=as.factor(c(rep("a",4), rep("b",4))), # grouping
variable for conditional
2006 Mar 10
1
add trend line to each group of data in: xyplot(y1+y2 ~ x | grp...
Although this should be trivial, I'm having a spot of trouble.
I want to make a lattice plot of the format y1+y2 ~ x | grp but then fit a
lm to each y variable and add an abline of those models in different colors.
If the xyplot followed y~x|grp I would write a panel function as below, but
I'm unsure of how to do that with y1 and y2 without reshaping the data
before hand. Thoughts
2011 Oct 08
2
Connecting points over missing observations in Lattice
Hello,
I'm trying to plot connected time series of two variables in a lattice plot:
xyplot(y1 + y2 ~ t, data=size, type="b")
y2 has missing data for some of the observations and some points are
therefore not connected. It would make theoretical sense to connect the
points - is there a way of doing that? (Without filling the obserations
using package 'zoo').
Thanks,
2010 Jul 19
2
Grouping and stacking bar plot for categorical variables
Hi all,
I have a series of cateogiral variables that look just like this:
welfare=sample(c("less", "same", "more"), 1000, replace=TRUE)
education=sample(c("less", "same", "more"), 1000, replace=TRUE)
defence=sample(c("less", "same", "more"), 1000, replace=TRUE)
egp=sample(c("salariat",
2006 Apr 21
1
Titles in MAplots
Hi
Does anyone know how to set the titles in MAplots to just show the CEL file name?
So far I have;
#define 'Array' as object containing CEL names
Array <- col.names(Data)
#open bmp and make a separate bmp for each MAplot
bmp("C:/MAplot%03d.bmp")
#remove the annotation and minimise margins
par(ann=FALSE)
par(mar=c(1,1,1,1))
#MAplot
MAplot(Data...????
Does anyone know the
2007 Jun 18
1
Second y-axis in xyplot (lattice) where y1 and y2 have different ranges
Hi all,
I realize this is asking a lot of lattice, but I want to add a second y
axis inside a xyplot and have y1 and y2 have different ranges. Given dat
below, I can add a second y axis by overlaying a new plot with
par(new=T) and label axis 4 with standard graphics. I've seen an example
for doing something similar in xyplot even though Deepayan has indicated
that lattice isn't the right
2013 Mar 17
3
help with simple function
hello all
I am writing a quite simple script to study dental wear patterns in humans
and I wrote this function
sqrt(var(Y1)+var(Y2))^2-4(var(Y1)*(var(Y2)-cov(Y1,Y2)^2)) but appear this
error message
Error: attempt to apply non-function
alternatively I wrote this
sqrt(var(Y1)+var(Y2)^2)-4[(var(Y1)*(var(Y2)-cov(Y1,Y2)^2))]
but this error message appear
[1] NA
Warning message:
NAs introduced
2008 Jan 29
3
How to get two y-axises in a bar plot?
Hi,
I have measured two response variables (y1, y2) at each treatment level
(x = 0, 1.5 or 3). Now I would like to show the y1 and y2 against x in a
bar plot. However, y1 and y2 differ in scale so I need two y-axises, one
on the left side and one on the right side (and I dont want to
standardize my responses). This is fairly easy if you want to show
points,lines etc, but gets more complicated
2008 Feb 27
4
plot y1 and y2 on one graph
Dear all
I have a code like
x<-1:10
y1<-x+runif(10)*2
y2<-seq(0,50,length.out=10)+rnorm(10)*10
par(mfrow=c(1,2))
plot(y1~x)
plot(y2~x)
Now I would like to plot y1 and y2 on the same graph, with its two scales
(y1 on left and y2 on rigth side).
Any help are welcome.
Kind regards
Miltinho
Brazil
[[alternative HTML version deleted]]
2003 Mar 04
4
writing several command line in R console
Hi R lovers
I would like to know how to step to the next line in the R console editor
without breaking the continuity of my code
more clearly : if for example I write a function, so far i have to write the
all code inside on the same line wich may become obscure as the function is
more and more complex.
I would like to do like in the example of the manuels:
>twosam <- function(y1, y2) {
2013 Apr 08
3
Reshaping a table
Hello all,
I have data in the form of a table:
X Y1 Y2
0.1 3 2
0.2 2 1
And I would like to transform in the form:
X Y
0.1 Y1
0.1 Y1
0.1 Y1
0.1 Y2
0.1 Y2
0.2 Y1
0.2 Y1
0.2 Y2
Any ideas how?
Thanks in advance,
IOanna
[[alternative HTML version deleted]]
2011 Jan 19
2
Reshape
Hi - I'm up against a complicated reshape problem. I have data of the form
X1,Y1,hr1,hr2,hr3
X1,Y2,hr1,hr2,hr3
X1,Y3,hr1,hr2,hr3
X2,Y1,hr1,hr2,hr3
X2,Y2,hr1,hr2,hr3
X2,Y3,hr1,hr2,hr3
where X and Y are factors and the hr(1,2,3) are values. I need it as
,X1, X2
Y1,hr1,hr1
Y1,hr2,hr2
Y1,hr3,hr3
Y2,hr1,hr1
Y2,hr2,hr2
Y2,hr3,hr3
..,
Any hints? I've been at it for hours.
p
--
View
2010 Dec 07
4
Creating binary variable depending on strings of two dataframes
Hi,
consider the following two dataframes:
x1=c("232","3454","3455","342","13")
x2=c("1","1","1","0","0")
data1=data.frame(x1,x2)
y1=c("232","232","3454","3454","3455","342","13","13","13","13")
2006 Jun 21
4
help on ploting various lines
Dear All,
I tried to plot a variety of lines(curves) on same figure. What I did is,
plot(x=x1,y=y1)
lines(x=x2,y=y2)
lines(x=x3,y=y3)
...
In my data, the maximum of y1 is much smaller than those maximums of other y vectors. So, in the figure I got, there are some curves which are not complete, I mean, they were cut off at the maximum of y1 at the y axis. Could anybody point out some right
2008 Apr 03
3
summary(object, test=c("Roy", "Wilks", "Pillai", ....) AND ellipse(object, center=....)
Dear All,
I would be very appreciative of your help with the following
1). I am running multivariate multiple regression through the manova() function (kindly suggested by Professor Venables) and getting two different answers for test=c("Wilks","Roy","Pillai") and tests=c("Wilks","Roy",'"Pillai") as shown below. In the
2005 May 04
3
Multivariate multiple regression
I'd like to model the relationship between m responses Y1, ..., Ym and a
single set of predictor variables X1, ..., Xr. Each response is assumed
to follow its own regression model, and the error terms in each model
can be correlated. My understanding is that although lm() handles
vector Y's on the left-hand side of the model formula, it really just
fits m separate lm models. What should
2007 Jan 30
2
Rbind for appending zoo objects
Hi R,
y1 <- zoo(matrix(1:10, ncol = 2), 1:5)
colnames(y1)=c("a","b")
y2 <- zoo(matrix(rnorm(10), ncol = 2), 6:10)
colnames(y2)=c("b","a")
> y1
a b
1 1 6
2 2 7
3 3 8
4 4 9
5 5 10
> y2
b a
6 0.9070204 0.3527630
7 1.2405943 0.8275001
8 -0.1690653 -0.1724976
9 -0.6905223 -1.1127670
10
2005 May 27
3
Soil texture triangle in R?
Dear R users,
has anybody made an attempt to create the soil texture triangle graph in
R? For an example see here:
http://www.teachingkate.org/images/soiltria.gif
I would like to get the lines in black and texture labels in gray to
allow for plotting my texture results on top.
Any examples or suggestions are very welcome!
Thanks in advance,
Sander.
--