Search Archives
Search tips
from:Name
Search by author name, e.g. from:Duncan Murdoch
"exact phrase"
Match an exact phrase
word1 word2
Match messages containing both words
Date range
Use the date pickers to filter results to a time period
Use the list dropdown to narrow results to a specific mailing list. Combine from: with other terms to filter by author and content.
Thank you, that's exactly what I needed. -- View this message in context: http://r.789695.n4.nabble.com/Lattice-useOuterStrips-and-axes-tp3330338p3330613.html Sent from the R help mailing list archive at Nabble.com.
Playing with ggplot, something I'd promised myself I'd get around to. I've the following scenario: library(lattice) library(ggplot2) myData <- data.frame( x = rnorm(100), y = rnorm(100), group = 1:4 ) xyplot(y ~ x | factor(group), data...
A suggestion for a family of such functions: ceilGenerator <- function(num) function(x) num * ceiling(x / num) ceil10 <- ceilGenerator(10) ceil20 <- ceilGenerator(20) ceil10(1:10 * 4) ceil20(1:10 * 4) Lauri Nikkinen wrote: > > R-users, > > Is there a function...
a <- 1:3 b <- 11:13 c <- 21:23 names <- c('a','b','c') do.call(data.frame, list(sapply(names, function(x) get(x)))) runner wrote: > > What I am trying to do is as follows: > > - I have listed names...
Consider the following: library(lattice) library(latticeExtra) temp <- expand.grid( subject = factor(paste('Subject', 1:3)), var = factor(paste('Variable', 1:3)), time = 1:10 ) temp$resp <- rnorm(nrow(temp), 10 * as.numeric(temp$var), 1) ylimits <- by(temp$resp...
A simple example (avoiding using dates, just to show the principle) - this assumes that your data are already sorted (?order). temp <- data.frame(subject = rep(1:2, each = 5), response = 1:10) print(temp) last <- do.call(rbind, by(temp...
Hi, I am trying to find a way to automate production of page numbers in plots produced using the lattice package. To do this, I started playing around with setHook which works fine with vanilla plot, but the hook 'plot...
Thanks Peter. This is true, but consider this continuation of my example (which is probably what I should have written originally): my.opts <- list(default.args = list( as.table = TRUE, between = list(x = 0.2, y = 0.2), scales = list...
All, I am constructing a pharmacokinetic dataset and have hit a snag. The dataset can be demonstrated in the following way: myData <- data.frame( evid = c(1, 0, 0, 0, 1, 0, 1, 1, 1, 0), time = 1:10, last...
I wrote a little utility function for exactly this reason, which I use with long titles. You may want to add calls to par to adjust the upper margin if you are using raw graphical functionality (plot et al) - but...
I'm trying to annotate some graphics using plotmath and finding out that the code I'm using isn't bolding the greek letters - it bolds the rest (once I adjusted the numerics to characters), it's just failing on...
I have learned something new - thanks for the strwrap info. The problem with posting from Nabble is that by the time your post actually gets to the list (2 hours after you posted it in this case) and you've...
I have stumbled across something in the Lattice package that is vexing me. Consider the code below: __________________________________________________________ library(lattice) myData <- expand.grid(sub = factor(1:16), time = 1:10) myData$observed <- rnorm(nrow(myData)) myData$fitted <- with(myData, ave(observed...
# Create a matrix of ball locations # You'd do this using the calls within your points function balls <- matrix(c(0,50,25,-150,-100,-50), ncol=2, byrow=F) # Draw a line from the origin to each ball location...
Hi, I'm currently in the process of writing an R-installation SOP for my company. As part of that process I'm using the recommendations from the 'R Installation and Administration' document, section 3.2, "Testing an installation". This...
my.data <- data.frame( trts <- rep(c('Drug 1','Drug2'), each = 10), doses <- rep(c('Low dose','High dose'), 10), resp <- rnorm(20) ) tapply(my.data$resp, list(my.data$trts, my.data$doses), mean) Jim Afshartous, David wrote: > > > All...
Hi, I have recently been playing with the grid package in an attempt to create some pages containing multiple lattice plots on the same page. However, when I specify a grid layout with different widths, such as: pushViewport(viewport(layout...
You could write a function to get rid of a lot of the grunt work; for example (this using lattice instead of ggplot, but should be pretty much the same): library(lattice) library(grid) graphics.off() myPlot1 <- xyplot(1 ~ 1...
Hey Dennis, As you've undoutedly discovered, par and lattice don't play well together, because they're different graphics systems. Most of the par-esque functionality can be found in: library(lattice) names(trellis.par.get()) You can then...
Hi, I'm currently designing some global themes for use with lattice, and have hit a snag. There doesn't appear to be (in xyplot at least) a way of setting a lattice option for the 'scales' parameter at a...
Can't find what you're looking for? Try searching with Google .