Displaying 20 results from an estimated 30000 matches similar to: "Adding text comments to graphics device output files?"
2015 Aug 14
3
capture.output() duplicates last line unless newline (R-devel bug)
In R-devel (2015-08-12 r69024), capture.output() incorrectly
duplicates the last line unless it ends with a newline. I don't see
this in R 3.2.2 RC (2015-08-13 r69049). It seems to have started
fairily recently; I spotted this yesterday after starting to get
errors in my R.utils check that use capture.output(), cf.
2014 Jan 03
2
class() on substitute(...) output?
Does it make sense to talk about the class of the output of
substitute(...)? I'm puzzled by the following outputs:
ee <- list(
A = substitute( a <- 1 ),
B = substitute({ a <- 1 }),
C = substitute(( a <- 1 )),
D = substitute( a == 1 )
)
> t(sapply(ee, FUN=function(e) { c(typeof=typeof(e), mode=mode(e), class=class(e)) }))
typeof mode class
A
2015 Feb 01
2
Output to "raw console" rather than stdout/stderr?
In R, there's readline(), which is great because you can prompt the user, e.g.
ans <- readline("Would you like to install Pandoc? [y/N]: ")
without having to worry the message is intercepted by
capture.output(), sink() or similar (which is used by dynamic report
generators among other things). The message will always reach the
user. (You can use sink(...,
2011 Nov 07
3
CRAN: How to list a non-Sweave doc under "Vignettes:" on package page?
Hi,
is it possible to have non-Sweave vignettes(*) in inst/doc/ be listed
under 'Downloads' on CRAN package pages? For instance, in my R.rsp
package I have a inst/doc/report.pdf (part of the source *.tar.gz)
that is not detected/listed. The PDF is not based on a Sweave
vignette but an *.tex.rsp vignette that is dynamically created via
inst/doc/Makefile. It is listed
(*) BTW, can the
2015 May 09
2
R Language Definition: Subsetting matrices with negative indices is *not* an error
On Sat, May 9, 2015 at 12:55 AM, peter dalgaard <pdalgd at gmail.com> wrote:
>
>> On 09 May 2015, at 02:53 , Henrik Bengtsson <henrik.bengtsson at ucsf.edu> wrote:
>>
>> Hi,
>>
>> I spotted what looks like another(*) mistake in 'R Language
>> Definition' on how subsetting should work. In Section 'Indexing
>> matrices and
2013 Sep 24
1
recordPlot() on non-interactive graphics device?
Hi.
Q. Is there a way to record a plot using grDevices::recordPlot()
without opening an interactive (=visible GUI window) graphics device
(not even for a flash of a second)?
Related: help("recordPlot", package="grDevices") says:
"These functions record and replay the displaylist of the current
graphics device."
Is the intention that recordPlot() should be able to
2014 Nov 23
2
R string comparisons may vary with platform (plain text)
On Sat, Nov 22, 2014 at 12:42 PM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:
> On 22/11/2014, 2:59 PM, Stuart Ambler wrote:
>> A colleague?s R program behaved differently when I ran it, and we thought
>> we traced it probably to different results from string comparisons as
>> below, with different R versions. However the platforms also differed. A
>>
2015 Aug 15
1
Why not pthreads on Windows in 'parallel' package?
Aaaah ...
and argh - I should have better not to post R question at midnight,
especially when I know it forks the process and it's not using threads.
Brain meltdown. (So, we'll proceed trying to use pthreads in matrixStats
also for Windows). Sorry for the noise and thanks Kasper.
Henrik
On Aug 15, 2015 02:52, "Kasper Daniel Hansen" <kasperdanielhansen at gmail.com>
wrote:
2013 Apr 05
1
parallel: Race-condition concern regarding graphics devices in a multi-thread environment
Hi,
I'm trying to figure out how to safely make sure that I close the same
graphics device that I opened earlier in a thread (and not one opened
by a parallel thread). In a *single-thread* environment, one can do
the following to open and close a device:
makePlot <- function(i) {
filename <- sprintf("foo%d.png", i);
png(filename);
idx <- dev.cur();
2007 Jul 02
4
Combine graphical and textual output
Hi,
I would like to know whether anybody knows a simple way to combine
textual and graphical output in R.
A typical analysis produces textual output (e.g. model fits) and plots
in R. I would like to know whether R has the possibility of combining
these into a single 'report' or output. An example of a program that
does this is SPSS. After running the analysis you have a combination
2018 Sep 03
2
True length - length(unclass(x)) - without having to call unclass()?
Please don't do this to get the underlying vector length (or to achieve
anything else). Setting/deleting attributes of an R object without
checking the reference count violates R semantics, which in turn can
have unpredictable results on R programs (essentially undebuggable
segfaults now or more likely later when new optimizations or features
are added to the language). Setting attributes
2015 Aug 14
2
Why not pthreads on Windows in 'parallel' package?
On Windows there are a few 'pthreads' implementation, e.g.
pthreads-w32 and winpthreads
[https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Using-pthreads].
We're thinking of giving them a try for the matrixStats package, and
basic tests indicates it works, but since Windows pthreads are not
used by core R (or?) I've got a little bit worried that we will face
overwhelming
2014 Nov 23
2
R string comparisons may vary with platform (plain text)
On 23/11/2014 09:39, peter dalgaard wrote:
>
>> On 23 Nov 2014, at 01:05 , Henrik Bengtsson <hb at biostat.ucsf.edu> wrote:
>>
>> On Sat, Nov 22, 2014 at 12:42 PM, Duncan Murdoch
>> <murdoch.duncan at gmail.com> wrote:
>>> On 22/11/2014, 2:59 PM, Stuart Ambler wrote:
>>>> A colleague?s R program behaved differently when I ran it, and we
2015 May 09
1
PATCH: library(..., quietly=TRUE) still outputs "Loading required package: ..." (forgot to pass down 'quietly')
Calling library(..., quietly=TRUE) may still output:
Loading required package: <other pkg>
in some cases, e.g.
> library("R.utils", quietly=TRUE)
Loading required package: R.methodsS3
[...]
I traced this to base:::.getRequiredPackages2(), which forgets to pass
'quietly' to an internal library() call:
if (!attached) {
if (!quietly)
2015 May 09
2
R Language Definition: Subsetting matrices with negative indices is *not* an error
Hi,
I spotted what looks like another(*) mistake in 'R Language
Definition' on how subsetting should work. In Section 'Indexing
matrices and arrays'
[http://cran.r-project.org/doc/manuals/r-release/R-lang.html#Indexing-matrices-and-arrays]
one can read
"Negative indices are not allowed in indexing matrices."
but this is not true, e.g.
> x <- matrix(1:12,
2015 Sep 20
2
Long vectors: Missing values and R_xlen_t?
Is there a missing value constant defined for R_xlen_t, cf. NA_INTEGER
(== R_NaInt == INT_MIN) for int(eger)? If not, is it correct to
assume that missing values should be taken care/tested for before
coercing from int or double?
Thank you,
Henrik
2015 May 04
4
Shouldn't vector indexing with negative out-of-range index give an error?
In Section 'Indexing by vectors' of 'R Language Definition'
(http://cran.r-project.org/doc/manuals/r-release/R-lang.html#Indexing-by-vectors)
it says:
"Integer. All elements of i must have the same sign. If they are
positive, the elements of x with those index numbers are selected. If
i contains negative elements, all elements except those indicated are
selected.
If i is
2012 Feb 23
1
R devel [and R 2.14.1 patched]: R CMD build now sources ~/.Rprofile
I'd like to follow up on this one. It may be that I have
misunderstood something, but on both R devel (2012-02-22 r58452) and R
2.14.1 patched (2012-02-18 r58394) I can't seem to avoid loading
~/.Rprofile when I run 'R CMD <cmd>', e.g. R CMD build. For me, the
loading of ~/.Rprofile by 'R CMD' started a few weeks ago, and I
haven't seen it before. More details
2013 Oct 08
1
"Failed to locate the 'texi2pdf' output file"
Just thought I would mention that the issue below (and in https://stat.ethz.ch/pipermail/r-devel/2013-April/066318.html) is still not resolved.
It hasn't been a big problem, but it potentially could be, if a critical package were to have this error on release day, then all its dependencies would fail to build, which would probably require us to postpone our release.
See the complete thread
2013 Aug 30
2
"False" warning on "replacing previous import" when re-exporting identical object
Hi,
SETUP:
Consider three packages PkgA, PkgB and PkgC.
PkgA defines a generic function foo() and exports it;
export(foo)
PkgB imports PkgA::foo() and re-exports it;
importFrom(PkgA, foo)
export(foo)
PkgC imports everything from PkgA and PkgB:
imports(PkgA, PkgB)
PROBLEM:
Loading or attaching the namespace of PkgC will generate a warning:
replacing previous import by