Displaying 20 results from an estimated 1000 matches similar to: "Unable to specify order of a factor"
2012 Jun 15
1
How do anova() and Anova(type="III") handle incomplete designs?
Hello all:
I am confused about the output from a lm() model with an incomplete
design/missing level.
I have two categorical predictors and a continuous covariate (day) that
I am using to model larval mass (l.mass):
leaf.species has three levels - map, syc, and oak
cond.time has two levels - 30 and 150.
There are no response values for Map-150, so that entire, two-way, level
is missing.
2012 Jun 01
1
Violation of sample independence in Pearson's product-moment correlation
Hi all:
There was a concern raised by reviewers of a manuscript of mine over the
proper execution of a Pearson's correlation. In brief, this was undertaken
in order to determine the relationship between the extent of wheel running
(y axis) and ethanol intake (x axis) across three, separate 10 day periods
in 7 animals.
In the paper, the correlational plots for each 10 day-period had 70 data
2009 Nov 09
0
Testing treatment effects on exponential decay models
Hello all:
I would like to test whether there are treatment effects on decomposition
rate, and I would like to inquire about the best, most appropriate means
using R.
I have plant decomposition data that is generally considered to follow an
exponential decay model as follows:
Wt = Wi * exp(-k * t)
Where Wt and Wi are the weights of the plant material at time t and 0,
respectively. k is a
2009 Nov 09
6
Find the first values in vector
Hi !
I have a vector:
vec= TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE
and I'm looking for a method which let me get only the first values equal
TRUE from this vector. It means that I want to get a vector:
vec_out = TRUE TRUE TRUE TRUE
or posictions values = TRUE: vec_out = 1,2,3,4
--
View this message in context:
2008 Jun 17
1
ggplot facet spacing, wrapping
I'm running into some problems with the spacing of some faceted ggplot plots.
I have a number of time series faceted to be one above another, but the
scale labels of the y axes all clobber each other at the bottom/top of each.
for example, try:
qplot(x, y, data = data.frame(x = 1:10, y = 1:10, size = 1:10), facets =
size ~ ., size = size) + scale_x_continuous(breaks = 1:10) +
2011 Nov 08
3
ggplot2 reorder factors for faceting
Dear List
I am trying to draw a heatmap using ggplot2. In this heatmap I have faceted my data by 'infection' of which I have four. These four infections break down into two types and I would like to reorder the 'infection' column of my data to reflect this.
Toy example below:
library(ggplot2)
# test data for ggplot reordering
genes <- (rep (c(rep('a',4),
2009 Feb 11
2
Label bars in a faceted bar plot in ggplot2
Hi List,
I am running R 2.8.0 on a Windows XP machine, running ggplot2 version 0.8.1
I want to label the bars in a faceted grid barplot. Reproducible R
code is given below:
#### reproducible facet barplot #####
library(ggplot2)
# Dataset from which to create the barplot
ml <- rep(1:10,2)
vals <- rnorm(20,mean = 10, sd=1)
type <- c(rep("MAPE",10),rep("AIC",10))
2011 Feb 16
1
Faceting article
Hi,
I've been involved in developing a fairly complex site at
http://tilt.ft.com recently, and have acquired an unhealthy interest in
faceting. I couldn't find any good non-academic guides to faceting
strategy on the web, so I thought I'd have a stab at writing one.
I'm not completely happy with it, but it's been sitting in my drafts for
long enough that I thought it
2012 Mar 12
1
Faceted bar plot shows wrong counts (ggplot2)
I have encountered a problem with faceted bar plots. I have tried to
create something like the example explained in the ggplot2 book (see pp.
126-128):
library(ggplot2)
mpg4 <- subset(mpg, manufacturer %in%
c("audi", "volkswagen", "jeep"))
mpg4$manufacturer <- as.character(mpg4$manufacturer)
mpg4$model <- as.character(mpg4$model)
base <-
2009 Dec 01
1
Does xapian support attribute search & faceted search?
Can I use xapian for a search like:
'title' has the phrase "dinner jacket" AND 'color' == BLACK AND 'state' == MA AND 'size' == XL
What about faceted search?
Thanks
2012 Jun 27
0
ggplot2 ordering in a faceted dotplot.
am trying to produce two dot plot figures in ggplot2. So far the first one (p) in the program below is working fine.
However when I want to move to a faceted plot (p1) I seem to lose my ordering or, more likely, I'm just getting an ordering I am not expecting and I always have trouble understanding ordering in R!
What I would like is the 2011 panel to be ordered in descending order as is
2008 Feb 27
1
how to specify ggplot2 facet plot order
Hi, new to R and ggplot2. I've been trying to get a facet plot in which the
order of the facets is as I require, rather than ordered numerically,
alphabetically, by Roman numerals, mean (answers to these were posted here
after much searching). Here's some test code to demonstrate what I get.
series = c('C2','C4','C8','C10','C15','C20')
ids =
2010 Aug 23
2
change order of plot panels in faceted ggplot/qplot
Hi,
I have a 5-paneled figure that i made using the facet function in
qplot (ggplot). I've managed to arrange the panels into two rows/
three columns, but for the sake of easy visual comparisons between
panels in my particular dataset, I want to have the two plots on the
bottom align on the right hand side of the figure instead of the left.
Here's an example:
m <-
2013 Mar 07
3
ggpliot2: reordering of factors in facets facet.grid(). Reordering of factor on x-axis no problem.
Hi everyone (again),
before you all start screaming that the reordering of factors has been
discusse on several threads and is not particular to ggplot2, hear me out.
I can easily reorder my x-axis factor in facet.grid() in ggplot2. What I
cannot reorder are the factors represented on the strips. I can see that the
graphs are changing, so I am afraid of what it is I am doing. Why is ggplot2
2007 Dec 06
0
coxme() random effect syntax
Hello:
I would like to run a Cox proportional hazards regression on crayfish
dislodgement at different water velocities by crayfish size class and
substrate (rock) type. Additionally, there is a covariate variable, rock
movement that may be influencing crayfish dislodgment. So...
I have crayfish size class (CFSZCL) and substrate type (SUBSZ) as fixed
factors influencing the dislodgment of
2007 Oct 08
0
coxph() command design and data setup
Hello all:
I'm attempting to run a Cox proportional hazards function on survival data
from insects and I have a few questions.
My current command that I'm using to call the model is as follows (using
coxph() from the survival library):
coxph(Surv(day, censor) ~ treatment + room + chamber %in% treatment, data =
data.table)
Day indicates which day a particular observation occurred, and
2007 Oct 09
0
coxph models for insects
Justin,
You have an interesting problem, and a serious (reliable) consultation would
take more time than I have to give at the moment. Which is to say that you
should take these comments with a grain of salt.
First, I don't think that you have censored data. You have 2 subdistribution
functions F1(t) and F2(t), F1(t) + F2(t) = F(t) = the "time to endpoint"
distribution.
2006 Apr 09
2
Substruct v0.6
I just put the finishing touches on Substruct v0.06. As always, you can
check out a demo over at http://substruct.subimage.com/
What''s new?
Version 0.6
---------------------------------------
Added:
- Tagging for products
- Maintenance of product tags
- Automatic image thumbnail / small size creation via RMagick
Updated:
- Better shopping cart experience with AJAX cart
2013 Dec 02
2
plus/minus +/- in factor; not plotmath not expression
I want to put the "plus or minus" symbol into a character variable, so that this can be turned into a factor and be displayed in the "strip" of a faceted ggplot2 plot.
A very nice solution, thanks to Professor Ripley's post of Nov 16, 2008; 3:13pm, visible at http://r.789695.n4.nabble.com/Symbols-to-use-in-text-td874239.html and subsequently
2009 Oct 06
1
ggplot2: mapping categorical variable to color aesthetic with faceting
Hello Again... I?m making a faceted plot of a response on two categorical
variables using ggplot2 and having troubles with the coloring. Here is a
sample that produces the desired plot:
compareCats <- function(data, res, fac1, fac2, colors) {
require(ggplot2)
p <- ggplot(data, aes(fac1, res)) + facet_grid(. ~ fac2)
jit <- position_jitter(width = 0.1)
p <- p +