similar to: table, xyplot, names, & loops

Displaying 20 results from an estimated 10000 matches similar to: "table, xyplot, names, & loops"

2007 Oct 07
2
Re-ordering factors
A small example before I begin my query: > educ <- read.table(efile, header=TRUE) > educ Education Age_Group Count 1 IncompleteHS 25-34 5416 2 IncompleteHS 35-44 5030 3 IncompleteHS 45-54 5777 4 IncompleteHS 55-64 7606 5 IncompleteHS >64 13746 6 CompletedHS 25-34 16431 7 CompletedHS 35-44 1855 8 CompletedHS 45-54 9435 9
2008 Mar 12
1
ftable and xtabs
Hoping someone can help me with xtabs and ftable. I'm trying to get a pair of ftables (possibly more) next to each other. For example: > dunhill_lights_xtab<-ftable(xtabs(grossedupobs ~ gender+age_group + dunhill_lights, data = ciggs)) > dunhill_lights_xtab dunhill_lights No Yes gender age_group Female
2005 Sep 28
3
xyplots
Hi All, I have a four panel xyplot. I wish to plot each point as an open or filled circle depending on the value of an indicator variable. I assume I need to use panel.superpose(), but I can't figure out the syntax from lattice documentation. Running R 2.1 under Mac OS X 10.4.2. Any suggestions would be appreciated. Nathan Nathan Leon Pace, MD, MStat University of Utah Salt Lake
2009 Nov 27
2
layers in xYplot of Hmisc
In the "filled bands" part of xYplot of the Hmisc package, is there a way to have multiple bands with multiple lines? or does it just allow one for now? So I had an example bit ago had a made up line and CI, now if I wanted to make a second line with a CI filled in can I put them on the same plot? x<-seq(1,10,1) y<-seq(1,10,1) ci<-y*.10 ciupper<-y+ci
2010 Jul 27
1
xYplot error
Hi, I'm trying to plot a graph with error bars using xYplot in the Hmisc package. My data looks like this. mort stand site type 0.042512776 0.017854525 Plot A ST 0.010459803 0.005573305 PF ST 0.005188321 0.006842107 MSF ST 0.004276068 0.011592129 YSF ST 0.044586495 0.035225266 Plot A LD 0.038810662 0.037355408 PF
2007 Aug 30
1
xyplot() groups scope issue
Hi all, Tinkering with a wrapper for xyplot that will help me plot a bunch of plots in a data analysis I'm doing and I ran into an odd error that I'm guessing is a scope issue. Here's a very simple version of the code: ############### #load lattice library(lattice) #create the wrapper function do.xyplot = function( plot.formula, data.frame, plot.groups){ print(plot.groups)
2005 Apr 01
1
Ordering scales in xYplot.Hmisc
Dear R community, I am using xYplot() from the Hmisc package. The package works great to plot means + CI. But I am having issues handling the scales. I am plotting "Soil Clay content" vs "Soil depth" by "land use". Usually in this type of graphs it is better to place the variable "soil depth" in the y-axis and it should be ordered downward by depth (0-5
2009 Apr 25
4
dotplot: labeling coordinates for each point
Hi all, I used dotplot to draw a graph for a dataset with size of 100. Since the x-axis are all texts, so they are mixed up and not readable. Is there any way to make it readable or how can I add labels to all the points with its (x,y) coordinates? Thanks for your help. Best, Tony [[alternative HTML version deleted]]
2013 Feb 08
3
Border width on symbols plotted with the lattice package
Dear list members, I can't figure out how get 'xyplot' or 'dotplot' in the 'lattice' package to respect the 'lwd' value for specifying the border with for *symbols* (for lines it works fine). Example: ----- # Base graphics works fine (gives a 'fat? circle) plot(5, cex=10, pch=21, lwd=10) # But 'xyplot' or 'dotplot' doesn't
2007 Jun 08
1
still trying to wrap xyplot - ignore previous
As you may not be surprised to hear, no sooner did I post the previous message than I realized I had a really dumb mistake. I've now gotten a bit farther but am still stuck. New code: graph <- function (x, data, groups, xlab) { pg <- function(x, y, group.number, ...) fnord body(pg) <- substitute({ panel.xyplot(x, y, ..., group.number=group.number) panel.text(2,
2004 Oct 22
3
dotplot & lattice problems: y axis values and bg color output in jpg
I have a linux system with Fedora Core 2 and R-2.0. I was comparing plots made with plot() and dotplot() and discovered a problem. Although the dots are positioned correctly, the numerical labels in the dotplot y axis are not correct. I put copies here: http://lark.cc.ku.edu/~pauljohn/R/plotTrouble1.jpg That is the "correct" one from plot, with the higest value on y showing at 18.
2005 Feb 16
1
panel/prepanel for polar plots ala xYplot
First a bit of background: After doing a search for a flexible polar plot function and coming up empty, I have begun writing one myself. Since I am new to writing mid-level graphics routines, this has required some learning about lattice, grid and related things. I am to the point where I have a workable proof of concept, but still need to make some improvements. My goal is to have
2012 Mar 07
1
confidence intervals in dotplots in a for loop
# I have some population estimates and confidence intervals for various size classes # of animals captured with two gear types. I'd like to plot the estimates along with # the 90 and 95% CI's by size class for each gear type. # The data can be read in as: estimates <- c(67.42,30.49,32.95,23.53,10.26,6.03,23.53,0.93,50.72,24.2,25.84,18.54,
2006 Oct 12
2
adding error bars to lattice plots
Dear R users, About a year ago Deepayan offered a suggestion to incorporate error bars into a dotplot using the singer data as an example <<http://finzi.psych.upenn.edu/R/Rhelp02a/archive/63875.html>>. When I try to utilize this code with a grouping variable, I get an error stating that the subscripts argument is missing. I have tried to insert them in various ways, but cannot
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
2018 Apr 24
2
[FORGED] Extracting specified pages from a lattice ("trellis") object.
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 total ... dotplot(variety ~ yield | year * site, data=barley) ... this produces three
2012 Sep 20
3
lattice dotplot reorder contiguous levels
my reproducible example test<-structure(list(site = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L), .Label = c("A", "B", "C", "D", "E"), class = "factor"),
2009 Jun 23
1
ask for help xyplot
I want to make such plot using the following data set plot Mean with Sd(+/-) by Dim group by Lac here is data Does anyone know how to plot using xyploy Thanks, Aimin Mean Sd Var Min Max Dim Lac 704 44.00000 NA NA 44.0 44.0 -30 3 703 45.92000 9.5484030 91.1720000 60.0 34.4 -30 4 702 57.40000 NA NA 57.4 57.4 -30
2006 Oct 13
3
Adding per-panel text to panel strips in lattice xyplot
I would like to add auxiliary information to the bottom of two strips on each panel that comes from a table look-up using the values of two variables that define the panel. For example I might panel on sex and race, showing 3 randomly chosen time series in each panel and want to add (n=100) in the bottom strip to indicate the 3 curves were sampled from 100. Is there a not-too-hard way to do
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