Displaying 20 results from an estimated 5000 matches similar to: "should system.file(package="no such pkg", "no such file") warn or abort?"
2009 Mar 18
1
sprintf("%d", integer(0)) aborts
In R's sprintf() if any of the arguments has length 0
the function aborts. E.g.,
> sprintf("%d", integer(0))
Error in sprintf("%d", integer(0)) : zero-length argument
> sprintf(character(), integer(0))
Error in sprintf(character(), integer(0)) :
'fmt' is not a non-empty character vector
This comes up in code like
x[nchar(x)==0] <-
2015 Nov 07
0
corrupt PACKAGES.gz?
Bill,
thanks for reporting, this is currently true for all PACKAGES.gz files
my autobuilder is creating, will investigate.
Best,
Uwe
On 06.11.2015 18:54, William Dunlap wrote:
> Is it just me, or did a corrupt PACKAGES.gz file get installed in the
> bin/windows/contrib/3.2 directory of CRAN mirrors recently? gzfile()
> complains about it and Cygwin's gzip cannot decompress it.
2015 Nov 06
2
corrupt PACKAGES.gz?
Is it just me, or did a corrupt PACKAGES.gz file get installed in the
bin/windows/contrib/3.2 directory of CRAN mirrors recently? gzfile()
complains about it and Cygwin's gzip cannot decompress it. I tried the
following
repos <- "https://cran.rstudio.com"
v <- "3.2"
pkgs.gz <- paste(sep="/", repos, "bin/windows/contrib", v,
2017 May 19
1
stopifnot() does not stop at first non-TRUE argument
While you are fiddling with stopifnot(), please consider changing the form
of the error thrown so that it includes the caller's call. The change
would be from something like
stop( <<the message>> )
to
stop(simpleError( <<the message>>, sys.call(-1)))
For the following code
f <- function(x, y) {
stopifnot(x > y)
x - y
}
g <- function(x,
2011 Sep 01
1
rJava Installation Problems: 'cannot open compressed file 'rJava/DESCRIPTION', probable reason 'No such file or directory''
Good Morning,
I'm trying to install the rJava package on a local (work) machine and having
some trouble. The following occurred in an RGui session.
> sessionInfo()
R version 2.13.0 (2011-04-13)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United
States.1252
[3] LC_MONETARY=English_United States.1252
LC_NUMERIC=C
[5]
2013 Dec 05
0
S4 method for '[' with extra arguments: distinguishing between x[i] and x[i, ]
Hi,
I want to implement a '[' for an S4 class, that behaves differently
when called with a single index argument or multiple indexes (possibly
missing), like what happens when subsetting matrices x[i] vs. x[i, ].
I manage to do it using nargs() and checking if drop is missing (see
code below), but when I want to add an extra argument to the method
(before drop), then the parent call
2007 Jan 28
0
"[", .local and S4 methods (was: "[" operator and indexing ambiguity)
Dear Tony,
thanks for the tip with "nargs", when suitably applied, this answers the
problem.
The behaviour of "nargs" in S4 methods has some subtleties compared to
that in normal functions, as shown in the example below. I admit that
this is what had earlier created some confusion about the semantics of
"nargs". From the perspective of "nargs" and its
2018 Feb 17
0
readLines interaction with gsub different in R-dev
I think the problem in R-devel happens when there are non-ASCII characters
in any
of the strings passed to gsub.
txt <- vapply(list(as.raw(c(0x41, 0x6d, 0xc3, 0xa9, 0x6c, 0x69, 0x65)),
as.raw(c(0x41, 0x6d, 0x65, 0x6c, 0x69, 0x61))), rawToChar, "")
txt
#[1] "Am?lie" "Amelia"
Encoding(txt)
#[1] "unknown" "unknown"
gsub(perl=TRUE,
2012 Mar 21
1
enableJIT() and internal R completions (was: [ESS-bugs] ess-mode 12.03; ess hangs emacs)
Hello,
JIT compiler interferes with internal R completions:
compiler::enableJIT(2)
utils:::functionArgs("density", '')
gives:
utils:::functionArgs("density", '')
Note: no visible global function definition for 'bw.nrd0'
Note: no visible global function definition for 'bw.nrd'
Note: no visible global function definition for 'bw.ucv'
2006 Oct 02
0
2.3.1: interacting bugs in load() and gzfile() (PR#9271)
Hello,
If repeated calls are made to save() using the same pre-opened gzfile
connection to a file, and then the connection is closed, the objects
saved by the second and subsequent calls are not correctly restored by
repeated calls to load() with a new gzfile connection to the same file.
What follows are a session exposing the bugs, analysis (see ANALYSIS),
patches (see PATCHES), and a session
2002 Dec 05
1
writing to gzfile: segmentation fault (PR#2347)
Full_Name: Vadim Ogranovich
Version: Version 1.6.0 (2002-10-01)
OS: Red Hat 7.1
Submission from: (NULL) (209.99.241.1)
The following sequence of commands crashes my R session. The first weirdness
happens after the second command that appears not to change the "foo.gz" file,
no error generated.
> con <- gzfile("foo.gz", open="w"); cat("goo\n",
2009 Oct 01
2
Rd.sty question: LaTeX expert needed
The Rd.sty LaTeX package is used when building the R manuals, and by the
LaTeX pages produced from the man pages.
I have tracked down some problems G?bor Cs?rdi was having recently (see
"Re: [R] preformatted and '#' in manual pages" in R-help) to a LaTeX
problem, and am trying to work out how to fix it.
Specifically, the .Rd file he was using had a structure like
\dQuote{
2003 Oct 10
1
number of arguments in .Call function registration
I initially sent this to the biocore mailing list - but it was
suggested that r-devel would also find it interesting.
Many of us use a macro like
#define CALL_DEF(fname, nargs) { #fname, (DL_FUNC)&fname, nargs}
for use in function registration for use with .Call.
For example, using the example from R Extension manual,
if we want to register a C function myCall with three arguments, we
2016 Nov 14
0
Read.dcf with no newline ending: gzfile drops last line
I don't know if this is a bug per se, but an undesired behavior in
read.dcf. read.dcf takes a file argument and passes it to gzfile if
it's a character:
if (is.character(file)) {
file <- gzfile(file)
on.exit(close(file))
}
This gzfile connection is passed to readLines (line #39):
lines <- readLines(file)
If no newline is at the end of the file, readLines
2005 Nov 30
1
\dQuote{} in \code{} not processed
Just wondering if this is the expected behaviour.
I was wanting to produce quoted text within \code{}, without manually
entering the '"'. \dQuote{} seems advisable after reading the Writing R
Extensions manual, so I tried \code{\dQuote{mytext}} expecting it to
produce "mytext" in monospace font (with ' ' round it in the R help
files) but it appears that
2011 Nov 30
1
sma installation error
I tried different versions of sma**.tar.gz file either with "R CMD INSTALL -l packagepath sma**.tar.gz", "R INSTALL -l path sma**.tar.gz" and under R windows by "install.packages("sma_0.5.15.tar.gz",repos=NULL)"
.
I got same error
======
* installing *source* package 'sma' ...
** Creating default NAMESPACE file
Warning in .write_description(db,
2012 Dec 27
0
Suggestion: 'method' slot for expand.grid() (incl. diffs)
Dear expeRts,
The order in which the variables vary in expand.grid() is often unintuitive. I
would like to suggest a 'method' slot for expand.grid() which requires only very
little changes (100% backward compatible) and which allows one to control this
order. Please find attached diffs against R-devel.
Cheers,
Marius
### ./src/library/base/R/expand.grid.R
2002 Jun 18
1
can't find array overruns (was: help debugging segfaults)
Dear R-devel,
Last week I got several responses to my question about debugging segfaults
in my code (original post below). After I changed the S_alloc() calls to
Calloc()/Free(), the symptom was gone, but I was told to keep looking. So I
did:
o Switched to Calloc/Free. Electric Fence did not find any problem.
o Put assert(index < bound); assert(index >=0); everywhere in the C routine
2020 Jun 29
0
A warning in gzcon but not in gzfile
Hi all,
I used `gzfile` and `gzcon` to read a compressed file but I found that
`gzcon` gave me a different result than `gzfile`. It seems like the `gzcon`
does not handle the data correctly. I have posted an example below. In the
example, a portion of a compressed file is downloaded from Google Cloud as
a raw vector, and the data is saved into a temp file. If I use ` gzfile` to
read the file, it
2018 May 06
0
length of `...`
Does anyone notice r-devel thread "stopifnot() does not stop at first non-TRUE argument" starting with https://stat.ethz.ch/pipermail/r-devel/2017-May/074179.html ?
I have mentioned
(function(...)nargs())(...)
in https://stat.ethz.ch/pipermail/r-devel/2017-May/074294.html .
Something like ..elt(n) is switch(n, ...) . I have mentioned it in