[R] xyplot: Can I identify groups but not use them for regression?

2009-09-18 Thread Seth W Bigelow
plotted for each treatment. Oh, and how do I display the actual numeric value of year (e.g., "2007") in the strip, rather than the word "year"? --Seth Dr. Seth W. Bigelow Biologist, USDA-FS Pacific Southwest Research Station 1731 Research Park Drive, Davis California

[R] conditioning variable in panel.xyplot?

2010-03-04 Thread Seth W Bigelow
atement that needs a "Site" conditioning variable panel.xyplot(...)} xyplot(y~x|site, d, panel=mypanel) # Statement erroneously plots all 14 x-y points in "q" on panels for sites A & B Dr. Seth W. Bigelow Biologist, USDA-FS Pacific Southwest Research Station 1731 R

Re: [R] conditioning variable in panel.xyplot?

2010-03-05 Thread Seth W Bigelow
norm(14),y=rnorm(14)) mypanel <- function(...){ panel.xyplot(q$x, q$y, col="red") panel.xyplot(...)} xyplot(y ~ x | site, d, panel = mypanel ) --Seth On Thu, Mar 4, 2010 at 4:42 PM, Seth W Bigelow wrote: > I wish to create a mult

Re: [R] conditioning variable in panel.xyplot?

2010-03-08 Thread Seth W Bigelow
r providing the alternative dataset and the panel... panel = mypanel) # ...everything prints out properly, like magic! Dr. Seth W. Bigelow Biologist, USDA-FS Pacific Southwest Research Station [[alternative HTML version deleted]] _

[R] Re : Eliminate border in wireframe plot

2010-03-16 Thread Seth W Bigelow
# disarm lurking panel settings? ) Dr. Seth W. Bigelow Biologist, USDA-FS Pacific Southwest Research Station 1731 Research Park Drive, Davis California sbige...@fs.fed.us / ph. 530 759 1718 [[alternative HTML version deleted]] ___

Re: [R] Eliminate border in wireframe plot

2010-03-16 Thread Seth W Bigelow
Scott, I asked this same question a few years back, here's what Deepayan wrote. I think the last hint about scales will help you --Seth On 5/9/07, Seth W Bigelow wrote: > > I would like to remove the outermost box from my wireframe plots -- this is > the box that is automatic

[R] illegal levels in yaImpute() / AsciiGridImpute()

2009-05-05 Thread Seth W Bigelow
_ob, xfiles, outfiles, xtypes=list("numeric", "numeric", "integer", "character")) Any insights will be appreciated. I'd particularly like to know how to gain access to the "invisible" list, VALUE, containing unexpectedNA's, illega

[R] subsetting by groups, with conditions

