Displaying 20 results from an estimated 2000 matches similar to: "plotting group means"
2009 Feb 27
2
Adjusting confidence intervals for paired t-tests of multiple endpoints
Dear R-users,
In a randomized placebo-controlled within-subject design, subjects recieved
a psycho-active drug and placebo. Subjects filled out a questionnaire
containing 15 scales on four different time points after drug
administration. In order to detect drug effects on each time point, I
compared scale values between placebo and drug for all time conditions and
scales, which sums up to
2008 Sep 08
2
How to preserve date format while aggregating
Hi
I have a dataframe in which some subjects appear in more than one row. I
want to extract the subject-rows which have the minimum date per subject. I
tried the following aggregate function.
attach(dataframe.xy)
aggregate(Date,list(SubjectID),min)
Unfortunately, the format of the Date-column changes to numeric, when I'm
applying this function. How can I preserve the date format?
Thanks
2008 Sep 19
1
getting line breaks with xtable
Sorry, for asking the same question again, but I got no reactions the last
time. Maybe it was just overseen by the experts.
I'm using the xtable function with Sweave and Lyx and I would like to know
how to get automatic line breaks for long strings in a column of the table.
I've learned from the Lyx wiki that the Latex command \linebreak produces
table cells with multiple lines. I tried to
2008 Dec 19
1
diagonal lines in legends of ggplot2
Hi, I have the following problem with ggplot2: When I specify black contours
for bars in a barplot, ggplot automatically shows diagonal lines in the
legend boxes. Is there a way, to remove these diagonal lines?
Here's a simple example:
library(ggplot2)
df<-data.frame(x=gl(6,1),y=rnorm(6,100,50))
ggplot(df,aes(y=y,x=x,fill=x))+geom_bar(aes(group=x),colour='black',size=1)+
2010 Sep 23
1
How to pass a model formula as argument to with.mids
Hello
I would like to pass a model formula as an argument to the with.mids
function from the mice package. The with.mids functon fits models to
multiply imputed data sets.
Here's a simple example
library(mice)
#Create multiple imputations on the nhanes data contained in the mice
package.
imp <- mice(nahnes)
#Fitting a linear model with each imputed data set the regular way works
2008 Oct 08
1
NA's in multiple choice summary table in Hmisc
Hi,
I have a set of 30 binary variables measuring side effects after drug
treatment. Since each subject can have multiple side effects, I want to
display these side effects in a multiple choice table. I'm using the summary
and mChoice functions of the Hmisc package, because it produces nicely
formatted latex tables. My problem is, that table includes a category for
people who have at
2010 May 12
1
Input encoding problem when using sweave with xetex
Hello
Because I want to use different true type fonts with latex, I''m using the
XeTeX typesetting engine for my sweave-documents. I''m using Lyx with Sweave
on a Windows 7 PC and have set up LyX to work with XeTeX according to the
following instructions:
http://wiki.lyx.org/LyX/XeTeX
Because the input file for XeTeX is assumed to be in UTF-8 encoding, I set
the encoding
2008 Feb 18
2
Custom Plot - means, SD & 5th-95th% (Plotmeans or Boxplot)?
Any help with this problem would be greatly appreciated:
I need to produce a custom plot i haven't come across in R. Basically, I
want to show means, 1st standard deviation and 5th and 95th percentiles
visually, using something resembling a boxplot. Is it possible to completely
customize a boxplot so that it shows means as the bar (instead of, not as
well as medians), standard deviations at
2012 Aug 13
4
write.dbf error: invalid subscript type 'list'
Dear all,
I am basically a GIS user and am new to R.
I am trying to write a data frame to a dbf file.
*n.simulations <- 999
binomial <- kulldorff(geo, cases, population, NULL, pop.upper.bound,
n.simulations, alpha.level, plot)
cluster <- binomial$most.likely.cluster$location.IDs.included
df <- data.frame(ID=seq(1,n.simulations,by=1),
simloglkhd=binomial$simulated.log.lkhd)
2010 Nov 20
2
Merge two ggplots
Hello everyone.
I am using ggplot and I need some help to merge these two plots into one.
plot_CR<-function(x,y,agentid,CRagent){
library(ggplot2)
agent<-CRagent[[agentid]] # To make following expression shorter
ggplot((data.frame(x=CRX,y=CRY,sr=agent$sr)))+
geom_point(aes(x,y,colour=cut(sr,c(0,-10,-20,-30,-40,-50,-60,-70,-80))))+
geom_text(aes(x,y,color=cut(sr,
2000 Jul 07
2
Question of programming style
This is really a question of how to program this *BETTER*. It works as I have
done it, but is quite ugly.
I want to do a 3d scatterplot of the upper triangle of a matrix, where the
z-values are the values in the matrix, and the row and column indices are the y-
and x-values. The complete (11 by 11) matrix is mmtop94.2. Here is my awkward
code:
mmtop94.2[lower.tri(mmtop94.2)] <- NA
# Here i
2010 Sep 01
3
[LLVMdev] Assertion failure in tablegen: rationale ?
Hello,
I was fiddling with TableGen (for a use that has nothing to do with a
compiler but it's doesn't matter) and TableGen triggers an assertion failure
on this code (I reduced the case to the minimum, it's a parsing bug):
class Bli<string _t>
{
string t = _t;
}
class Bla<list<Bli> _bli>
: Bli<!car(_bli).t>
{
}
#0 0x00007ffff6ebda75 in *__GI_raise
2010 Jul 08
1
xyplot help
Hi, I am learning xyplot. I have an example dataset attached.
plotdata<-read.table("plotdata.txt",sep='\t',header=T,row.names=1)
head(plotdata,n=4)
y x type
1 -4.309601 -0.7448405 A
2 -4.715421 0.7875994 A
3 -2.310638 0.5455310 A
4 -2.685803 10.4116868 A
xyplot(y~x,groups=type,plotdata, auto.key=T)
This shows different colors for different
2008 Nov 04
1
How to create margin area around a graphic made by xyplot
Hi list,
Does any body know how I can create a margin area around the graphic created
by xyplot (the same thing we do using par in plot function)? I tried
viewport, but does not work.
Here is the code:
==============================================
require(grid)
vp<- viewport(x=.1,y=.1,width=.6,height=.6,just=c("left", "bottom"))
pushViewport(vp)
2008 Oct 30
2
xyplot, the first tick mark starts from 2 rather than 1, and also there is a NA as the final tick mark.
I am trying to plot some data, but have got some difficulties with labels on
the tick marks on the x-axes. There are 20 data points. All I want to do is
to plot the Loss versus Lines. When I use xyplot, the first tick mark starts
from 2 rather than 1, and also there is a NA as the final tick mark.
Here is the R code you code give it a try:
Would any body be able to fix this, please?
2010 Sep 01
0
[LLVMdev] Assertion failure in tablegen: rationale ?
On Sep 1, 2010, at 4:35 AM, Amaury Pouly wrote:
> Hello,
> I was fiddling with TableGen (for a use that has nothing to do with a compiler but it's doesn't matter) and TableGen triggers an assertion failure on this code (I reduced the case to the minimum, it's a parsing bug):
David, can you take a look? This is related to your lisp interpreter :)
-Chris
>
> class
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),
2006 Oct 31
4
getMethod(s) and var.test
Hi,
How do I retrieve the var.test() function code? I had a similar problem once
before with another function but getMethods() solved the problem then. Now I
tried several combinations for var.test() without success.
Regards
benjamin
--
Benjamin Otto
Universitaetsklinikum Eppendorf Hamburg
Institut fuer Klinische Chemie
Martinistrasse 52
20246 Hamburg
[[alternative HTML
2006 Jan 16
5
A function that return a link_to, Possible ?
Hello, I try this :
in application_helper.rb
-----------------------
def lnk bla
return link_to bla, { :controller => bli , :action => "blo" , :id
=> "blu" }
end
in file.rhtml
-----------
<%= lnk "yo!" %>
This return an error. There is a way to do this or something similar, or
this is completly impossible ?
Thanks
2007 Dec 11
2
ggplot - Setting the y-scale in a bar plot
Dear All (probably Hadley),
I am now trying to customise some plots using a bar geom.
I do not want to use the default binning statistic, but rather
calculate the bar heigths separately. I do manage this, but for
comparison purposes I would like to have a set of plots all with the
same y-axis height. But I do not seem to find out how to fix the
scale of the y-axis in this case.
Any tips?