Displaying 20 results from an estimated 9000 matches similar to: "Getting file name from pdf device?"
2006 Oct 25
3
simplification of code using stamp?
Hi
I have the following code which I would like to simplify. Id does linear
regressions and returns the r-squares, and the coefficients.
It runs slow, as it is doing the regressions for each - is it possible
to get the values in a dataframe which looks as follow:
expert | xx | seeds | r.squared | slope | intercept
Thanks in advance,
Rainer
library(reshape)
rsqs <- as.data.frame(
2007 Aug 16
6
several plots on several pages
Hi
> version
_
platform i686-pc-linux-gnu
arch i686
os linux-gnu
system i686, linux-gnu
status
major 2
minor 5.1
year 2007
month 06
day 27
svn rev 42083
language R
version.string R version 2.5.1 (2007-06-27)
I want to create a pdf withe three graphs on a page and with two pages:
2007 May 22
5
Reducing the size of pdf graphics files produced with R
Hi,
Without trying to print 1000000 points (see <http://
finzi.psych.upenn.edu/R/Rhelp02a/archive/42105.html>), I often print
maps for which I do not want to loose too much of coastline detail,
and/or plots with 1000-5000 points (yes, some are on top of each
other, but using transparency (i.e. rgb colors with alpha
information) this actually comes through as useful information.
2017 Nov 29
5
Preventing repeated package installation, or pre installing packages
I have a R script that I call from python using rpy2. It uses dplyr, doBy,
and ggplot2. The script has install.packages commands for these 3 packages.
Even thought the packages are already installed it still downloads,
builds, and installs them, which is very time consuming. Is there a way to
have it only do the install if the package is not already installed?
Also, I run in a docker container,
2009 Sep 30
2
Compress (gzip) a pdf device
I have not found an easy way to compress a file on filesystem.
Especially I'd like to compress a pdf from pdf() function/device. Is it possible to compress It on the flight?
I'd like to do something like:
pdf(gzipconnection())
dev.off()
If It is not possible, how can I create a gzip with the pdf?
Thanks
Daniele A.
________________________________
ORS Srl
Via Agostino Morando 1/3
2011 Jul 26
1
Comparing two pdf resulting from density() and identify where significantly smaller or larger?
Hi
this might be a little bit off topic, but here it goes: lets assume I have
the following:
set.seed(13)
dat1 <- rnorm(2000, mean=10, sd=10)
dat2 <- rnorm(100, mean=10, sd=20)
d.all <- density(dat, n=1024)
d.co <- density(x[[v]], , from=min(d.all$x), to=max(d.all$x),
n=1024)
d.diff <- list(
x = d.all$x,
2012 Jun 22
1
Creating interactive 3D graphs for embedding in pdf not possible in R?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
Just to be sure: I couldn't find a way of creating an interactive 3d graph which can be embedded
in a pdf - is it correct that this can not be done with R?
Cheers,
Rainer
- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
(Germany)
Centre of Excellence for Invasion Biology
Stellenbosch
2011 Apr 05
2
Euclidean Distance in R
Hi
1. I have two raster files *.asc (identical size)
2. The data in each contain presence or absence data in each cell
represented by a 1 or 0 respectively
3. I would like to take the location of each 1 (presence cell) in
raster file 1 and measure the euclidean distance to the nearest 1
(presence cell) in raster file 2.
Obviously in some cases there will be overlap so the distance will be zero.
2018 Feb 19
2
Include pre-existing PDF files as vignettes in an R package?
> On 19 Feb 2018, at 12:25, Duncan Murdoch <murdoch.duncan at gmail.com <mailto:murdoch.duncan at gmail.com>> wrote:
>
> On 19/02/2018 5:47 AM, Michael Hannon wrote:
>> Thanks, Duncan. The files in question are Emacs Org-mode files, and I
>> think these are more or less isomorphic to Rmd files, but I haven't
>> used Org-mode in a long time, so I think
2010 Jan 21
1
superimpose histogram and fitted gamma pdf
Hi r-users,
I try to draw histogram (in terms of probabilty) and superimpose with the gamma pdf. Using this code below I can get the plots BUT the y scale for the density is out of scale. How do I change the y-axis scale to max 1? Another thing, how I do draw smooth line rather that points?
Nota that my observed data is hume_pos and the fitted data is rgam1.
hist(hume_pos,prob=TRUE)
2008 Jan 26
2
using facet_grid() from ggplot2 with additional text in labels
Hi
I am using ggplot2 at the moment and I must say it is definitely better
then ggplot - good work.
My problem is that I am using facet_grid() in the following way:
> p <- ggplot(ssq, aes(x=year, y=-log(ssq)))
> p + geom_point() + facet_grid(me*gi~cs*rz)
and it works nicely, except that I would like to have, in naddition to
the values of me, gi, cs and rz the name of the variable.
2007 Oct 01
4
Concatenating one character vector into one string
Hi
I am sure this is simple - but how can I convert one charecter vector
into one string?
example:
x <- c("This ", "is ", "one ", "sentence.")
should become
"This is one entence"
Thanks
Rainer
--
NEW EMAIL ADDRESS AND ADDRESS:
Rainer.Krug at uct.ac.za
RKrug at sun.ac.za WILL BE DISCONTINUED END OF MARCH
Rainer M. Krug, Dipl. Phys.
2018 Feb 19
0
Include pre-existing PDF files as vignettes in an R package?
Yes, 'C-c C-e l l' I think, but follow the pop-up, and everything should be
ok.
On Feb 19, 2018 07:05, "Rainer Krug" <rainer_krug at icloud.com> wrote:
>
>
> > On 19 Feb 2018, at 12:25, Duncan Murdoch <murdoch.duncan at gmail.com
> <mailto:murdoch.duncan at gmail.com>> wrote:
> >
> > On 19/02/2018 5:47 AM, Michael Hannon wrote:
>
2007 Sep 20
2
referencing packages?
Hi
I know how to referenc R in a scientific paper - but is there a
standardised way to reference packages?
Thanks
Rainer
--
NEW EMAIL ADDRESS AND ADDRESS:
Rainer.Krug at uct.ac.za
RKrug at sun.ac.za WILL BE DISCONTINUED END OF MARCH
Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)
Plant Conservation Unit
Department of Botany
University of Cape Town
Rondebosch 7701
2009 Jun 04
4
order() with randomised order in ties?
Hi
I want to use order() to get the order of a vector.
But I would need a different behavior when ties occur: similar to the
parameter ties.method = "random" in the rank() function, I would need
to randomise the ties. Is this possible?
Example:
x <- rep(1:10, 2)
order(x)
[1] 1 11 2 12 3 13 4 14 5 15 6 16 7 17 8 18 9 19 10 20
order(x)
[1] 1 11 2 12 3 13 4 14 5 15
2011 Jul 29
5
R in Linux (Ubuntu)
Hi,
I?m trying to move to ubuntu at all, but I don?t like R in Ubuntu because it
runs in the terminal, so i can?t access directly to some options R gots in
Windows.
Is there any R can i install in ubuntu which runs in hos own prompt or
terminal??
Thanks
-----
Mario Garrido Escudero
PhD student
Dpto. de Biolog?a Animal, Ecolog?a, Parasitolog?a, Edafolog?a y Qca. Agr?cola
Universidad de Salamanca
2006 Sep 06
4
problem with putting objects in list
Hi
I use the following code and it stores the results of density() in the
list dr:
dens <- function(run) { density( positions$X[positions$run==run], bw=3,
cut=-2 ) }
dr <- lapply(1:5, dens)
but the results are stored in dr[[i]] and not dr[i], i.e. plot(dr[[1]])
works, but plot([1]) doesn't.
Is there any way that I can store them in dr[i]?
Thanks a lot,
Rainer
--
Rainer M. Krug,
2009 Jul 29
8
Adding picture to graph?
Hi
while teaching R, the question came up if it would be possible to add
a picture (saved on the HDD) to a graph (generated by plot()), which
we could not answer.
It might easily kill a clean graph, but: is there a way of doing this,
even one should not do it?
On a similar line of thought: is it possibe to define own symbols so
that they can be used in the plot function with pch=?
Rainer
2009 Jun 05
2
Problem with generic methods
Hi
I want to create a new generic method, but I end up with an error
(evaluation nested too deeply). see the transcript below.
The function beginYear.Fun() works, but not beginYear.
I have no idea why.
Any ideas welcome,
Rainer
> setClass("fun", representation(x = "numeric"))
[1] "fun"
> new("fun")
An object of class ?fun?
Slot "x":
2012 Aug 22
3
Question concerning anova()
Hi
I am comparing four different linear mixed effect models, derived from updating the original one. To
compare these, I want to use anova(). I therefore do the following (not reproducible - just to
illustration purpose!):
dat <- loadSPECIES(SPECIES)
subs <- expression(dead==FALSE & recTreat==FALSE)
feff <- noBefore~pHarv*year # fixed effect in the model
reff <-