Dear expeRts,
I have a master file master.tex containing the preamble and which inputs (via
\input{chapter01}, \input{chapter02}, ...) chapters. The chapters are .Rnw
files. My goal is to use patchDVI::SweavePDF to compile the chapters (say,
chapter.Rnw) individually (each chapter starts with sour
Dear Duncan,
many thanks for helping. It works fine.
Cheers,
Marius
Duncan Murdoch writes:
> On 12-08-19 3:47 PM, Marius Hofert wrote:
>> Dear Duncan,
>>
>> I recently asked a question concerning patchDVI on r-help, see
>>
>> ,
>> | https://st
I have the data frame...
df <- cbind(expand.grid(d=as.factor(c(2,5)), n=c(100, 200),
beta=as.factor(c(0.2, 0.8)), group=LETTERS[1:2]), value=runif(16))
... which I would like to display in a table like ...
require(tables)
tabular(d * beta ~ group * mean * Heading() * value, data=df)
Now I would
Duncan Murdoch writes:
>
> The + means concatenation, so that spec says to put the RowFactor above the
> d*beta rows. Not sure why that causes an error, but it's likely because
> you've
> got the wrong number of items.
>
> This should work, but it doesn't give you the extra spacing properly.
Hi,
After applying acast() I typically have to adjust the names of the array by
hand. Is there any way to tell acast to do this automatically?
Cheers,
Marius
require(reshape2)
(df <- data.frame(a=c("a1","a2"), b=c("b1","b2"), c=c("c1","c2")))
a.df <- acast(df, a~b, value_var="c")
names(dimname
Dear expeRts,
I would like to color a certain region in a levelplot. The region for z <= 0.02
should have a dark gray color. Below is a minimal example. It almost does what
I want, but The region between z=0.02 and z=1 is also colored in dark gray
(instead of just the region for z <= 0.02).
How
<- pmax(f(dat$x) + f(dat$y) - 10, 0)
>
> levelplot(z ~ x * y, dat,
> at=c(-1, 0.02, 1, 5, 10, 20, 50, 500, 900),
> labels=TRUE, contour=TRUE, colorkey=FALSE,
> col.regions=gray(c(0.2, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1)))
>
> Jean
>
Dear expeRts,
I would like to colorize the backgrounds of a pairs plot according to the
respective panel number. Here is what I tried (without success):
count <- 0
mypanel <- function(x, y, ...){
count <<- count+1
bg. <- if(count %in% c(1,4,9,12)) "#FDFF65" else NA
points(x, y, cex=0
else "transparent"
ll <- par("usr")
rect(ll[1], ll[3], ll[2], ll[4], col=bg)
points(x, y, cex=0.5)
}
mydiag.panel <- function(x, ...){
ll <- par("usr")
rect(ll[1], ll[3], ll[2], ll[4], col="#FDFF65")
}
U <- matrix(runif(4*5
Okay, one simply has to use label.pos=0.5 in pairs() to get the correct
behavior.
On 2012-03-02, at 09:10 , Marius Hofert wrote:
> Dear Ilai,
>
> I tried to also adjust the diagonal panels. However, the variable names are
> not
> positioned correctly anymore. Do you
Hi,
I would like to colorize certain panels in the pairs plot below with certain
colors. How can access the panel row and column in a pairs plot to achieve this?
Cheers,
Marius
## generate data
U <- matrix(runif(4000), ncol=4)
## define panel function for colorizing the panels
mypanel <- fun
okay, I found something. Not very elegant, but it does the job:
## generate data
U <- matrix(runif(4000), ncol=4)
## define panel function for colorizing the panels
cols <- c("blue", "black", "black",
"blue", "black", "black",
"black", "black", "green",
"black", "bla
Dear expeRts,
Why does na.blank=TRUE not replace the NA's in the following LaTeX table?
x <- matrix(1:72, ncol=4, nrow=8)
colnames(x) <- c("gr1.sgr1", "gr1.sgr2", "gr2.sgr1", "gr2.sgr2")
rn <- apply(expand.grid(beta=c(0.25, 0.75), n=c(100, 500), d=c(10, 100))[,
3:1], 2, rmNames)
x <- cbind(rn, x
ted due to "cgroup", but I don't know how to avoid this.
On 2012-05-02, at 09:26 , Marius Hofert wrote:
> Dear expeRts,
>
> Why does na.blank=TRUE not replace the NA's in the following LaTeX table?
>
> x <- matrix(1:72, ncol=4, nrow=8)
> colnames(x) <-
201 - 214 of 214 matches
Mail list logo