Displaying 20 results from an estimated 20000 matches similar to: "xyplot: problems with column names & legend"
2007 Oct 01
2
xyplot
Hello,
I am calling the following code with the loop! It makes 3 out graphs but empty! COuld you help me plase on that? Thank you in advance
z1 <- dbConnect(MyData, "something", "A1", "A2")
for (tt in c("xyz", "abc", "m1")) {
message(paste("Here", tt, "!!!"))
mydata <- dbReadTable(z1, tt)
2009 Jan 13
1
Drawing Polygons with xyplot in lattice
Hello:
I've come to a dead-end in my search for a solution to a graphing problem that I am encountering. I have used xyplot (from the lattice package) successfully to plot 36 time-series plots (lines) of under-5 mortality for a set of countries in Sub-Sarahan Africa.
What I would now like to do is to add vertical bands (rectangles) that correspond to time-periods during which each of the 36
2008 Aug 04
1
subset inside a lattice plot using panel.lines
Hi R people
Pulling my hair out here trying to get something very simple to work.
Have a data frame of 774 rows and want to plot first and second half
on same axes with different colours. A variable is present call 'row'
created like this and checked to be OK:
row <- seq( len=length( variable1 ) )
...so I just want to plot the two subsets where row <= 387 and where
row
2010 Jul 27
3
xyplot with all columns of a data.frame on a single plot
Hi, I have a data.frame with columns named X, D1, D2, D3
I know I can get a single plot with 3 curves by doing
xyplot(D1 + D2 + D3 ~ X, data)
but in some cases I might have columns D1 ... D10.
Is there a way to plot all 10 columns without having to specify each
individual term?
(By analogy with formulae in lm, I thought, xyplot(. ~ X, data) would
work, but it didn't)
Thanks,
--
2010 Jan 02
1
xyplot: several plots in one creates y-scale problem
Hello,
I've been looking for a solution to this problem for some time now but
I seem unable to solve it.. so this is the case: I want to plot 4 time
series in the same graph using xyplot(). When I do this with
xyplot(mydata[,2]+mydata[,3]+mydata[,4]+mydata[,5] ~ mydata[,1], data
= mydata,
type = "l",
auto.key = list(space="right", lines = T, points = F),
2008 May 16
1
xyplot: subscripts, groups and subset
I have stumbled across something in the Lattice package that is vexing me.
Consider the code below:
__________________________________________________________
library(lattice)
myData <- expand.grid(sub = factor(1:16), time = 1:10)
myData$observed <- rnorm(nrow(myData))
myData$fitted <- with(myData, ave(observed, sub, FUN = mean))
myData$event.time <- with(myData, ave(observed, sub,
2010 Feb 08
2
the hat ^ in regular expression
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20100208/52a6d080/attachment.pl>
2009 Dec 01
3
Using two (...) in a function
Hello R-Helpers,
I am not sure if it is a very simple question but I would like to use two
(...) in a function, for example,
this is a script where I would like to input the variable names (in one of
the (...)) and the variances associated to those variables which are not
calculated in the script because there is a specific software to calculate
it (the other (...))
data <- function
2010 Feb 26
3
Preserving lists in a function
Dear R users,
A co-worker and I are writing a function to facilitate graph plotting in R. The function makes use of a lot of lists in its defaults.
However, we discovered that R does not necessarily preserve the defaults if we were to input them in the form of list() when initializing the function. For example, if you feed the function codes below into R:
myfunction=function(
list1=list
2006 Dec 14
2
xyplot: discrete points + continuous curve per panel
I have a number of x, y observations (Time, Conc) for a number of Subjects
(with subject number Subj) and Doses. I can plot the individual points with
xyplot fine:
xyplot(Conc ~ Time | Subj,
Groups=Dose,
data=myData,
panel = function(x,y) {
panel.xyplot(x, y)
panel.superpose(???) # Needs more here
}
)
I also like to plot on
2009 Jul 01
1
xyplot question
I have a data set like this
ID=c("A","A","A","A","A","A","A","B","B","B","B","B","B","B")
s=c(1.1,2.2,1.3,1.1,3.1,4.1,4.2,1.1,2.2,1.3,1.1,3.1,4.1,4.2)
d=c(1,2,3,4,5,6,7,1,2,3,4,5,6,7)
t=c(-3,-2,-1,0,1,2,3,-3,-2,-1,0,1,2,3)
2012 Mar 28
1
xyplot lattice fine control of axes limits and thick marks (with log scale)
After a long and winding road (sorry but I'm a novice) I get to a final
result which is quite close to what I need;
nevertheless I would like to tweak a little further the xyplot so that I can
get ***for each single panel defined by variable z*** a finer control over:
-the x and y the limits: I would like to be the same for both axes;
-the number of thick marks: again I would like to be same
2009 Jul 02
1
another xyplot question
I have a data set like this
ID=c("A","A","A","A","A","A","A","B","B","B","B","B","B","B")
s=c(1.1,2.2,1.3,1.1,3.1,4.1,4.2,1.1,2.2,1.3,1.1,3.1,4.1,4.2)
d=c(1,2,3,4,5,6,7,1,2,3,4,5,6,7)
t=c(-3,-1,0,1,2,3,4,-3,-2,-1,0,1,2,3)
2011 Apr 18
4
altering identity column
Hi there,
I have a huge dataframe containing 70,000 observations.
I have filtered this dataframe (let it's name be "transformed_dataframe") as I wanted to select only those observations which are greater than or equal to 60,001 regarding the very first identity column.
So I have a transformed dataframe now including 10,000 obeservations (from 60,001 - to 70,000) and if you send
2011 Oct 20
1
xyplot() or splom()?: two factors from same data frame
I'm not seeing how to plot the quantities associated with two values of a
factor by reading the ?xyplot help page and Deepayan's book. Perhaps I need
to generate many different subsets from the data frame, but that would
require _many_ new data frames.
The structure of the data frame (for a single stream) has sites (factor),
a date (as.Date), parameters (factor), and quantities
2008 Jul 10
1
layout is to xyplot as ??? is to qplot
Playing with ggplot, something I'd promised myself I'd get around to. I've
the following scenario:
library(lattice)
library(ggplot2)
myData <- data.frame(
x = rnorm(100),
y = rnorm(100),
group = 1:4
)
xyplot(y ~ x | factor(group), data = myData, layout = c(2, 2))
qplot(x, y, facets = ~ group, data = myData)
In this code the lattice example gives me a 2x2 layout, whereas
2006 Dec 15
1
xyplot: legend title + legend on 1 line
Does anybody know how in xyplot to put the legend title on one line with the
legend? I can get the legend on one line with columns=... but the title is
always on top. I tried a custom key with key=... and text=... but I can't
put the title text in front of the plotting symbol.
I am looking for the following layout of the legend, on one line:
"Legend Title:" + plot symbol1 + legend
2010 May 11
1
Lattice: location of key inside a xyplot()
Hello,
adding the line:
space = 'inside'
to my xyplot() call provides a partial solution to the problem I
have.. However, this command puts the key in the left upper corner
when I want in the left upper corner. Looking at the help provides no
additional options for the "inside", but surely this must be possible
somehow?
BR,
Jay
2011 Jul 27
2
Creating a flat legend 'grob' for lattice xyplot
Hi,
I want my xyplot legend to be flat, not tall, and there seems to be no way
for xyplot's auto.key and key elements to do this: I tried many, many
permutations of what I could find in the archives and reading the
documentation. If there there's a way to make it flat, please tell me what
the magic incantation is.
Here's a simple example of what I like to see. The xyplot will be a
2013 Dec 13
1
data point labeling in xyplot
Hi Folks,
I have data with a format like:
ID y param1 param2 groupingFactor1 groupingFactor2.....
1 ...
1
1
1
2
2
2
2
3
3
3
so several grouping factors and repeated measures. I am using trellis
and xyplot to get plot with several grouping factors.
something like xyplot(y~x|grouping1*grouping2, data=na.omit(mydata),
panel=function{panel.xyplot(x,y);....}); Lets say x is the