Displaying 20 results from an estimated 600 matches similar to: "RSQLite problems"
2010 Mar 22
2
using reorder in "dotplot"
Hi ,
Name
rate
HEALTHALLIANCE HOSPITALS, INC -1.06211747
MOUNT AUBURN HOSPITAL 0.50960291
STURDY MEMORIAL HOSPITAL 2.64233232
LAWRENCE GENERAL HOSPITAL 2.15628558
CAMBRIDGE HEALTH ALLIANCE 1.23623144
I would like use
2010 May 07
3
How to sort a grouped barchart?
Hi,
I have a barchart very similar to the example on the function documetation,
however, I want to sort the bars according one group in one panel.
Reminding:
library(lattice)
barchart(yield ~ variety | site, data = barley,
groups = year, layout = c(1,6),
ylab = "Barley Yield (bushels/acre)", auto.key=list(),
scales = list(x = list(abbreviate = TRUE,
2010 Jan 24
2
different x-axes in Lattice
I use lattice package and 'barchart' to build a chart. I have a
problem with setting different x-axes. Some x categories are missing
but they are display and I don't want. I use scales = list(y =
"free",x="free") but it works only for y-axes. Simple example:
package(lattice)
barchart(yield ~ variety | site, data = barley,
groups = year, layout = c(1,6),
2010 Mar 03
1
How to create a line and bar panel chart with two different axes?
I need to create a line and bar panel chart with two different axes. I tried
in lattice but couldn't get it worked. Here is my code:
data(barley)
barchart(yield ~ variety | site, data = barley,
groups = year, layout = c(1,6), stack = F,
auto.key = list(points = FALSE, rectangles = TRUE, space =
"right"),
ylab = "Barley Yield
2004 Feb 12
2
lattice: showing panels for factor levels with no values
How to show panels for factor levels of conditioning variables
which do have no values?
E.g. there are panels for "Grand Rapids" when they have values:
data( barley )
with( barley, dotplot(variety ~ yield | year * site, layout=c(6,2) ) )
There are no panels for "Grand Rapids"
when there are no values for "Grand Rapids":
my.barley <- subset( barley, ! ( site ==
2009 Dec 08
3
re-ordering x-lables using barchart()
Hi R Users,
I'm trying to re-order the "site names" ("Waseca", "Morris", ...). I'm using
following code:
libarry(lattice)
barchart(yield ~ variety | site, data = barley,
groups = year, layout = c(6,1), aspect=.7,
ylab = "Barley Yield (bushels/acre)",
scales = list(x = list(abbreviate = TRUE, rot=45,
2010 Apr 22
1
how to reorder of groups and specify ylim for each row in lattice barchart
R experts,
Is there anyway to reorder inside each group? In the following example, the
bar of year 1932 is always plotted before the bar of year 1931, may I change
the order inside each groups of bars?
library(lattice)
barchart(yield ~ variety | site,data=barley, groups = year, layout =
c(1,6),auto.key = list(points = FALSE, rectangles = TRUE, space =
"right"),ylab = "Barley Yield
2004 Jun 11
1
lattice: cumsum and xyplot
I want to display cumulative summary functions with lattice.
First I tried to get cumulated data:
library(lattice)
data(barley)
d.cum <- with( barley, by( yield, INDICES=list(site=site,year=year), FUN=cumsum ) )
I got a list of vectors.
I tried to get a dataframe which I could use in xyplot.
But neither of the following functions led to the goal:
d.cum.df1 <-
2012 Nov 15
1
strip.custom() with more than one conditioning variable
Suppose I wanted to plot the barley data like this:
dotplot(variety ~ yield | year+ site, barley,
strip = strip.custom(style = 4))
The factor levels are far too long for that to be useful. I can
overcome that problem if I shorten the levels like this:
dotplot(variety ~ yield | year + site, barley,
strip = strip.custom(style = 4,
factor.levels =
2006 Dec 08
1
lattice: defining an own function using args for "formula" and "groups"
x.fun <- function( formula, data ) dotplot( formula, data )
x.grp <- function( formula, groups, data ) dotplot( formula, groups, data )
data( barley )
> x.fun( variety ~ yield | site, data=barley )
# no problem
> dotplot( variety ~ yield | site, groups=year, data=barley )
# no problem
> x.grp( variety ~ yield | site, groups=year, data=barley )
object "year" not found
2006 Jul 07
2
dotplot (lattice) with panel.segments and groups
Hi,
The following produces almost exactly what I needed. The problems are
that the 'panel.dotplot' call (commented) generates the error 'Error in
NextMethod("[") : argument "subscripts" is missing, with no default'. The
other problem is that the colors alternate between the levels of the 'site'
variable, rather than 'year'.
barley$yield2
2004 Sep 13
1
Adding ranks to a repeatedly ragged array
How can I add an extra column containing the rank
to a ragged array indexed by more than one grouping
factors?
E.g. with the barley dataset:
How can I to add an additional column ``rank''
containing the rank of the ``yield'' of
the different varieties in relation to the indices
``year'' and ``site'' to the barley dataframe?
I achieved to calculate the ranks with:
2006 Jan 25
2
panel function with barchart (lattice)
Folks at R help,
I can't quite get the panel function to work the way I
want within barchart.
I guess I'm still not understanding how to piece
together multiple panel
arguments, especially when "groups" is specified.
Example: I want to be able to add the value of "yield"
to each section of
each bar in this graph:
barchart(yield ~ variety | site, data = barley,
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 <-
2004 Sep 29
2
lattice .ps graphic is rotated in LaTeX slides
I've generated a version of the classic dotplot of the barley data with
library(lattice)
data(barley)
trellis.device("postscript", color=TRUE, file="barley2x3.ps")
old.settings <- trellis.par.get()
trellis.par.set("background", list(col = "white"))
lset(list(superpose.symbol=list(pch=c(19, 1, 25, 2, 15, 22, 23),
2018 Apr 27
1
[FORGED] Extracting specified pages from a lattice ("trellis") object.
Hi
Does this not do what you want ... ?
allpages <- dotplot(variety ~ yield | year * site, data=barley,
layout=c(2,2))
page2 <- allpages[1:2, 3:4]
print(page2)
Paul
On 24/04/18 17:51, Rolf Turner wrote:
>
> On 24/04/18 15:17, Paul Murrell wrote:
>
>> Hi
>>
>> I think the subsetting works by giving you the panels for the
>>
2005 Jun 01
1
font size in the trellis plot
>library(lattice)
>dotplot(variety ~ yield | site, data = barley, groups = year,
key = simpleKey(levels(barley$year), space = "right"),
xlab = "Barley Yield (bushels/acre) ",
aspect=0.5, layout = c(1,6), ylab=NULL)
and i get the plot whose font overlaps .what parematers should i change.(i do not want to change the size of the plot).
2018 Apr 24
0
[FORGED] Extracting specified pages from a lattice ("trellis") object.
On 24/04/18 15:17, Paul Murrell wrote:
> Hi
>
> I think the subsetting works by giving you the panels for the
> corresponding levels of the conditioning variable(s).? Note that, if
> there is more than one conditioning variable, you will need more than
> one subsetting index.
>
> For example, taking this plot with two conditioning variables and 12
> panels in
2007 Jan 30
1
change plotting symbol for groups in trellis graph
Hi,
how can I change the plotting symbol for the groups in a trellis panel dotplot.
My graph is similar to:
library(trellis)
dotplot(variety ~ yield | site, data = barley, groups = year,
key = simpleKey(levels(barley$year), space = "right"),
xlab = "Barley Yield (bushels/acre) ",
aspect=0.5, layout = c(1,6), ylab=NULL)
I'd like to
2009 Sep 26
1
Lattice, stripplot (xyplot), plotting data with median line, numeric x-axis
All,
On p.52 of Deepayan Sarkar's Lattice book there is a nice plot of showing
residuals with median lines superimposed or various groups:
library("lattice")
stripplot(sqrt(abs(residuals(lm(yield~variety+year+site)))) ~ site,
data = barley, groups = year, jitter.data = TRUE, type = c("p", "a"), fun =
median)
Suppose we wanted to make a similar plot for a