Displaying 20 results from an estimated 20000 matches similar to: "How to get a degree sign into a lattice factor level?"
2008 May 01
1
Locale problem with umlauts in factor levels in 2.7.0 (patched) from grid or lattice
With 2.7.0 patched (not tested with 2.0.0), I get an error message in a
program that ran correctly in R 2.6.2 when the grouping factor of a
stripplot contains an Umlaut:
I am aware that there are a few locale-changes in R 2.7.0, but I could not
easily
locate who's at fault
Dieter
library(lattice)
dt = data.frame(x=rnorm(100),y=1:100,levs= as.factor(c("Gru","Gr?")))
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 Oct 08
1
problem understanding factor levels for use lattice panel order
Hello all,
In order to get the desired order of panels within lattice I realized I needed to define my factor levels.
I now see how to properly do it (attached code), but:
1. I don't understand why I have to use factor() on a variable that is already a factor, and why levels() alone doesn't work to readjust the level order.
2. I just noticed that if I do use levels(xx$v1), it's
2010 Jan 14
1
lattice dotplot with missing levels in factor variable
Hi,
I am trying to create a dotplot where each panel shows levels vs.
responses; the levels are sorted by responses but levels vary from one
panel to another. However, I run into problems with controlling the
y-limits and y-labels.
In particular, suppose I have a data frame
rsp <- c(10,2,4,0,2,3)
lvl <-
2005 Mar 22
3
Lattice : factor levels in the margins
Hello !
I'm struggling again against lattice graprhics. ;) I'm trying to produce
a conditionnal xyplot with two conditionning factors (let's say A and
B). I want the levels of those factors (A1, A2, etc) to show in the
margins of the lattice plot, not in the strips between the panels.
A1 A2 A3
plot11 plot12 plot13 B1
plot21 plot22 plot23 B2
I managed to remove the
2008 Oct 18
2
Please help
Dear R-experts,
I am trying to fit my model but I couldn't because of this error.
here is the error "Error in solve.default(dial(m) -A) : Lapack routine
dgesv: system is exactly singular"
thank you all.
sonam
2009 Apr 03
2
Titles on lattice colorkey
Dear R-ers,
I'm not sure if this is a missing feature, a support request, or stupidity on my part, but nevertheless, its a question. Is it possible to add titles to colorkey legends? As far as I can tell, there is a command to do it for normal "key" legends, but not for "colorkeys".
eg it works for a normal key, created through auto.key
xyplot(decrease ~ treatment,
2006 Dec 08
1
missing factor levels in a lattice barchart panel cause unexpected failure
Hi all - I'm trying to generate lattice barchart graphs with missing
values, and came across the following:
This does not run. I would expect it to:
library(lattice)
D = data.frame(X=1, Y=factor(letters[2], letters[1:2]))
barchart(~ X, D, groups=Y)
Error in grid.Call.graphics("L_rect", x$x, x$y, x$width, x$height,
resolveHJust(x$just, :
invalid line type
which is simply
2013 Jan 26
2
different legends in lattice panels
Hi listers,
I want to make lattice plots xyplots with the indication of legends
inside each panel with only the points and the lines actually ploted
inside each given panel according to the group(ing) factor.
The code below shows what I have achieved so far and I hope will make
clear what I want to have.
It seems to me that my solution is a very "dirty hack" and there
certainly is
2009 Jun 06
1
correct line types in lattice legends
Hallo R-users,
I do not understand how to specify the correct
line and symbol types in the legends of a lattice xyplot.
This is what I tried, but the line types and symbol in the
graph are not seen in the legend.
Any help is appreciated.
Thanks,
Gerrit.
library(lattice)
s<-rep(1:3,len=10)
x<- 1:10
y<- x+s+rnorm(10)
d<-data.frame(s,x,y)
xyplot(y~x, groups=s,data=d,
2011 Jan 25
1
lattice draw.key(): position of key in panels
Good afternoon,
I am working on a plot that requires custom legends to be placed in some
panels of the plot; other panels do not contain legends. The problem
that I run into is positioning of the legend in individual panels. In
particular, the 'x' and 'y' elements of the key-list are ignored by
draw.key() when it is called from inside a panel function. As a result,
the legend is
2009 Jul 09
2
Lattice xyplot: same scales within one factor
I am using R 2.8.1 and lattice to produce xyplots conditioned on
two factors. What I would like is to have the scales be free between values
of one factor, but some within. Thus, in the example:
xyplot(mpg ~ disp | factor(gear) + factor(cyl), mtcars,
scales=list(x=list(relation="free")))
rather than having the x scales be free within a gear as well, I want it to
be the same for
2008 Oct 09
5
help
Hello,
I'm not sure this is doable but I'm having trouble running my R script
with multithreaded capability.
With 16x2.93Ghz CPUs available, only one is running with 100%. Any
suggestions?
Thanks,
Bing
My system configuration is:
egenera virtual machine running Linux
Red Hat Enterprise Linux Server release 5.1 (Tikanga)
16x2.93GHz CUPs
99G memory
2012 Sep 28
1
Lattice bwplot(): Conditioning on one factor
I'm not able to create the proper syntax to specify a lattice bwplot() for
only one of two conditioning factors.
The syntax that produces a box plot of each of the two conditioning
factors is:
bwplot(quant ~ param | era, data=mg.d, main='Dissolved Magnesium', ylab='Concentration (mg/L)')
What I've tried unsuccessfully are:
bwplot(quant ~ param |
2006 Nov 10
1
lattice: histogram of factor variable
Dear all,
I am encountering a problem with lattice in the current version 0.14-13
with R version 2.4.0 on a Windows XP system.
For example,
histogram(~voice.part, singer)
is not labeling the x labels according to the factor levels of
voice.part, which it should do (and has done in former versions of
lattice, as far as I remember).
In addition, I get the warnings
Warning messages:
1:
2005 Feb 01
2
How to write a new "top-level" Trellis/lattice function?
Hello,
I am trying to write a new "top level" Trellis/lattice function.
By "top-level", I mean a function like 'xyplot', 'histogram',
'bwplot', etc.
These functions all call 'trellis.skeleton', which I am unable to
call;
an attempt to invoke the function that does so yields the error
message:
-----
Error in do.call("trellis.skeleton",
2010 Aug 22
0
lattice::xyplot() with one factor for points and another for lines - solution
Hi:
Yesterday, I posted a question regarding how to handle different graphical
behavior between two factors in xyplot() [package lattice]. After a public
and private reply from Deepayan Sarkar, the problem has been resolved
nicely, including the addition of a stacked legend for the two factors in
question. The latter requires package latticeExtra.
library(lattice)
library(latticeExtra)
# Test
2005 May 04
1
Plotting means and confidence intervals by group factor using lattice graphics?
Dear R graphics gurus,
Another question about lattice graphics. This time I would like to plot
means and confidence intervals by group factor in a lattice graph. I can
not find any working lattice examples. Maybe a custom panel function is
the answer, but that is a bit beyond me for now.
The individual plots within the lattice graph could look like this:
# Example with confidence intervals
2003 Dec 22
1
[R] lattice: levelplot: error: min not meaningful for factor (PR#6005)
R 1.8.1:
___COMMAND____________________________________________
levelplot( yield ~ year * variety | site, barley )
___ERROR_MESSAGE______________________________________
Error in Summary.factor(..., na.rm = na.rm) :
"min" not meaningful for factors
___COMMENT____________________________________________
levelplot( yield ~ as.numeric(year) * as.numeric(variety) | site,
2008 Aug 28
1
drop.unused.levels for two factors {lattice}
Hi,
Is there any way to suppress plotting of panels that don't actually contain
any information? I have tried using 'drop.unused.levels=TRUE', but there
doesn't seem to be any effect. Here is an example:
library(lattice)
# some fake data:
d <- data.frame(x=runif(20), x.class=rep(letters[1:5], each=4),
f1=rep(letters[1:2], each=10), f2=rep(letters[10:19], each=2) )
# plot