Displaying 20 results from an estimated 45 matches for "lset".
Did you mean:
let
2011 Oct 06
1
The "Sets" package and element equality test
...be a very powerful
package: thanks to the developers. I wanted to define sets of lists where 2
lists are considered equal if they have the same length.
So, I implemented:
match.2.list <- function(l1,l2){
length(l1)==length(l2)
}
and then defined my cset as:
s <- set(list(1,2),list(3,4))
lset <- cset(s,matchfun(match.2.list))
so if I now do:
y <- list(3,4)
y %e% lset
I get the correct answer, which is TRUE.
But if I do:
x <- list(1,8)
x %e% lset
I now get FALSE, even though x is a list of length 2, and should thus match
any of the 2 lists in lset.
I must be doing something...
2003 Oct 19
2
problem with win.metafile( ): traceback()
For the first error message:
> win.metafile(file = "//.../plot1.wmf",
+ width = 8.5, height = 6.25)
> lset( list( background = list(col = "white")))
Error in get(x, envir, mode, inherits) :
variable "win.metafile://.../plot1.wmf" was not found
> traceback()
4: get(device)
3: trellis.device(device = .Device, new = FALSE)
2: trellis.par.get(item)
1: lset(list(background = list(col...
2004 May 01
0
log(0) error is not handled in xyplot, Windows
Hi,
We had some exchanges off the list with Deepayan Sarkar about a bug (?) we cannot fix (it seems it does not occur under Unix). It
likely needs the help of somebody on Windows.
The initial problem was that when running the following script (Windows XP, R 1.8.1 as well as R 1.9.0):
> lset(col.whitebg())
> xyplot(rdens ~ annee | habitat,
> groups = sp, type = 'b',
> scales = list(y = list(log = TRUE)))
I got a crash (just show the "hourglass" icon, stay on, GUI.exe no longer answer, and I must interrupt the process via
Windows...)
When the f...
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),
cex=rep(1,7),col=c("blue", "red", "darkgreen", "brown",
"orange", "turquoise", "orchid") )))
lset(list(fontsize = list(default = 14)))
n <- length(le...
2004 Jul 18
2
gray background in png
...ave a gray background. I would like all plots to have a white (or
transparent) background. Below is an example:
library(lattice)
z <- expand.grid(A = LETTERS[1:8], B = letters[1:6])
z$x <- z$y <- rep(1, nrow(z))
trellis.device(png, file = "test%02d.png", bg = "white")
lset(col.whitebg())
xyplot(y ~ x | A * B, data = z, layout = c(4, 6))
dev.off()
This is also the case for jpeg and bmp though win.metafile and
postscript do not have this problem. Is this a bug or am I missing
something obvious?
I found one reference that implies this may be expected behaviour but...
2005 Apr 07
4
sweave bwplot error
...not with
other figures:
tt <- data.frame(c("a", "b", "c"), c(1.2, 3, 4.5))
names(tt) <- c("x1", "x2")
bwplot(x2 ~x1, data = tt)
ok now in sweave:
\begin{figure}[H]
\begin{center}
<<echo=FALSE, fig=TRUE, height=5, width=10>>=
lset(col.whitebg())
bwplot(x2 ~x1, data = tt)
@
\caption{xxx}
\end{center}
\end{figure}
PROBLEM:
the pdf of the figure is not correctly created (neither the esp) and the
error I get from sweave is:
pdf inclusion: required page does not exist <0>
thanks for help
christoph
2004 Mar 16
2
graphical interface
Dear R users,,
I'm having difficulties when i use the gstat extensions in R
especially with the graphical interface, as the
variograms plots are depicted with gray background and cyan points for the number of pairs, Consequently the fitted variogram
is drawn in cyan,
How can i change that so i could have, white background and
black lines for the fitted variogram, for the complete plot.
2004 Jul 27
1
re: help with lattice plot
...IV, V, VI
?
The code I have used is included below:
##Data
library(nlme)
data(Oats)
##Factors
Oats$Block<-factor(Oats$Block)
Oats$Variety<-factor(Oats$Variety)
Oats$nitro<-factor(Oats$nitro)
attach(oats)
##Plot
library(lattice)
lset(col.whitebg())
xyplot(yield~nitro|Block, data=Oats,xlab="Nitrogen Level",ylab="Yield of
oats",subscripts=T, groups=Oats$Variety, as.table=T,
panel=function(x,y,groups,subscripts){
panel.superpose(x=x, y=y, groups=Oats$Variety,
subscripts=subscripts,pch=18)
panel.superpose(x=x, y...
2004 Jan 15
5
Lattices: Cloud: Background
Hi,
There's probably some simple way of doing this, but I'm just not seeing
it - How do I get the background to be white instead of grey when I have
a cloud plot (using the lattices package)? par(bg="white") isn't
working. I'm assuming par commands won't work on lattice plots. What
should I use instead?
Thanks,
Adrienne
[[alternative HTML version deleted]]
2008 Aug 26
2
svymeans question
I have the following code which produces the output below it
clus1 <- svydesign(ids = ~schid, data = lower_dat)
items <- as.formula(paste(" ~ ", paste(lset, collapse= "+")))
rr1 <- svymean(items, clus1, deff='replace', na.rm=TRUE)
> rr1
mean SE DEff
W525209 0.719748 0.015606 2.4932
W525223 0.508228 0.027570 6.2802
W525035 0.827202 0.014060 2.8561
W525131 0.805421 0.015425 3.1350
W525033 0.242982 0.020074 4...
2004 Feb 04
5
Date Time Conversion problems...
...data2$Date <- strptime(as.character(data2$Date),format="%m/%d/%Y")
start <- strptime(c("1/01/2003"),format="%m/%d/%Y")
end <- strptime(c("12/31/2003"),format="%m/%d/%Y")
data3 <- data2[data2$Date >= start & data2$Date <= end,]
lset(col.whitebg())
xyplot(Cost~as.POSIXct(Date)|Name,data=data3,
xlab="Date",
ylab="PO Cost($)",
ylim=c(0,10000),
panel= function(x,y){
a <- mean(y)
panel.grid(h=-1,v=2)
panel.xyplot(x,y)
panel.abline(h=a,col="r...
2004 Jun 23
2
Tick marks in xyplot
...marks on bottom and left in EACH panel, but only tick labels at the bottom and left of the whole graph.
I have browsed the internet, as well as the help page without success.
If anyone could help me find the path to the solution I would appreciate.
Here is an example, this is the best I could do:
lset(col.whitebg())
x.data <- rnorm(16,20,7);y.data <- rnorm(16,.55,.25); z.data <- sample(1:4,16,replace=T)
xyplot(y.data~x.data|z.data, layout=c(2,2),
scales=list(x=list(alternating=F),y=list(alternating=F),tck=c(-1,0)))
Cheers
??lafur A. Ing??lfsson
Institute of Marine Research
PO B...
2004 Sep 22
1
layout for xyplot
Dear all,
I tried to use layout argument in xyplot to get one panel per page.
I have a dataframe named 'data' with the following variables:
x, y = coords,
sub, bloc = 2-level factors,
etat = 5-level factor,
I did :
> lset(theme = col.whitebg())
> xyplot(y ~ x | bloc*sub , data=data, groups=etat,
+ layout=c(0,1,4),
+ main="Etat des plantes dans chaque bloc",
+ auto.key=list(columns=5, cex=.8),
+ scales=list(relation="free", draw=FALSE),
+ xlab="", ylab=...
2002 Jun 12
3
package lattice
Hi!
I am using R1.5.0. When using functions form lattice the background is
dark grey. I have tried to change it using par() but it does not work. By
the way, if I use par and the standard functions like hist() there is no
problem with the par function. Any hints?
Thank in advance,
Ignacio Perez
Escuela Colombiana de Ingenieria
2004 Feb 16
1
2 bwplots - different colors
Hi all,
I would like to draw one picture which would show two different types of
boxplots using the same axes (kind of on top of each other). However, I
would like to plot each boxplot using a different color or different
shading inside the box, so they could be better distinquished from each
other... Could you help me?
Here is an example of the plot I have so far. I was only able to change
the
2002 Jan 15
0
RE: new version of lattice
...would be automatically adjusted
o strip.default now has style=5
o new panel.superpose.2 (suggested by Neil Klepeis)
o the default colour settings sometimes seem too light on a white
background. To deal with this, there is a new setting with some
darker colours that can be set by calling lset(theme =
"white.bg"). see ?lset for details. This is currently in a
proof-of-concept stage (the colors in "white.bg" were chosen just
because I liked their names) and suggestions for better color
schemes would be most welcome.
o show.settings() added
-.-.-.-.-.-...
2004 Mar 04
1
lattice/grid: problem with viewports for strips with zero height
...rings: ok, but not pretty.
strip.test( strip.lines=0.01 )
# Result: 2 very narrow strips: ok, but not whished. 2 strings: ok.
CODE
library( lattice )
library( grid )
data( barley )
strip.test <- function( strip.lines=0, y.text=unit( 6, "points" ), ... ){
lset( list( clip = list( strip=F ) ) )
strip.fun <- function( which.given, which.panel, factor.levels, ... ){
grid.text( label=factor.levels[which.panel[which.given]]
, x= 0.5 - ( which.given - 1.5 ) * 0.7
, y=y.text
, just=c( c("right","...
2004 Aug 03
1
(Lattice) How to improve the readability of a bwplot, i.e. separating groups somehow
..."Vial",rep(1:3, each=3)),4))
library(lattice)
my.theme<-list(background=list(col=0),
strip.background=list(col="transparent"),
box.dot=list(cex=0.1, col=1),
box.umbrella=list(col=1,lty=1),
box.rectangle=list(col= 1))
lset(my.theme)
bwplot(paste(METHOD,VIAL)~RESPONSE|STD, data=mydf)
as a (fictitious) experiment on a determination of a substance in 3 vials,
which was quantified
with an external (or internal) standard,
with two different methods (A or B)
with 3 injections per vial (replicates)
I would like to stress...
2003 Jan 28
1
Plot to postscript in function
...or storage and future printing or display
#does not work because of laz evaluation?
filename <- deparse(substitute(the.data))
thefile <- paste(c("../ed/",filename,"/",filename,".eps"),collapse = "")
postscript(file= thefile, paper = "letter")
lset(my.lts)
#plot cohort variables
BbEh.xyplot.dbh(the.data) #these are custom lattice plotting functions
BbEh.xyplot.h(the.data)
BbEh.xyplot.bl(the.data)
BbEh.xyplot.bs(the.data)
BbEh.xyplot.dens(the.data)
#plot allometry checks
BbEh.xyplot.hVSdbh(the.data)
BbEh.xyplot.bdVSdbh(the.data)
BbEh.xyplot....
2003 Oct 24
2
possible win.metafile( ) problem?
R1.8.0, Win2k:
When I run the code
lset( list( background = list(col = "white")))
xyplot
(
y ~ TIME , data = foo.frame,
scales = list(alternating = FALSE),
ylim = c(.75,y.max),
panel = function(x, y, panel.number, ... )
{
panel.superpose(x = foo.frame$TIME[foo.frame$group == 1],
y = foo.frame$y[foo.frame$group == 1],...