Hi,
On 9 August 2012 08:40, li li hannah@gmail.com wrote:
Dear all,
I have a few extra questions regarding this. Below is my code.
My questions are:
(1), How can I remove the labels, tick marks and numbers, and the word
density for the histgrams.
(2) On the top right corner, there
Hi,
You can use a grob instead of a text string, e.g
main = textGrob(Title goes here, gp=gpar(fontsize=24))
HTH,
b.
On 7 August 2012 03:49, Alastair alastair.and...@gmail.com wrote:
Hi,
I'm using the gridExtra package to combine some graphs like in the
arrangeGrob example. Each of the
Looking at these, and in retrospect, if I were writing a manuscript of
the pre-digital age, I would definitely add a burning mark as a
finishing touch to complete the work. Perhaps waving the parchment
above a burning candle.
With modern digital support, you can fake a similar result using e.g.
You can use main = unique(d$Subject) to solve this problem.
HTH,
b.
On 27 June 2012 08:49, Marcel Curlin cemar...@u.washington.edu wrote:
Well at this point I have what I need (rough plot for data exploration) but
the simplicity of the first approach is quite elegant and it has become a
Try this alternative solution using only base functions:
# split the data into 4 data.frames
l - split(data, data$Subject)
names(l)
# set up the graph parameters
par(mfrow=n2mfrow(length(l)), mar=c(4,4,1,1), mgp = c(2, 1, 0))
# good old for loop over the subject names
for( n in names(l)){
d -
Hi,
Here's one approach:
plot_one - function(d){
with(d, plot(Xvar, Yvar, t=n)) # set limits
with(d[d$param1 == 0,], lines(Xvar, Yvar, lty=1)) # first line
with(d[d$param1 == 1,], lines(Xvar, Yvar, lty=2)) # second line
}
par(mfrow=c(2,2))
plyr::d_ply(data, Subject, plot_one)
HTH,
b.
Hi,
Try this post:
http://r.789695.n4.nabble.com/Exporting-an-rgl-graph-tp1872712p1905113.html
HTH,
b.
On 22 June 2012 19:26, Rainer M Krug r.m.k...@gmail.com wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi
Just to be sure: I couldn't find a way of creating an interactive 3d
Have a look at this:
http://stackoverflow.com/questions/7734535/control-font-thickness-without-changing-font-size
and
http://stackoverflow.com/questions/10686054/outlined-text-with-ggplot2
which refers to a base graphics version.
HTH,
b.
On 20 June 2012 07:58, MacQueen, Don
Try this,
rotate = function(x) paste(strsplit(x,)[[1]],collapse=\n)
t - this is a text
plot.new()
text(1/2,1/2,t)
par(lheight=0.8)
text(1/2,1/2,rotate(t))
HTH,
b.
On 13 June 2012 01:49, Stuart Rosen s.ro...@ucl.ac.uk wrote:
For labelling a plot, I am trying to rotate a character string
Hi,
On 6 June 2012 08:58, Paul Murrell p.murr...@auckland.ac.nz wrote:
Hi
Here's one way to approach it ...
ggplot(data.frame(x=1:10, y=1:10)) +
geom_polygon(aes(x=xx, y=yy), fill=grey70,
data=data.frame(xx=c(0, 0, 4, 4), yy=c(0, 11, 11, 0))) +
geom_point(aes(x=x, y=y))
Hi,
Another option that you might want to try is the tikzDevice package;
tikz has functions to flip and rotate objects and could it from R with
tikzAnnotate / tikzAnnotateGrob. Of course these objects would not
really be grobs but tikz code, though for text the end result would
probably be the
you can open a device that has the exact dimensions of the table,
g = tableGrob(head(iris, 4))
png(test.png, width=convertWidth(grobWidth(g), in, value=TRUE),
height=convertHeight(grobHeight(g), in,
value=TRUE),units=in, res=150)
grid.draw(g)
dev.off()
Doing this with knitr might be
2012 09:43, Alexander Shenkin ashen...@ufl.edu wrote:
this works - thanks baptiste! i'm working in Sweave right now - perhaps
it will be tough in knitr as you mention.
On 5/25/2012 4:31 PM, baptiste auguie wrote:
you can open a device that has the exact dimensions of the table,
g = tableGrob
You can rotate the viewport to flip around the horizontal axis,
library(grid)
grid.text(Chiral)
grid.text(Chiral, vp=viewport(angle=180, y=unit(0.5,npc)-unit(1,line)))
HTH,
b.
On 23 May 2012 05:34, Thomas Zumbrunn t.zumbr...@unibas.ch wrote:
Maybe my question was not concise enough. I was
Oops, sent too early; this obviously just a rotation, not a mirror
image. It illustrates the problem though ;)
b.
On 23 May 2012 07:32, baptiste auguie baptiste.aug...@googlemail.com wrote:
You can rotate the viewport to flip around the horizontal axis,
library(grid)
grid.text(Chiral
Try this,
bquote(.(L1) * .(L2))
HTH,
b.
On 19 May 2012 16:17, Rolf Turner rolf.tur...@xtra.co.nz wrote:
In the context in which I am actually working it is necessary for
me to build parts of a text string to place on a plot in two separate
stages.
The following toy example illustrates
Your log10(HCO3 and sqrt(HCO3 seem to be missing closing brackets.
HTH,
baptiste
On 18 May 2012 11:34, Rich Shepard rshep...@appl-ecosys.com wrote:
One of many scripts to produce 4 lattice plots on one page keeps throwing
an error. I've tried manipulating the file to eliminate the error, but
For better typography, try tikzDevice, it uses LaTeX to render the text.
b.
On 16 May 2012 07:23, Fisher Dennis fis...@plessthan.com wrote:
David
You missed the point -- the issue was not the spacing between WORDS. It was
the spacing between LETTERS (as noted in the original email)
Other
Hi,
try also grid.table() in gridExtra
b.
On 27 April 2012 01:26, statquant2 statqu...@gmail.com wrote:
Hello,
I would like to be able to plot an array on a plot, something like:
|arg1 | arg2 | arg3
val1| 0.9 | 1.1 | 2.4
val2| 0.33 | 0.23 | -1.4
val3| hello| stop | test
I
Hi,
On 24 April 2012 05:00, Duncan Murdoch murdoch.dun...@gmail.com wrote:
On 23/04/2012 10:49 AM, Adam Wilson wrote:
I routinely write graphics into multi-page PDFs, but some graphics (i.e.
plots of large spatial datasets using levelplot()) can result in enormous
files. I'm curious if
library(plyr)
adply(my.array,1:3)
HTH,
baptiste
On 20 April 2012 08:46, Emmanuel Levy emmanuel.l...@gmail.com wrote:
Hi,
I have a three dimensional array, e.g.,
my.array = array(0, dim=c(2,3,4), dimnames=list( d1=c(A1,A2),
d2=c(B1,B2,B3), d3=c(C1,C2,C3,C4)) )
what I would like to get is
Dear list,
I am trying to find a fast solution to read moderately large (1 -- 10
million entries) text files containing only tab-delimited numeric
values. My test file is the following,
nr - 1000
nc - 5000
m - matrix(round(rnorm(nr*nc),3),nr=nr)
write.table(m, file = a.txt, append=FALSE,
might be
causing this?
Thanks,
baptiste
On 2 April 2012 11:04, Duncan Murdoch murdoch.dun...@gmail.com wrote:
On 12-04-01 2:58 AM, baptiste auguie wrote:
Dear list,
I am trying to find a fast solution to read moderately large (1 -- 10
million entries) text files containing only tab-delimited
Hi,
On 1 April 2012 03:41, Paul Miller pjmiller...@yahoo.com wrote:
Hello Baptiste,
What you've done is very interesting. Went through and tried to understand
all the steps. Reminded me of studying languages in years gone by. Always
found it easier to read and understand a sentence than to
Hi,
I would do the following,
library(ggplot2)
require(reshape)
TestData - structure(list(profile_key = c(1, 1, 1, 1, 1, 2, 2, 2, 2, 2,
2, 3, 3, 3, 3, 3), line = c(1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2,
1, 1, 1, 1, 1), instance = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 2), drug =
Hi,
Try this,
replicate(sample(10,1), dev.new())
graphics.off()
HTH,
baptiste
On 15 March 2012 20:36, Alaios ala...@yahoo.com wrote:
Dear all,
I would like at the beginning of my code to turn off all the remaining open
devices.
How can I do that by using dev.off()?
I would like to
Hi,
Try the cubature package, and maybe play with the tolerance.
HTH,
b.
On 13 March 2012 18:39, Niroshan wnnpe...@ucalgary.ca wrote:
Dear R Members,
I want to know a fast R function to do multidimensional integration. I used
the function 'cuhre' in R2cuba library. But it takes painful
Hi,
If you're going to use different text sizes and convert between units,
it might be easier to do the calculations with grid.
par(mar=c(1,1,1,5))
plot(1:10)
labels = c(1, 2, 10, 123, 3.141592653589, 1.2, 2)
sizes = c(1, 1, 2, 1, 0.4, 1, 3) # cex of individual labels
## pure base graphics
Hi,
the grImport package provides some tools for this.
HTH,
b.
On 19 February 2012 16:06, Nick Matzke mat...@berkeley.edu wrote:
Hi,
Is there a way to parse a postscript (*.ps) file with R (or perhaps with
some other command-line utility)?
E.g., I have a map in postscript format with
The default units of polygonGrob are npc, I think you want native instead.
Try the following,
library(grid)
d = data.frame(x=rnorm(100, 10), y=rnorm(100, -100))
v = dataViewport(xData=d$x, yData=d$y)
grid.points(d$x,d$y, default.units=native, vp=v)
HTH,
b.
On 17 February 2012 02:47,
A minimum code to plot a coloured matrix with text labels could be the
following:
library(grid)
library(scales)
library(RColorBrewer)
diverging_palette - function(d = NULL, centered = FALSE, midpoint = 0,
colors = brewer.pal(7,PRGn)){
half - length(colors)/2
Once upon a time r-forge had the option to sync from an external svn
repository, e.g. hosted on googlecode. I haven't seen it available for
some time, sadly. I'm sure many users would appreciate if this feature
came back with the new interface. Not sure if it could work with git
as well, though.
Hi,
If you read French, you might find the following discussion interesting,
http://www.forum.math.ulg.ac.be/viewthread.html?id=45765
It contains some good suggestions to project an ellipsoid onto a
plane, which as I understand might be related to your question.
HTH,
b.
On 8 February 2012
On 9 February 2012 13:02, David Winsemius dwinsem...@comcast.net wrote:
On Feb 8, 2012, at 6:33 PM, Tom Roche wrote:
Peter Langfelder Thu Feb 9 00:01:31 CET 2012
I'm exploring using a version control system
+1! welcome to the new millenium :-)
to keep better track of changes to the [R]
Hi,
If you don't mind having NAs for missing values, try the following,
mylist = list(1:3, 4:7)
library(plyr)
write.csv(do.call(rbind.fill.matrix, lapply(mylist, matrix, nrow=1)), file=)
HTH,
b.
On 6 February 2012 15:01, Michael comtech@gmail.com wrote:
Hi all,
I have a list of vector
Try this,
plot(1:10)
img - grid::grid.cap()
# grid.raster(img)
stream - col2rgb(img)
write.table(stream, file=dam.txt, row.names = FALSE,
col.names = FALSE)
(you'll have to restore the dimensions of the matrix once you've read
the rgb values for each pixel)
HTH,
baptiste
On 30
Hi,
which(x 15)
omits the NA (treated as false).
HTH,
b.
On 29 January 2012 09:36, Federico Calboli f.calb...@imperial.ac.uk wrote:
Dear All,
just a quick example:
x = 1:25
x[12] = NA
x
[1] 1 2 3 4 5 6 7 8 9 10 11 NA 13 14 15 16 17 18 19 20 21 22 23 24 25
y = x[x10]
y
[1] 1
The scales package?
gradient_n_pal(c(red,white,blue), c(0,0.5,1)) (seq(0,1,length=100))
HTH,
baptiste
On 26 January 2012 10:36, Jeffrey Joh johjeff...@hotmail.com wrote:
The gray (level) function returns different shades of gray, where level is a
vector of numbers ranging from 0 to 1. 0
You could draw a grid with grid, using grid.grill,
library(grid)
pdf(grid.pdf, width=21/2.54,height=29.7/2.54)
grid.grill(h = unit(seq(0, 297, by=1), mm),
v = unit(seq(0, 210, by=1), mm), gp=gpar(col=grey,lwd=0.1))
grid.grill(h = unit(seq(0, 297, by=5), mm),
v = unit(seq(0,
One reason might be that you can easily fool the user into running
unexpected/unreadable commands. Guess what this does:
cmd - paste(c(letters[c(19L, 25L, 19L, 20L, 5L, 13L)], (' ,
letters[c(19L, 21L, 4L, 15L)], , letters[c(4L,
5L, 19L, 20L, 18L, 15L, 25L)], , letters[c(1L, 12L, 12L)], ')),
ggExtra was not compatible with the recent changes in ggplot2 and had
become partially redundant, so I removed it.
grid.arrange and arrangeGrob in gridExtra won't help with the
alignment of axes. align.plots, which I can always send you offlist if
you want, extracted the size of axes and legends
Hi,
On 22 December 2011 09:16, rachaelohde cox.rach...@gmail.com wrote:
Hello,
I am trying to plot means and standard errors conditioned by a factor, using
qplot. I am successful at getting the bar graph I want with a error bar,
however I have tried many things and cannot get the bars to
Hi,
package planar is concerned with the full electromagnetic problem at
planar interfaces, which is not very useful for raytracing. The cda
package includes a small demo interfacing either rgl or povray (via
system call) to visualize 3D clusters of metallic particles. A more
general interface to
Hi,
Two possible routes I can suggest:
1- export the plot in svg format, which supports natively the use of
filling patterns, e.g.
http://www.w3.org/TR/SVG/images/pservers/pattern01.svg
It's possible that the gridSVG package could help you automate the
process of grid.garnish()-ing the grobs;
Hi,
Please don't cross post.
It seems that ggplotGrob has been replaced by new functions. You can
define it as
ggplotGrob - function(x) ggplot2:::gtable_gTree(ggplot2:::ggplot_gtable(x))
and it seems to work as before with grid.arrange().
HTH,
baptiste
On Wed, Nov 16, 2011 at 3:26 AM,
Hi,
Try grepl instead of sub,
mena[grepl(m5., mena)]
HTH,
baptiste
On 14 November 2011 21:45, Petr PIKAL petr.pi...@precheza.cz wrote:
Dear all
I am again (as usual) lost in regular expression use for selection. Here
are my data:
dput(mena)
Dear Ravi,
Thank you for your answer.
The integrand I proposed was a dummy example for demonstration
purposes. I experienced a similar slowdown in a real problem, where
knowing in advance the shape of the integrand would not be so easy.
Your advice is sound; I would have to study the underlying
Dear Hans,
[see inline below]
On 11 November 2011 22:44, Hans W Borchers hwborch...@googlemail.com wrote:
baptiste auguie baptiste.auguie at googlemail.com writes:
Dear list,
[cross-posting from Stack Overflow where this question has remained
unanswered for two weeks]
I'd like
Dear list,
[cross-posting from Stack Overflow where this question has remained
unanswered for two weeks]
I'd like to perform a numerical integration in one dimension,
I = int_a^b f(x) dx
where the integrand f: x in IR - f(x) in IR^p is vector-valued.
integrate() only allows scalar integrands,
Hi,
Try specifying explicit break points together with their corresponding
colors using at and col.regions,
levelplot(m, at= unique(c(seq(-2, 0, length=100), seq(0, 10,
length=100))), col.regions = colorRampPalette(c(blue, white,
red))(1e3))
HTH,
baptiste
On 7 November 2011 16:08, Lanna Jin
Hi,
Try the dichromat package (also dichromat_pal in the scales package).
HTH,
baptiste
On 3 November 2011 10:26, Max Kuhn mxk...@gmail.com wrote:
Everyone,
I'm working with scatter plots with different colored symbols (via
lattice). I'm currently using these colors for points and lines:
Try this,
library(grid)
grid.newpage()
grid.text(text)
HTH,
baptiste
On 22 October 2011 13:26, rkevinbur...@charter.net wrote:
I noticed that the text() command adds text to a plot. Is there a way to
either make the plot blank or add text to a blank sheet. I would like
to plot a page that
Hi,
I believe you want
eval(parse(text=pi/2))
a word of warning exemplified in
eval(parse(text=library(fortunes) ; fortune(106)))
HTH,
baptiste
On 19 October 2011 19:30, Erin Hodgess erinm.hodg...@gmail.com wrote:
Dear R People:
Suppose I have the following:
pi/2
and I would like
Hi,
Perhaps the easiest way is with grid.raster,
library(grid)
pdf(colorstrip.pdf, height=1, width=10)
grid.raster( t(myCols), width=unit(1,npc), height=unit(1,npc),
interpolate=FALSE)
dev.off()
HTH,
baptiste
On 20 October 2011 03:32, Brian Smith bsmith030...@gmail.com wrote:
Hi,
I was
Hi,
You could also pad the text labels with phantom 0s,
ghostrighter - function(x, ...){
n - sapply(x, nchar)
nmax - max(n)
padaone - function(ii){
si - paste(rep(0, length= nmax - n[ii]), collapse=)
as.expression(bquote(phantom(.(si)) * .(x[ii]) ))
}
sapply(seq_along(x),
package plyr makes it easier,
plyr::each(function.list)(pi)
HTH,
baptiste
On 15 October 2011 11:55, Richard M. Heiberger r...@temple.edu wrote:
function.list=c(sin, cos, function(x) tan(x))
for (f in function.list) print(f(pi))
[1] 1.224606e-16
[1] -1
[1] -1.224606e-16
On Fri, Oct 14,
Hi,
there are a couple of themes proposed in the wiki, one being white on black,
https://github.com/hadley/ggplot2/wiki/Themes
HTH,
baptiste
On 6 October 2011 04:05, Eugene Kanshin kanshin...@gmail.com wrote:
Hello,
I'm trying to produce some plots in ggplot2 to use them on
the dark-blue
On 6 October 2011 09:23, Dennis Murphy djmu...@gmail.com wrote:
Hi:
One option is the gridExtra package - run the example associated with
the tableGrob() function. Another is the addtable2plot() function in
the plotrix package. I'm pretty sure there's at least one other
package that can do
Hi,
Using ddply,
ddply(df, .(ID), mutate, nrows=length(rel.head), test = nrows==2
all(rel.head %in% c(1,3)))
HTH,
baptiste
On 5 October 2011 06:02, Dennis Murphy djmu...@gmail.com wrote:
Hi:
Here's another way to do it with the plyr package, also not terribly
elegant. It assumes that
More concisely,
ddply(Orange, .(Tree), transform, scaled = scale(age))
HTH,
baptiste
On 4 October 2011 11:24, john.morrongie...@csiro.au wrote:
That works a treat Thierry, thanks! I wasn't aware of the plyr package but I
like what it does- I'll put it to use work in the future.
Regards
Have you tried asciidoc (ascii package)? It seems like a good fit for
your needs.
baptiste
On 23 September 2011 11:09, Tal Galili tal.gal...@gmail.com wrote:
Hello dear R help members,
I have found several references on how to do this, my question is if anyone
is actually using them - and
Hi,
if your logo is in vector format you should probably try the grImport
package; see its vignette for examples, also below,
library(grImport)
## http://creativecommons.org/about/downloads/
PostScriptTrace(cc.logo.eps)
cc - readPicture(cc.logo.eps.xml)
logo - pictureGrob(cc[16:18], x=unit(1,
Hi,
Try this,
d - data.frame(x=runif(1e3, 0, 30), y=runif(1e3, 0, 30))
d$z = (d$x - 15)^2 + (d$y - 15)^2
library(spatstat)
library(maptools)
W - ripras(df, shape=rectangle)
W - owin(c(0, 30), c(0, 30))
X - as.ppp(d, W=W)
Y - dirichlet(X)
Z - as(Y, SpatialPolygons)
plot(Z,
Hi,
Are you after this?
last_plot() + opts(aspect.ratio=1)
Also, see https://github.com/hadley/ggplot2/wiki/Themes for some
settings re: plot margins.
HTH,
baptiste
On 1 September 2011 05:18, Alaios ala...@yahoo.com wrote:
Dear all,
I am using ggplot with geom_tile to print as an image a
Hi,
Below are a couple of options using a standard dataset,
str(iris)
## using base graphics
d - split(iris, iris$Species)
str(d) # list of 3 data.frames
par(mfrow=n2mfrow(length(d))) # split the device in 3 plotting regions
b.quiet - lapply(names(d), function(x) { # loop over the list names
Hi,
Try this,
library(gridExtra)
example(grid.table)
or addtable2plot() in plotrix, or textplot() in gplots, or Hmisc using
latex, or Sweave, ...
HTH,
baptiste
PS: please read the posting guide
On 20 August 2011 05:14, Ed Heaton heat...@comcast.net wrote:
Hi, friends.
I keep coming to
Hi,
Try this,
?capture.output
as in,
capture.output(cat(this is it))
HTH,
baptiste
PS: Here's another example for fun,
# begin absurd example
library(textplot)
capture.output(txtplot(1:10))
library(gplots)
textplot(capture.output(txtplot(1:10)))
library(grid)
grid.cap()
# not sure how to
Here's a warning, but it sounds like it's at a deep (C, presumably) level,
xfig()
grid::grid.rect(gp=gpar(fill=red, alpha=0.5))
Warning message:
In grid.Call.graphics(L_rect, x$x, x$y, x$width, x$height,
resolveHJust(x$just, :
semi-transparency is not supported on this device: reported only
A barplot rendered with povray,
http://zoonek2.free.fr/UNIX/48_R/03.html#10
At the other end of the spectrum,
library(txtplot)
x - factor(c(orange, orange, red, green, green, red,
yellow, purple, purple, orange))
o - capture.output(txtbarchart(x))
library(gplots)
textplot(o)
Dear list,
I have two questions regarding grid.symbols() in the grImport package.
This package allows you to import a vector graphic in R, and
grid.symbols() can be used to plot the resulting glyph at arbitrary
locations in a grid viewport.
I have tried the code in the grImport vignette, which
Hi,
You could try grid.colorstrip() from the gridExtra package,
grid.colorstrip(ifelse(dat, blue, red))
or grid.raster(), which should be more efficient,
grid.raster(matrix(ifelse(dat, blue, red)), interp=FALSE,
width=unit(1,npc), height=unit(1,npc))
HTH,
baptiste
On 15 July 2011 22:20,
Try this,
library(ggplot2)
d - data.frame(theta = runif(10, 0, 360), r = runif(10, 0, 3))
ggplot(d, aes(x=theta, y=r, size=r)) + coord_polar(start=0)+
geom_point() +
scale_x_continuous(breaks=seq(0, 360, by=30), expand=c(0,0), lim=c(0, 360))+
scale_area()
HTH,
baptiste
On 28 June 2011
Hi,
As far as I know secondary y-axis and multiple pages are not possible
in ggplot2 (there are workarounds for the latter in the ggplot2 list
archives). For the subtitle, you could implement it with grid.text and
grid viewports,
library(gridExtra)
library(ggplot2)
grid.arrange( qplot(1,1), sub
Hi,
You can draw arrangeGrob in a rotated viewport,
library(gridExtra)
library(ggplot2)
ps = replicate(4, qplot(rnorm(10), rnorm(10)), simplify=F)
g = gTree(children=gList(do.call(arrangeGrob, ps)), vp=viewport(angle=90))
grid.draw(g)
though you get some warnings about clipping for some reason.
Hi,
Try this
ggplot(df, aes(x,y)) + geom_tile(aes(fill=height), colour=white) +
scale_fill_gradientn(colours = c(red, gold, green)) +
geom_text(aes(lab=height))
HTH,
baptiste
On 14 June 2011 07:12, idris idris.r...@gmail.com wrote:
I have a dataframe df with columns x, y, and height. I want
A, B, C should have the same number of rows.
mlist = replicate(3, matrix(rnorm(6), 2), simplify=FALSE)
names(mlist) = LETTERS[seq_along(mlist)]
with(mlist, cbind(A,B,C))
or,
do.call(cbind, mlist)
HTH,
baptiste
On 5 June 2011 11:14, Jim Silverton jim.silver...@gmail.com wrote:
How can I
I propose a Pi Haiku (PIQ),
Pi is of certain value,
In statistics, invaluable, yet
Transcending numerics.
Best,
baptiste
On 1 June 2011 11:55, Ravi Varadhan rvarad...@jhmi.edu wrote:
Nice to know that the `pi' can be sliced in so many different ways!
There are exactly 3.154 x e08 seconds in
Hi,
There are probably much better ways, but try this
transform(dat, group = as.numeric(factor(paste(A,B,C, sep=
HTH,
baptiste
On 31 May 2011 09:47, Mendolia, Franco fmendo...@mcw.edu wrote:
Hello,
I would like to create a group variable that is based on the values of three
I imagine mind_read() easy to implement with Robin Hankin's emulator
package -- under some weak assumptions about the user; mind_write(),
however, seems more involved and might require investing in new
hardware.
Best,
baptiste
On 21 May 2011 12:04, Rolf Turner rolf.tur...@xtra.co.nz wrote:
On
Hi,
On 8 May 2011 21:18, Berwin A Turlach berwin.turl...@gmail.com wrote:
G'day Dan,
On Sun, 8 May 2011 05:06:27 -0400
Dan Abner dan.abne...@gmail.com wrote:
Hello everyone,
I am attempting to use the %in% operator with the ! to produce a NOT
IN type of operation. Why does this not work?
Hi,
Try this,
cat(format(The TITLE, width=80, justify=centre))
HTH,
baptiste
On 5 May 2011 19:28, Dan Abner dan.abne...@gmail.com wrote:
Hello everyone,
I have a few questions about the print() fn:
1) I have the following code that does not center the character string:
print(The
Hi,
The package maintainer is aware of this feature request. In the
meantime, I've used Currying,
require(cubature)
f - function(x, a) cos(2*pi*x*a) # a simple test function
adaptIntegrate(roxygen::Curry(f, a=0.2), lower=0, upper=2)
HTH,
baptiste
On 4 May 2011 05:57, Ravi Varadhan
Unfortunately, it seems that vcd doesn't return grobs but draws
directly to the device, which prevents a concise solution. You could
try the following,
library(gridExtra)
library(vcd)
data(Titanic)
p = grid.grabExpr(mosaic(Titanic))
grid.arrange(p, p, p, ncol=2)
Or, more versatile but also more
)), ncol=2, byrow=T)
grid.table(d, parse=T,theme=theme.list(
gpar.corefill=gpar(fill=NA, col=NA),
core.just=left, padding.h = unit(0, mm) ))
HTH,
baptiste
On 2011-04-20, at 01:33 , baptiste auguie wrote:
Hi,
You may want to wait advice from someone who
On 20 April 2011 21:16, Marius Hofert m_hof...@web.de wrote:
Dear expeRts,
is there a way to get the entries in each panel correctly aligned according
to the
equality signs?
Here is the wish-list:
(1) the equality signs in each panel should be vertically aligned
You can put the equal
)))
arr[i,j,] - c(alpha, eq, numbers[1],
italic(bbb), eq, numbers[2],
gamma, eq, numbers[3])
}
}
## plot
splom2(x, arr, nr=3)
On 2011-04-20, at 11:56 , baptiste auguie wrote:
On 20 April 2011 21:16, Marius Hofert m_hof...@web.de wrote
])
}
}
## plot
splom2(x, arr, nr=3)
On 2011-04-20, at 22:38 , baptiste auguie wrote:
Try this,
align.digits = function(l)
{
sp - strsplit(as.character(l), \\.)
chars - sapply(sp, function(x) nchar(x)[1])
n = max(chars) - chars
l0 = sapply(n, function(x) paste(rep(0, x), collapse=))
labels
=gpar(fill=NA, col=NA), # make bg transparent
core.just=left) # justification of labels
)
}
xyplot(1~1, panel=function(...) info(0.1, 0.5) )
On 2011-04-19, at 21:39 , David Winsemius wrote:
On Apr 19, 2011, at 3:26 PM, baptiste auguie wrote:
I'm hoping
Hi,
You may want to wait advice from someone who actually understands (the
labyrinth that is) lattice's help for splom, but the following might
be a start. I didn't understand what values you actually wanted
displayed in the lower triangle panels, so I made up some random ones
in a 3x3 matrix of
Hi,
Does this help?
library(gridExtra)
my.title = function(expressions) {
grid.table(expressions, parse=TRUE,
theme=theme.list(gpar.corefill = gpar(fill = NA, col = NA),
core.just = left))
}
e = expression(alpha,text, italic(italic),
hat(beta),
you'll need a more
recent version of gridExtra than the one on CRAN. You can get it here:
http://code.google.com/p/gridextra/
baptiste
Cheers,
Marius
On 2011-04-19, at 24:03 , baptiste auguie wrote:
Hi,
Does this help?
library(gridExtra)
my.title = function(expressions) {
grid.table
Hi,
Try this,
snip = function(x, n=1) {
rand = sample(1:3, 1)
print(paste(using algorithm #, rand))
switch(rand,
'1' = head(x, length(x) - n),
'2' = x[ seq(1, length(x) - n) ],
'3' = x[ - seq(length(x), by=-1, length=n) ])
}
snip(1:5)
HTH, but please
Hi,
Through pgfSweave you can use the tikz device, which is the one that
can interpret Latex code (package tikzDevice). I would start with a
minimal self-contained plot with this function. see ?tikz for
examples.
HTH,
baptiste
On 15 April 2011 20:03, Michael McAssey mpmcas...@gmail.com
Dear list,
I wish to modify programmatically only a few factor levels, according
to a named list. I came up with this function,
modify.levels - function(f, modify=list()){
## levels that will not be changed
names.old.levels - setdiff(levels(f), unlist(modify))
## as a named list
Hi,
I may be wrong, but I have the impression that tikz (a LaTeX drawing
package) can handle spot colors (that's what Google seemed to tell me
[*]). If this is the case you could output R graphics using the
tikzDevice package, post-process the output (readable, plain text
file), and eventually
Hi,
Have you tried ?c.trellis in the latticeExtra package?
HTH,
baptiste
On 13 April 2011 23:36, Francesco Nutini nutini.france...@gmail.com wrote:
Dear R-users,
I have to plot two xyplot, and I wish to enclose this two graphs with just
one headline, the same x scale, the same grid etc.
On 14 April 2011 07:51, Hadley Wickham had...@rice.edu wrote:
Am I missing something obvious on how to draw multi-line plots in base
graphics?
In ggplot2, I can do:
It appears you've been infected with what I like to call the Dijkstra
syndrome [*], quoting
The tools we use have a profound
Hi,
You probably need ?get, though you might want to read this first,
library(fortunes)
fortune(236)
HtH,
baptiste
On 13 April 2011 13:04, Sparks, John James jspa...@uic.edu wrote:
Dear R Helpers,
I am trying to change the name of an object using the assign function.
When I use paste on
Hi,
ggplot2 automatically adjusts its axes when new data are added to
plots; however you wouldn't get an automatic legend if you constructed
plots that way.
HTH,
baptiste
On 13 April 2011 17:06, James Annan jdan...@jamstec.go.jp wrote:
Thanks for all the replies. Yes, I agree that calculating
Hi,
You could try,
library(plyr)
ddply(data, .(name), transform, mean=mean(sale))
ddply(data, .(name), summarize, mean=mean(sale))
HTH,
baptiste
On 12 April 2011 15:46, Geoffrey Smith g...@asu.edu wrote:
Hello, I would like to take the mean of a column from a data frame and then
bind the
1 - 100 of 724 matches
Mail list logo