2009-12-28 Thread Seth W Bigelow
oint me in the right direction on this? Dr. Seth W. Bigelow Biologist, USDA-FS Pacific Southwest Research Station 1731 Research Park Drive, Davis California [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://

[R] Lattice legend

2010-06-22 Thread Seth W Bigelow
nd to plot are working, i.e., using auto.key, key, etc. One message I keep getting is Error in key[[i]][[1]] <- NULL : more elements supplied than there are to replace Any suggestions will be appreciated --Seth Dr. Seth W. Bigelow Biologist, USDA-FS Pacific Southwest Research Station

Re: [R] Lattice legend

2010-06-22 Thread Seth W Bigelow
list(expression(paste("soil moisture (m"^{"3"},"/m"^{"3"},")")), cex=1.2), scales=list(x = list(cex=1.3), y = list(cex=1.3)), strip = strip.custom(bg="transparent"), panel = mypanel, key = li

[R] Doing operations by grouping variable

2010-09-20 Thread Seth W Bigelow
, tapply, etc. but that seems awkward and bulky, is there a simpler way? Dr. Seth W. Bigelow Biologist, USDA-FS Pacific Southwest Research Station 1731 Research Park Drive, Davis California [[alternative HTML version deleted]] __ R-help@r-p

Re: [R] Doing operations by grouping variable

2010-09-21 Thread Seth W Bigelow
bundle together in a data frame d$scaled <- d$variable/(with(d,tapply(variable,group,max))) # crash and burn Dr. Seth W. Bigelow Biologist, USDA-FS Pacific Southwest Research Station 1731 Research Park Drive, Davis California 09/20/2010 06:24 PM To , , cc Subject RE

Re: [R] Doing operations by grouping variable

2010-09-21 Thread Seth W Bigelow
Bill, I'd never heard of ave( ) before, but it works like a charm for the purpose outlined below Thanks!! Dr. Seth W. Bigelow Biologist, USDA-FS Pacific Southwest Research Station 1731 Research Park Drive, Davis California "William Dunlap" 09/21/2010 08:52 AM To "

Re: [R] Doing operations by grouping variable

2010-09-21 Thread Seth W Bigelow
Aah, that is the sort of truly elegant solution I have been seeking. And it's wrapped up in a nice programming shortcut to boot (i.e., the within statement). I retract anything I may have said about tapply being clunky. Many thanks --Seth Dr. Seth W. Bigelow Biologist, USDA-FS Pa

[R] R implementation of S-distribution

2011-01-04 Thread Seth W Bigelow
know of any R implementation of this distribution? Dr. Seth W. Bigelow Biologist, USDA-FS Pacific Southwest Research Station 1731 Research Park Drive, Davis California sbige...@fs.fed.us / ph. 530 759 1718 [[alternative HTML version deleted]] ___

[R] Accessing elements of a list

2011-05-25 Thread Seth W Bigelow
rying to make new vector with last items! How do I do this last step? Dr. Seth W. Bigelow Biologist, USDA-FS Pacific Southwest Research Station 1731 Research Park Drive, Davis California sbige...@fs.fed.us / ph. 530 759 1718 [[alternative HTML version deleted]] ___

[R] Does POSIXlt extract date components properly?

2011-03-01 Thread Seth W Bigelow
day [1] 19 But when I try to extract the month > mydate$mon [1] 3 it returns the wrong month. And mydate$year is off by about 2,000 years. Am I doing something wrong? Dr. Seth W. Bigelow Biologist, USDA-FS Pacific Southwest Research Station 1731 Research Park Drive, Davis California sbig

[R] Overlaying trellis xyplot on contourplot

2007-12-13 Thread Seth W Bigelow
#x27; d <- data.frame(ph,phh) # Group variables ph & phh in data frame 'd' Dr. Seth W. Bigelow Biologist, Sierra Nevada Research Center Pacific Southwest Research Station, USDA Forest Service Mailing address: 2121 2nd St Suite A101, Davis

Re: [R] Overlaying trellis xyplot on contourplot

2007-12-13 Thread Seth W Bigelow
Deepayan: Very nice, thanks for introducing me to a new resource. I will include the entire, functioning example in the event others may find it useful. --Seth ## Sample code for overlaying data points on a contour graph, using xyplot and contourplot ## library(lattice) mo

[R] Coloring spaces between lines in xyplot

2008-09-18 Thread Seth W Bigelow
Greetings: I wish to create a stacked line graph in xyplot, adding color to the spaces between the lines. For example, the code below creates a plot with two lines extending across it, and I want to color the rhomboid that is between the upper and lower line, and between the lower line and the bo

Re: [R] Coloring spaces between lines in xyplot

2008-09-19 Thread Seth W Bigelow
find myself stumped at how to assign different colors to the two polygons! the above "col" line did not do the job. --Seth Dr. Seth W. Bigelow Biologist, Sierra Nevada Research Center Pacific Southwest Research Station, USDA Forest Service. 1731 Research Park Drive, Davis CA 95

Re: [R] Coloring spaces between lines in xyplot

2008-09-23 Thread Seth W Bigelow
lowed me to make panels in a manner akin to the lattice system. Thanks to Carl, Hadley, Xie, Jim and Frank for responding. --Seth Bigelow Dr. Seth W. Bigelow Biologist, Sierra Nevada Research Center Pacific Southwest Research Station, USDA Forest Service. 1731 Research Park Drive, Davis CA

[R] lattice contourplot background covers inward-facing ticks

2008-11-24 Thread Seth W Bigelow
I wish to have inward-pointing ticks on my contourplot graph, but the colored background produced by the "region=TRUE" statement covers the ticks up, is there any way around this? Sample code below. --Seth library(lattice) model <- function(a,b,c,d,e, f, X1,X2) # provide model functio

[R] how do I eliminate excess levels in lattice contourplot key / legend?

2008-12-03 Thread Seth W Bigelow
52, 80, -3, -56, g$X1, g$X2) ## Create variable z using model and g data frame contourplot(z ~ X1 * X2, data = g, region = TRUE, # Add color to background cuts = 5# Number of contour/color intervals. ) Dr. Seth W. Bigelow Sierra Nevada Re