Displaying 20 results from an estimated 8000 matches similar to: "Strange warnings when unloading packages with S4 classes"
2013 Oct 29
1
unloadNamespace, getPackageName and "Created a package name xxx " warning
Dear all,
Consider this code:
>library("data.table")
>unloadNamespace('data.table')
It produces some warnings
Warning in FUN(X[[1L]], ...) :
Created a package name, ‘2013-10-29 17:05:51’, when none found
Warning in FUN(X[[1L]], ...) :
Created a package name, ‘2013-10-29 17:05:51’, when none found
...
The warning is produced by the getPackageName() function.
e.g.
2015 Jan 08
4
unloadNamespace
In the documentation the closed thing I see to an explanation of this is
that ?detach says "Unloading some namespaces has undesirable side effects"
Can anyone explain why unloading tseries will load zoo? I don't think
this behavior is specific to tseries, it's just an example. I realize
one would not usually unload something that is not loaded, but I would
expect it to do
2017 Apr 03
3
Very hard to reproduce bug (?) in R-devel
When running R CMD check on a package, we are encountering an error on
R-devel (as of 72457) on Linux. Unfortunately, it is very hard to
reproduce, and almost any change to the code makes the error go away.
I believe that this is due to a bug in R-devel, which has been present
since at least commit 72128 (on 2017-02-06).
The test error occurs when R CMD check is run on Travis CI (on Ubuntu
2017 Apr 05
6
Very hard to reproduce bug (?) in R-devel
)
On Wed, Apr 5, 2017 at 2:59 AM, Martin Maechler
<maechler at stat.math.ethz.ch> wrote:
>
> >>>>> Winston Chang <winstonchang1 at gmail.com>
> >>>>> on Tue, 4 Apr 2017 15:29:40 -0500 writes:
>
> > I've done some more investigation into the problem, and it is very
> > difficult to pin down. What it looks like is
2017 Apr 04
2
Very hard to reproduce bug (?) in R-devel
>
>
>>
I've done some more investigation into the problem, and it is very
difficult to pin down. What it looks like is happening is roughly like this:
- `p` is an environment and `p$e` is also an environment.
- There is a loop. In each iteration, it looks for one item in `p$e`, saves
it in a variable `x`, then removes that item from `p$e`. Then it invokes
`x()`. The loop runs
2015 Jun 23
3
Plans to improve reference classes?
Could of requests:
1) Is there any example or writeup on the difficulties of extending
reference classes across packages? Just so I can fully understand the
issues.
2) In what sorts of situations does the performance of reference
classes cause problems? Sure, it's an order of magnitude slower than
constructing a simple environment, but those timings are in
microseconds, so one would need a
2010 Sep 16
1
Possible bug or annoyance with library.dynam.unload()
Hello,
I have a package with a namespace. Because I use Roxygen that overwrites the
NAMESPACE file each time it is run, I use a R/zzz.R file with
an .onLoad() and .onUnload() functions to take care of loading and unloading
my shared library.
The problem: if I load my library from a local directory, then the unloading
of the package fails, e.g:
# loads fine
>library(Foo,
2017 Dec 21
3
R CMD check warning about compiler warning flags
>> On recent builds of R-devel, R CMD check gives a WARNING when some
>> compiler warning flags are detected, such as -Werror, because they are
>> non-portable. This appears to have been added in this commit:
>> https://github.com/wch/r-source/commit/2e80059
>
> That is not the canonical R sources.
Yes, that is obvious. The main page for that repository says it is
2017 Dec 20
3
R CMD check warning about compiler warning flags
On recent builds of R-devel, R CMD check gives a WARNING when some
compiler warning flags are detected, such as -Werror, because they are
non-portable. This appears to have been added in this commit:
https://github.com/wch/r-source/commit/2e80059
I'm working on a package where these compiler warning flags are
present in a Makefile generated by a configure script -- that is, the
configure
2014 Jun 17
2
R CMD check warning with S3 method
I'm getting an R CMD check warning with a package (call it package A)
that defines an S3 method but not the generic. The generic is defined
in another package (package B). Package A imports the S3 generic from
B. And there's one additional detail: the generic overrides a function
in the stats package.
I've created a minimal test package which reproduces the problem:
2015 Mar 02
2
Errors on Windows with grep(fixed=TRUE) on UTF-8 strings
On Windows, grep(fixed=TRUE) throws errors with some UTF-8 strings.
Here's an example (must be run on Windows to reproduce the error):
Sys.setlocale("LC_CTYPE", "chinese")
y <- rawToChar(as.raw(c(0xe6, 0xb8, 0x97)))
Encoding(y) <- "UTF-8"
y
# [1] "?"
grep("\n", y, fixed = TRUE)
# Error in grep("\n", y, fixed = TRUE) : invalid
2017 Dec 22
2
R CMD check warning about compiler warning flags
>>>>> Duncan Murdoch <murdoch.duncan at gmail.com>
>>>>> on Thu, 21 Dec 2017 14:23:13 -0500 writes:
> On 21/12/2017 1:02 PM, Winston Chang wrote:
>>>> On recent builds of R-devel, R CMD check gives a
>>>> WARNING when some compiler warning flags are detected,
>>>> such as -Werror, because they are
2016 Jun 22
2
dowload.file(method="libcurl") and GET vs. HEAD requests
In R 3.2.4, if you ran download.file(method="libcurl"), it issues a
HTTP GET request for the file. However, in R 3.3.0, it issues a HTTP
HEAD request first, and then a GET requet. This can result in problems
when the web server gives an error for a HEAD request, even if the
file is available with a GET request.
Is it possible to tell download.file to simply send a GET request,
without
2017 Dec 20
2
R CMD check warning about compiler warning flags
On Wed, Dec 20, 2017 at 4:26 PM, Prof Brian Ripley
<ripley at stats.ox.ac.uk> wrote:
> On 20/12/2017 17:42, Winston Chang wrote:
>>
>> On recent builds of R-devel, R CMD check gives a WARNING when some
>> compiler warning flags are detected, such as -Werror, because they are
>> non-portable. This appears to have been added in this commit:
>>
2019 Jul 12
4
Unexpected behaviour when comparing (==) long quoted expressions
Hi everyone:
I?m one of the interns at RStudio this summer working on a project that
helps teachers grade student code. I found an unexpected behaviour with
the |==| operator when comparing |quote|d expressions.
Example 1:
|u <- quote(tidyr::gather(key = key, value = value,
new_sp_m014:newrel_f65, na.rm = TRUE)) s <- quote(tidyr::gather(key =
key, value = value,
2013 Oct 16
1
Internally accessing ref class methods with .self$x is different from .self[['x']]
When a reference class method is accessed with .self$x, it has
different behavior from .self[['x']]. The former copies the function
to the object's environment (with some attributes attached), and the
latter just return NULL (unless it has already been accessed once with
.self$x). Is this how it's supposed to work?
Here's an example that illustrates:
2016 Jun 22
1
dowload.file(method="libcurl") and GET vs. HEAD requests
Thanks for looking into it. Is there a way to avoid the HEAD request
in R 3.3.0? I'm asking because if there isn't, then I'll add a
workaround in a package I'm working on.
-Winston
On Tue, Jun 21, 2016 at 9:45 PM, Martin Morgan
<martin.morgan at roswellpark.org> wrote:
> On 06/21/2016 09:35 PM, Winston Chang wrote:
>>
>> In R 3.2.4, if you ran
2012 Jun 14
2
"Incompatible methods" for overloaded operator
I'm trying to overload an operator, and I'm running into a strange problem.
It happens when I install and load the package, but not when I simply
source() the code.
I'm defining + for two classes. The R code looks like this:
#' @export
#' @method "+" a
`+.a` <- function (x1, x2) {
message("Running custom + function")
}
#' @export
#' @method
2014 Dec 03
2
we need an exists/get hybrid
Thanks Winston! I'm amazed that "[[" beats calling the .Internal
directly. I guess the difference between .Primitive vs. .Internal is
pretty significant for things on this time scale.
NULL meaning NULL and NULL meaning undefined would lead to the same path
for much of my code. I'll be swapping out many exists and get calls later
today. Thanks!
I do still think it would be
2012 Sep 02
1
Environment when NextMethod is used
I'm running into some hard-to-understand behavior with the evaluation
environment when NextMethod is used. I'm using square-bracket indexing
into objects, and the evaluation environment of the expression inside
the square brackets seems to change depending on what kind of
comparison operators are used.
This behavior happens when the following conditions are met (this is
what I've