similar to: add custom strip to lattice plot

Displaying 20 results from an estimated 2000 matches similar to: "add custom strip to lattice plot"

2004 Nov 29
1
Call to trellis.focus(); thenpanel.superpose()
The following works fine with the x11 device, though it may well be that an initial plot is overwritten. With a pdf or postscript device, I get two plots, the first of which still has the red border from having the focus, while the second is the plot that I want. library(lattice); library(grid) plt <- xyplot(uptake ~ conc, groups=Plant, data=CO2) print(plt)
2007 Jun 04
3
test for nested factors
Is there a conventional way to test for nested factors? I.e., if 'a' and 'b' are lists of same-length factors, does each level specified by 'a' correspond to exactly one level specified by 'b'? The function below seems to suffice, but I'd be happy to know of a more succinct solution, if it already exists. Thanks, Tim. --- "%nested.in%" <-
2007 Jul 16
5
formula(CO2)
The formula attribute of the builtin CO2 dataset seems a bit strange: > formula(CO2) Plant ~ Type + Treatment + conc + uptake What is one supposed to do with that? Certainly its not suitable for input to lm and none of the examples in ?CO2 use the above.
2010 Dec 17
2
newbie question on str output
Hi! Here is some output from an str command: > str(CO2) Classes ‘nfnGroupedData’, ‘nfGroupedData’, ‘groupedData’ and 'data.frame': 84 obs. of 5 variables: $ Plant : Ord.factor w/ 12 levels "Qn1"<"Qn2"<"Qn3"<..: 1 1 1 1 1 1 1 2 2 2 ... $ Type : Factor w/ 2 levels "Quebec","Mississippi": 1 1 1 1 1 1 1 1 1 1 ... $
2007 Jul 28
2
lattice grayscale "theme"
Hi, is there a grayscale setting for lattice plots? I like the default color settings. I also like the settings that are available for setting black and white with something like this: --8<---------------cut here---------------start------------->8--- ltheme <- canonical.theme(color = FALSE) ## in-built B&W theme ltheme$strip.background$col <- "transparent" ##
2009 Jun 11
1
formula for degrees of freedom for nonlinear mixed model in nlme
Dear forum members, What is the formula to calculate denominator degrees of freedom (den df) for nonlinear mixed-effect models with covariates? My model is similar to a CO2 uptake example from Pinheiro and Bates (2000, page 376). In this CO2 dataset, there are two treatments and two types (84 observations in total), but den df for each parameter of the model is 64. Isn’t it too high? Your
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
2013 Jul 01
2
Problem with anova and the new abbreviation restrictions
An unwanted side effect of the new restrictions on abrreviated names. The anova.coxph command, in a slavish copy of anova.lm etc, returns a data frame with column labels of loglik Chisq Df Pr(>|Chi|) If one tries to extract the final column of the table errors result since it is not a standard R variable name. > afit <- anova(lm(conc ~ uptake, CO2)) > afit$P [1]
2006 Mar 15
1
filtering in aggregate
Hello all, I have a data frame with year, month, species, fishing gear and catch (Y, M, S, F, C) and I want the sum of C by Y for species "A" and fishing gear "trawl". I tried things like aggregate(C[S=="A" & F=="trawl"], list (Year = Y[S=="A" & F=="trawl"]), fun=sum), but it didn't worked. To overcome this problem I did
2017 Oct 08
2
Manipulations with CO2 dataset on R
Hi, I just started a new course this semester on R, I never used it in my life and i'm stuck on these questions from 3 days, it would be really nice if someone could explain me the answers with the relative commands. thanks a lot in advance The following 7 questions are based on the CO2 dataset of R. 1) How many of the plants in CO2 are Mc2 for Plant? 2) How many are either Mc2 or Mn2?
2006 Oct 23
1
Color eps/ps output from specialized plots?
Hello, First a disclaimer :) I am very new to using R. I am generating some plots and eventhough I can get colored output in the encapsulated postscript files in the simplest of commands (e.g. plot(1:10,1:10, type="l", col="red") ), it does not work for the particular plots I want. It works on the screen. Here is an example taken out from "Mixed-Effects Models in S and
2009 Mar 15
2
xyplot of a specific ID number
Dear R list members, I have a question regarding xyplot. I managed to make a xyplot of all the IDs by using the syntax below: xyplot(PA ~ CRPC + CRPT | ID, data = redinteract) Now, I'd like to make a graph of a specific ID number (e.g., only ID number 301). I thought I could use "subset", but it seems to be not working. Could anyone let me know how I can make a graph of a
2010 May 07
4
Any way to apply TWO functions with tapply()?
I need to compute the mean and the standard deviation of a data set and would like to have the results in one table/data frame. I call tapply() two times and do then merge the resulting tables to have them all in one table. Is there any way to tell tapply() to use the functions mean and sd within one function call? Something like tapply(data$response, list(data$targets, data$conditions), c(mean,
2007 Mar 31
1
add confidence intervales to xyplot for ANCOVA and extracting info
Hi, I would like to add confidence intervales to an ANCOVA with 2 covariates when using xyplot. What would be a good way of accomplishing this? --8<---------------cut here---------------start------------->8--- rm(list = ls(all = TRUE)) rm(list = c(ls())) library(lattice) ## 1. generate data random <- rnorm(200) y <- abs(random) x1.cont <- abs(random) x2.fac <-
2012 Oct 22
3
Error: object 'CO2' not found
Hello: I am new on R, this is the first time I work with it, I am trying to run some R example to get learn of them, but, I have a problem when running the example below: http://stat.ethz.ch/R-manual/R-patched/library/datasets/html/zCO2.html CO2.Qn1 <- CO2[CO2$Plant == "Qn1", ] SSasympOff(CO2.Qn1$conc, 32, -4, 43) # response only Asym <- 32; lrc <- -4; c0 <- 43
2008 Dec 28
2
how to generalize the arguments for lm() (r-help@lists.R-project.org)
Hello, How could I generalize the following statement for an arbitrary number of columns instead of 7? result[[i]]<-lm( returns[,i] ~ factors[,1] + factors[,2] + factors[,3] + factors[,4] + factors[,5] + factors[,6] + factors[,7] ) Thank you, Mathgurl [[alternative HTML version deleted]]
2007 May 05
1
dynamically specifying regressors/RHS variables in a regression
Does anyone know if there is a way to specify regressors dynamically rather than explicitly? More specifically, I have a data set in "long format" that details a number of individuals and their responses to a question (which can be positive, negative, or no answer). Each individual answers as many questions as they want, so there are a different number of rows per individual. For each
2006 Aug 10
2
index.cond in xyplot
Dear R-users I have 5 dependent variables (y1 to y5) and one independent variable (x) and 3 conditioning variables (m, n, and 0). Each of the conditioning variables has 2 levels. I created 2*4 panel plots. xyplot(y1+y2+y3+y4+y5 ~ x | m*n*o,layout = c(4,2)) I would like to reorder the 8 panels. I tried to use index.cond (e.g., index.cond = list(c(1,3,2,4,5,7,6,8)) but it didn't work out.
2005 Feb 02
4
(no subject)
can you recommend a good manual for R that starts with a data set and gives demonstrations on what can be done using R? I downloadedR Langauage definition and An introduction to R but haven't found them overly useful. I'd really like to be able to follow some tutorials using a dataset or many datasets. The datasets I have available on R are Data sets in package 'datasets':
2007 Jan 29
6
Loop with string variable AND customizable "summary" output
Dear All, I am using R for my research and I have two questions about it: 1) is it possible to create a loop using a string, instead of a numeric vector? I have in mind a specific problem: Suppose you have 2 countries: UK, and USA, one dependent (y) and one independent variable (y) for each country (vale a dire: yUK, xUK, yUSA, xUSA) and you want to run automatically the following regressions: