similar to: Question about adding text to xYplot(Hmisc)

Displaying 20 results from an estimated 2000 matches similar to: "Question about adding text to xYplot(Hmisc)"

2010 Nov 17
0
xYplot Hmisc with CI shifting between groups
Hi all, I am trying to do this type of graph (code taken from the example of xYplot help). dfr <- expand.grid(month=1:12, continent=c('Europe','USA'), sex=c('female','male')) set.seed(1) dfr <- upData(dfr, y=month/10 + 1*(sex=='female') + 2*(continent=='Europe') + runif(48,-.15,.15), lower=y -
2010 Jan 24
1
lattice ltext
Dear friends - please give me a hand. I have a dataset of 40 patients in two groups observed on three occasions. I only want to plot a line for each patient in the two groups. I use the ltext function to put the patient number but fail to make lattice understand the numbers as unique since apparently it starts all over with 1:20 for each panel instead of respecting my desires to have 1:20
2011 Jan 21
1
Help for lattice. par(new=TRUE)
Hi list, I want to plot two plot in the same figure. I set par(new=TRUE). But it does not work. library(lattice) myPanel <- function(x,...) { panel.histogram(x,alpha=0.4,...) ltext(0.4,1.5,paste("Mean=","0.05",digit=2)),cex=0.8) ltext(0.8,1.5,paste("s.d.=","0.06",digit=2)),cex=0.8) } histogram(sh2,
2007 Jan 28
2
Adding lines to xYplot
I am using xYplot to plot data and CIs. How do I add several lines to the figure? _____________________________ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400 Charlottesville, VA 22904-4400 Parcels: Room 102 Gilmer Hall McCormick Road Charlottesville, VA 22903 Office: B011 +1-434-982-4729 Lab: B019
2010 Apr 21
1
Adding error bars to xyplot()
Hi, I want to add error bars to a plot generated with xyplot. I've tried both errbar() and plotCI(), but in both cases the points are not in the same place. It's as if the two functions are using a different frame of reference for the plotting area. for example: means <- c(92.5, 92.25, 90.9, 91.0, 94.15, 90.05) #means time <- c(1,1,2,2,3,3) #occasion variable group <-
2004 Oct 01
2
Background color Windows device (newbie)
Dear R Gurus Just started on R ! Using xYplot from Hmisc (R 1.9, W2K) I get a grey/blue background that I would like to change to white (ie no background) or may be to another color. Tried to do that with par(bg) but only changed the color of the trellis heading. What's the right command to do that ? Kind regards, JL PS if anyone has nice default settings for win device please let me
2003 May 19
2
upData levels in Hmisc
Dear listserve members, especially Prof. Harrell: I am trying to create a factor variable that has fewer levels than the original. I have a factor: >rosa$risk1 [1] 2 2 5 1 ... [1799] 3 3 1 3 1 6 3 3 1 5 3 5 3 3 3 0 3 3 3 1 1 3 Levels: 0 1 2 3 4 5 6 8 But when I do this: rosa2 <- upData(rosa,
2007 Oct 19
1
Using grid graphics (hexbin) in pairs() plot problem
Hi, I am trying to create a plot with pairs() using a gplot.hexbin() for each pair. For pairs I can provide a custom upperPanel function: pairs(iris[1:4], panel=mypanel) and mypanel() calls plot.hexbin(): library(hexbin) # Bioconductor mypanel <- function(x, ...){ hb <- hexbin(x) plot(hb) } The problem is that gplot.hexbin() is based on the
2011 Aug 20
1
Groups and bwplot
Dear R-users, A while ago, Deepayan Sarkar suggested some code that uses the group argument in bwplot to create some 'side-by-side' boxplots (https://stat.ethz.ch/pipermail/r-help/2010-February/230065.html). The example he gave was relatively specific and I wanted to generalize his approach into a function. Unfortunately, I seem to have some issues passing the correct arguments to the
2009 Jul 12
1
Booting problem with memdisk + Thinkpad + USB
Hi, I encountered a booting problem with memdisk 2.83, USB and IBM Thinkpad T61, apparently the same issue as described here: http://syslinux.zytor.com/archives/2008-April/009850.html The boot process always stops after "Loading boot sector... booting...". With debug tracers enabled, the last few output lines are: Loading boot sector... FR<p>Dbooting...
2012 Mar 01
2
How to colorize the panel backgrounds of pairs()?
Dear expeRts, I would like to colorize the backgrounds of a pairs plot according to the respective panel number. Here is what I tried (without success): count <- 0 mypanel <- function(x, y, ...){ count <<- count+1 bg. <- if(count %in% c(1,4,9,12)) "#FDFF65" else NA points(x, y, cex=0.5, bg=bg) } U <- matrix(runif(4*500), ncol=4) pairs(U, panel=mypanel) I
2002 Oct 24
3
model.matrix (via predict) (PR#2206)
Full_Name: Glenn Stone Version: 1.5.1 and 1.6.0 OS: win2000 Submission from: (NULL) (168.140.227.9) The following code produces incorrect fitted values in version 1.5.1 and an error in 1.6.0 Error in "contrasts<-"(*tmp*, value = "contr.treatment") : contrasts apply only to factors In addition: Warning message: variable ihalf is not a factor in:
2004 Jul 16
3
sas to r
I would be incredibly grateful to anyone who'll help me translate some SAS code into R code. Say for example that I have a dataset named "dat1" that includes five variables: wshed, site, species, bda, and sla. I can calculate with the following SAS code the mean, CV, se, and number of observations of "bda" and "sla" for each combination of
1997 Apr 08
1
R-alpha: User friendly functions
A loose idea for *post*-0.50 development I've been giving a some (but not all that many) thoughts to whether some of the conceptual difficulties facing newcomers could be avoided by having simplified functions for common operations. We already have parts of this, e.g. in Kurts ctest routines. Specifically, I was thinking about data frames: How about
2008 Jul 09
1
Need basic PPPoE startup help
I need basic PPPoE startup help. adsl-start DID bring up my PPPoE link (ppp0) to my ISP over eth0 via the DSL modem/bridge. My IPv4 CIDR block is routing and Shorewall is doing the firewalling. But shorewall has to be started after ppp0 is up and working. For now this means running shorewall restart (or start?). Shorewall 4.2 will have a way to restart shorewall without recompiling, I
2010 Oct 04
2
i have aproblem --thank you
dear professor: thank you for your help,witn your help i develop the nomogram successfully. after that i want to do the internal validation to the model.i ues the bootpred to do it,and then i encounter problem again,just like that.(´íÎóÓÚerror to :complete.cases(x, y, wt) : ²»ÊÇËùÓеIJÎÊý¶¼Ò»Ñù³¤(the length of the augment was different)) i hope you tell me where is the mistake,and maybe i have
2005 May 13
5
Conflict between xtable and Hmisc when using Sweave?
Dear R users, The Sweave code below runs fine, as it is. However, an error occurs when the line 'library(xtable)' is uncommented: Error: chunk 1 Error in "label<-"(`*tmp*`, value = "month") : no applicable method for "label<-" Is anybody aware of this and knows a workaround? Thanks, Sander. *******************
2005 Mar 17
1
Varying grid.rect in different panels of a Lattice plot
Dear r-help, Sleep-deprivation from having 2 youngsters under 2 around the house is fuzzing my brain, so please be gentle if the answer to this query is obvious! In the example below, I'm trying to use grid.rect to add grey rectangles to the panels of a lattice plot to indicate which months spawning occurred of a (very cute) native Tasmanian fish. The fish in the two lakes spawned at
2007 May 18
4
Simple programming question
Hi R-users, I have a simple question for R heavy users. If I have a data frame like this dfr <- data.frame(id=1:16, categ=rep(LETTERS[1:4], 4), var3=c(8,7,6,6,5,4,5,4,3,4,3,2,3,2,1,1)) dfr <- dfr[order(dfr$categ),] and I want to score values or points in variable named "var3" following this kind of logic: 1. the highest value of var3 within category (variable named
2010 Mar 05
4
conditioning variable in panel.xyplot?
I wish to create a multipanel plot (map) from several datasets ("d" and "q" in the example below). I can condition the main xyplot statement on the "site" variable, but I don't know how to pass a conditioning variable to panel.xyplot plot so that the x-y coordinates from dataset q are only plotted at the appropriate site. library(lattice) d <-