as you are using MacOS X, you'll have ghostscript installed anyway. so
try in R `dev2bitmap' with `type =pdfwrite'. I believe `gs' _does_
include compression. a quick test showed at least a reduction by about
a factor of 2 relative to `pdf()'. probably one can fiddle with the
ghostscript
---
-Original Message-
From: Joerg van den Hoff [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 23, 2007 9:25 AM
To: Waichler, Scott R
Cc: r-help@stat.math.ethz.ch; [EMAIL PROTECTED]
Subject: Re: [R] Reducing the size of pdf graphics files
produced with R
On Wed, May
I use some computers that run older versions of Redhat Linux such as
EL3. RPMs for the current version of R are no longer provided via CRAN
for these older operating system versions. How can I compile my own RPM
for the current version of R, which I could then use to install R
quickly and easily
I use some computers that run older versions of Redhat Linux such as
EL3. RPMs for the current version of R are no longer provided via
CRAN for these older operating system versions. How can I compile
my
own RPM for the current version of R, which I could then use to
install R
How can I get the value of the aspect ratio that is used in a lattice
plot? In a levelplot for instance, the native units per cm of my x and
y axes are different, and I need to know the aspect ratio so that I can
correctly plot vectors. I know how to set the aspect in a high-level
lattice
How can I get the value of the aspect ratio that is used in
a lattice
plot? In a levelplot for instance, the native units per cm of my x
and y axes are different, and I need to know the aspect
ratio so that
I can correctly plot vectors. I know how to set the aspect in a
my.panel.levelplot -
function (x, y, z, subscripts, at = pretty(z),
col.regions = regions$col, ...,
w, h)
{
regions - trellis.par.get(regions)
numcol - length(at) - 1
numcol.r - length(col.regions)
col.regions - if (numcol.r = numcol)
I am using levelplot() from lattice with grids that have unequal cell
sizes. This means that the boundary between two cells is not always
half-way between nodes, as levelplot() assumes. The result is that some
cell sizes are rendered incorrectly, which can be painfully obvious if
using
Hadley and Deepayan,
Thank you for responding. Here is a simple example of what I'm talking
about. It is a grid that is 5 cells wide by 2 cells tall. The width of
the cells in the x-direction is variable; the cells at either end have
width = 4 units, and the three cells in the middle have
You are right, panel.levelplot is indeed assuming that the
boundaries are between consecutive midpoints. There is no
built in way around that; there simply isn't enough
information available to the panel function.
The cleanest solution, in principle, is to write your own
panel function
Hi,
I often use the mod() and instring() functions that are available in the
clim.pact package. This package has a lot of dependencies, including
installation of netCDF, and I haven't yet been able to get
library(clim.pact) to work on a Mac OS 10.4.6. A previous request for
help with the Mac
I am trying to use the ncdf package on a Mac OS X machine (10.4.6), but
I get the following error message:
library(ncdf)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
'/Library/Frameworks/R.framework/Resources/library/ncdf/libs/ppc/ncdf.so
':
Hello,
After getting help to solve part of my problem and some delay on my
part, I am posting a more refined version to see if someone can help me
further. I am trying to autocalibrate a model in my subject area using
the snow and rgenoud packages. I want to use the key function fn that
is
I have been using the sp package to deal with gridded data. I would
like to know how to extract the vertices (x,y) of polygons that outline
areas of like-valued cells in a grid. Here is a simple 3x3 grid:
2 2 1
1 2 1
1 1 3
x - c(1,1,1,2,2,2,3,3,3) # define a 3 x 3 array of points
y -
Hello,
I am trying to do model autocalibration using the snow and rgenoud
packages. The function I want to run in task-parallel fashion across
multiple machines is one that pre- and post-processes data and runs an
external model code. My problem is that external file I/O is happening
only in
Hi,
I am trying to install packages in R-2.2.1 on a Redhat WS4 system. I
get the following error messages trying to install, for example, the
akima package:
R.version.string
[1] R version 2.2.1, 2005-12-20
install.packages(akima, lib=/usr/lib/R/library, repos =
http://cran.fhcrc.org/;)
.
.
.
The only way I can see this happening is if you installed a
ix86 RPM on a
x86_86 system. You can do that and R will run, but you will
not be able to build packages out of the box.
This is exactly what happened. Now I know to use 'uname -a' to check
machine architecture first. I was able
I am trying to use the optimizing function genoud() with the snow
package on a couple of i686 machines running Redhat Linux WS4 . I don't
know anything about PVM or MPI, so I just followed the directions in
snow and rgenoud for the simplest method and started a socket cluster.
My function fn for
R-2.2.1 is still not available for Redhat Linux as an RPM on CRAN. It
is available as an SRPM. Can someone fill me in on why it takes so long
to make RPMs available? I would be happy to help make the RPMs for el4
and el3 if such help is needed.
Regards,
Scott Waichler
Pacific Northwest
...More the point, though, which CRAN mirror were you looking at? R
2.2.1 was in all the EL3/4 and FC3/4 i386 and x86_64 directories I
could be
bothered to look at on the UK Bristol mirror for example.
I use this mirror:
http://cran.fhcrc.org/ Fred Hutchinson Cancer Research Center, Seattle,
I can't find a way to change just the panel background color in lattice.
I would like NA regions in levelplot() to appear black. I've tried the
trellis.par.set() stuff, but it it makes the background of the whole
graphic black.
Thanks,
Scott Waichler
Pacific Northwest National Laboratory
Hi,
I'm looking for ideas or packages with relevant algorithms for
calculating the connectivity across a grid, where connectivity is
defined as the minimum amount of cross-sectional area along a continuous
path. The upper boundary of the cross-sectional area is a fixed
elevation, and the lower
Is there a way to get the aspect ratio as output from a plot() call or
something similar in the base graphics system? I would like to note
vertical exaggeration on an elevation profile.
Thanks,
Scott Waichler
Pacific Northwest National Laboratory
[EMAIL PROTECTED]
Sundar,
Perhaps this will work for you?
plot(1:10)
w - par(pin)[1]/diff(par(usr)[1:2])
h - par(pin)[2]/diff(par(usr)[3:4])
asp - w/h
Thank you for your help. For vertical exaggeration I will make a slight
change to make it more intuitive (for me):
w - diff(par(usr)[1:2]) / par(pin)[1]
(My apologies if this is a repeated posting. I couldn't find any trace
of my previous attempt in the archive.)
I'm having trouble with forecast() in the dse2 package. It works fine
for me on a model without a trend, but gives me NaN output for the
forecast values when using a model with a
I can't get the scales parameter in xyplot of lattice to work as I
expected. I'm using R-2.1.0 and lattice 0.11-8. There should be year
labels from 1992 to 2004 for the x axis in the plot below, but instead
only a few of them appear, and in the wrong spots, as if the coordinate
system has
I can't get the scales parameter in xyplot of lattice to work as I
expected. I'm using R-2.1.0 and lattice 0.11-8. There should be
year
labels from 1992 to 2004 for the x axis in the plot below, but
instead
only a few of them appear, and in the wrong spots, as if the
coordinate
Sander,
has anybody made an attempt to create the soil texture triangle graph
in R?
See ternaryplot() in package vcd. Its options are quite limited, but it
may help. I think you'll need to write your own function to do a
ternary plot like the one you point to, perhaps using functions in the
I have a time series vector (not necessarily ts class) that has NAs
in it.
How can I omit the NAs when using aggregate.ts() to compute a
function
on each window? If there is at least one non-NA value in each
window,
I'd like to proceed with evaluating the function; otherwise, I would
I have a time series vector (not necessarily ts class) that has NAs in
it.
How can I omit the NAs when using aggregate.ts() to compute a function
on each window? If there is at least one non-NA value in each window,
I'd like to proceed with evaluating the function; otherwise, I would
like NA
I'm trying to understand how to use kpss.test() properly. If I have a
level stationary series like rnorm() in the help page, shouldn't I get a
small p-value with the null hypothesis set to Trend? The (condensed)
output from kpss.test() for the two possible null hypotheses is given
below. I
I'm running R-2.1.0 on a Linux box and found that the HTML search engine
help would not work with Firefox 1.0.3 but would work with Mozilla
1.7.7. I have Java Runtime Environment 1.5.0_02 installed. With
Firefox, when I launch help.start() and click to the search engine, it
brings up the first
My newly installed R-2.1.0 apparently doesn't like forward slashes in
filenames:
R.version.string
[1] R version 2.1.0, 2005-04-18
plotfile - \home\mean_monthly_stl.eps
postscript(plotfile)
plotfile - /home/mean_monthly_stl.eps
postscript(plotfile)
*** glibc detected *** double free or
My newly installed R-2.1.0 apparently doesn't like forward
slashes in
filenames:
R.version.string
[1] R version 2.1.0, 2005-04-18
plotfile - \home\mean_monthly_stl.eps
postscript(plotfile)
plotfile - /home/mean_monthly_stl.eps
postscript(plotfile)
*** glibc detected ***
I'm running R-2.1.0 on a Linux box and found that the HTML search
engine help would not work with Firefox 1.0.3 but would work with
Mozilla 1.7.7. I have Java Runtime Environment 1.5.0_02
installed.
With Firefox, when I launch help.start() and click to the search
engine, it
I believe the problem is related to the change in the
installation directory for the updated JVM from Sun.
If you use the jre1.5.0_02 from java.sun.com, then the plugin
is installed in:
/usr/java/jre1.5.0_02/plugin/i386/ns7/libjavaplugin_oji.so
Ok, the above pathname is the exact one.
I installed R-2.1.0 from source on a Linux box running Red Hat
Enterprise Linux WS release 4 but install.packages() wouldn't work (see
below). When I install R-2.0.1 from RPM on the same system, everything
is fine.
Version 2.1.0 (2005-04-18), ISBN 3-900051-07-0
. . .
options(CRAN =
I'd like to have an Emacs keystroke that would let me toggle between T
and F when editing logical settings in R code. I looked in the ESS
documentation and in my O'Reilly emacs books but found nothing. Any
ideas?
Scott Waichler
Pacific Northwest National Laboratory
[EMAIL PROTECTED]
I would like to limit the significant figures of the calibrated
parameters determined by genoud() in the Rgenoud package. Below is some
example output, where column 1 is model run number, columns 2-7 are the
parameter values, and columns 8-12 are model fit statistics. I would
like genoud to
I searched CRAN for material on gant (or Gantt) charts, those schedule
plots that look like horizontal barplots where the x-axis is time.
Finding none, I wrote the following and am submitting it to the archive
so that it may help someone in the future.
plotfile - gant.eps
regular.color -
I would like to have complete control over which plots and which
axes have labels in a lattice figure. I tried lots of vectors for the
alternating setting in scales, but none worked. Here is what I
would like to do for a 2 col x 3 row figure, where the x designates
a location I would like to
When I generate levelplot figures with Postscript, the lines from
the underlying grid (i.e., the x and y in z ~ x* y)
show up as faint white lines in the output. If I have a dense grid,
the lines wash out the contour colors. I can avoid the problem if
I use png instead, but that brings up other
One typical problem with gv is that some artifacts show up (which may
not be what you describe) when the display is anti-aliased. Try
turning that off (by pressing 'a') and see if that improves the
display.
If you produce PDF, it's possible to just turn off antialiasing for
line art,
Gabor wrote:
Assuming that the problem is that your input file has
additional embedded characters added by the data base
program you could try extracting just the text using
the UNIX strings program:
strings myfile.csv myfile.txt
Spencer wrote:
strsplit can break character strings into
I would like to plot horizontal box-and-whisker plots in lattice
where
each factor has its own panel and scales are free. Below is a
stripplot version of what I have in mind. Substituting bwplot
doesn't work.
This won't work (easily) with R = 1.9.1. Try with 2.0.0 beta, and let
us know
I can't find a way to control the distance between tick marks and tick
labels
in lattice. In a stripplot I'm making these components are too close.
I don't
see anything like base graphics mgp in the scales list.
Thanks for your help,
Scott Waichler
Pacific Northwest National Laboratory
I get faulty output from seq.dates() if I specify a length that is too
long.
For example, I ask for 129 months in the following call to the function,
but it returns
131:
R.version.string
[1] R version 1.9.1, 2004-06-21
startdatetime - chron(dates=01/01/1995, times=00:00:00)
I get faulty output from seq.dates() if I specify a length that is too
long.
For example, I ask for 129 months in the following call to the function,
but it returns
131:
R.version.string
[1] R version 1.9.1, 2004-06-21
startdatetime - chron(dates=01/01/1995, times=00:00:00)
I would like to make a ranking operation more efficient if possible.
The goal is to rank a set of points representing objective
function values such that points which are dominated by no
others have rank 1, those which are dominated by one other point
have rank 2, etc. In the example with two
Thanks to all of you who responded to my help request.
Here is the very efficient upshot of your advice:
mat2 - apply(mat, 1, paste, collapse=:)
vec - match(mat2, unique(mat2))
vec
[1] 1 2 1 1 2 3
P.S. I found that Andy Liaw's method didn't preserve the
index order that I wanted; it yields
Hello,
I would like to fill the rows of a Latex tabular environment with output from
R, as in
\begin{table}
\caption{Table caption.}
\label{tab:events}
\begin{tabular}{c r r r r r}
\hline
echo=false,results=tex=
fill.my.table.rows()
@
\end{tabular}
\end{table}
Sweave produces the
For a long time I've wanted a way to conveniently extract multiple elements
from a list, which [[ doesn't allow. Can anyone suggest an efficient
function to do this? Wouldn't it be a sensible addition to R?
For example,
alist - list()
alist[[1]] - list()
alist[[1]]$name - first
alist[[1]]$vec
]]
[[2]][[2]]$name
[1] two
[[2]][[2]]$vec
[1] 5 6 7 8
-Original Message-
From: Roger D. Peng [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 15, 2004 12:24 PM
To: Waichler, Scott R
Cc: [EMAIL PROTECTED]
Subject: Re: [R] Extracting multiple elements from a list
Sorry
Can anyone tell me how to obtain a custom scale for
the colorkey in each levelplot of a lattice? I am using
lattice and levelplot to plot z = f(x, y) for multiple z
variables. x and y values are the same across plots, but
units for z are different and therefore I need to create
a custom scale
I can't get Emacs to automatically do syntax highlighting of
Sweave files. I have followed Friedrich's suggestion for code
to insert into my .emacs file. The complete section from my .emacs
file is given below. When I load a *.Snw file, font is white until I press
M-x, then the first code and
55 matches
Mail list logo