Displaying 20 results from an estimated 59 matches for "winstonchang1".
2015 Apr 29
2
R CMD check and missing imports from base packages
On Wed, Apr 29, 2015 at 12:53 PM, Winston Chang <winstonchang1 at gmail.com>
wrote:
> On Tue, Apr 28, 2015 at 3:04 PM, G?bor Cs?rdi <csardi.gabor at gmail.com>
> wrote:
> >
> >
> > E.g. if package 'ggplot2' uses 'stats::density()', and package 'igraph'
> > also defines 'density()', and ...
2014 Oct 29
2
Unexpected behavior of identical() with language objects
I ran into this and found the result very surprising:
identical( quote({ a }), quote({ a }) )
# FALSE
It seems related to curly braces. For example, parens work fine:
identical( quote(( a )), quote(( a )) )
# TRUE
Is this expected behavior? I can't seem to find anything in the help
for identical that relates to this.
-Winston
2017 Apr 18
2
system/system2 and open file descriptors
It seems that the system() and system2() functions don't close file
descriptors between the fork() and exec() (on Unix platforms, of course).
This means that the child processes inherit open files and socket
connections.
Running this (from a terminal) will result in the child process writing to
a file that was opened by R:
R
f <- file('foo.txt', 'w')
system('echo
2015 Jan 26
2
speedbump in library
>>>>> Winston Chang <winstonchang1 at gmail.com>
>>>>> on Fri, 23 Jan 2015 10:15:53 -0600 writes:
> I think you can simplify a little by replacing this:
> pkg %in% loadedNamespaces()
> with this:
> .getNamespace(pkg)
almost: It would be
!is.null(.getNamespace(pkg))...
2015 Jan 26
2
speedbump in library
...language, still present in the C code,
isRegisteredNamespace(name)
but I would prefer the former, isLoadedN..S..()
Martin
> On Mon, Jan 26, 2015 at 3:36 AM, Martin Maechler
> <maechler at lynne.stat.math.ethz.ch> wrote:
>>>>>>> Winston Chang <winstonchang1 at gmail.com> on Fri, 23
>>>>>>> Jan 2015 10:15:53 -0600 writes:
>>
>> > I think you can simplify a little by replacing this:
>>
>> > pkg %in% loadedNamespaces() > with this: >
>> .getNamespace(pkg)
>...
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:
2015 Jan 22
3
speedbump in library
Hi all,
Profiling turned up a bit of a speedbump in the library function. I
submitted a patch to the R bug tracker as bug 16168 and I've also
included it below. The alternate code is simpler and easier to
read/maintain, I believe. Any thoughts on other ways to write this?
Index: src/library/base/R/library.R
===================================================================
---
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 happening is roughly like this:
> > - `p` is an env...
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
2014 Dec 03
2
we need an exists/get hybrid
...two lookups, but it
has the "defined" concept.
or maybe even
if (defined( foo = x{'c'} ) ) { print foo; }
Thanks again for the timings!
Pete
____________________
Peter M. Haverty, Ph.D.
Genentech, Inc.
phaverty at gene.com
On Wed, Dec 3, 2014 at 12:48 PM, Winston Chang <winstonchang1 at gmail.com>
wrote:
> I've looked at related speed issues in the past, and have a couple
> related points to add. (I've put the info below at
> http://rpubs.com/wch/46428.)
>
> There's a significant amount of overhead just from calling the R
> function get(). This...
2015 Apr 29
4
R CMD check and missing imports from base packages
...p them with a NOTE if they
don't know that this is good practice, or they just simply forget?
Gabor
>
> Best,
> ~G
>
> On Wed, Apr 29, 2015 at 10:00 AM, G?bor Cs?rdi <csardi.gabor at gmail.com>
> wrote:
>
>> On Wed, Apr 29, 2015 at 12:53 PM, Winston Chang <winstonchang1 at gmail.com>
>> wrote:
>>
>> > On Tue, Apr 28, 2015 at 3:04 PM, G?bor Cs?rdi <csardi.gabor at gmail.com>
>> > wrote:
>> > >
>> > >
>> > > E.g. if package 'ggplot2' uses 'stats::density()', and package
>&g...
2015 Apr 29
0
R CMD check and missing imports from base packages
...density function from stats and not from somewhere else? Isn't
that what ImportFrom is for? Is the reason that it is loaded automatically?
Best,
~G
On Wed, Apr 29, 2015 at 10:00 AM, G?bor Cs?rdi <csardi.gabor at gmail.com>
wrote:
> On Wed, Apr 29, 2015 at 12:53 PM, Winston Chang <winstonchang1 at gmail.com>
> wrote:
>
> > On Tue, Apr 28, 2015 at 3:04 PM, G?bor Cs?rdi <csardi.gabor at gmail.com>
> > wrote:
> > >
> > >
> > > E.g. if package 'ggplot2' uses 'stats::density()', and package 'igraph'
> > > al...
2017 Apr 05
0
Very hard to reproduce bug (?) in R-devel
>>>>> 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 happening is roughly like this:
> - `p` is an environment and `p$e` is al...
2017 Apr 05
0
Very hard to reproduce bug (?) in R-devel
> On 05 Apr 2017, at 20:40 , Winston Chang <winstonchang1 at gmail.com> wrote:
>
> I think there's a good chance that this is due to a bug in R. I have
> been trying to track down the cause of the problem but haven't been
> able find it.
>
> -Winston
Apologies in advance if this is just stating the obvious, but let me try a...
2017 Apr 05
1
Very hard to reproduce bug (?) in R-devel
On 05.04.2017 23:54, peter dalgaard wrote:
>
>> On 05 Apr 2017, at 20:40 , Winston Chang <winstonchang1 at gmail.com> wrote:
>>
>> I think there's a good chance that this is due to a bug in R. I have
>> been trying to track down the cause of the problem but haven't been
>> able find it.
>>
>> -Winston
>
> Apologies in advance if this is just statin...
2014 Aug 11
1
Error when assigning value in environment which is a locked binding
If an environment x contains a locked binding y which is also an
environment, and then you try to assign a value to a binding inside of
y, it can either succeed or fail, depending on how you refer to
environment y.
x <- new.env()
x$y <- new.env()
lockEnvironment(x, bindings = TRUE)
# This assignment fails
x$y$z <- 1
# Error in x$y$z <- 1 : cannot change value of locked binding for
2012 Jul 24
1
Finding dynamic shared libraries loaded with a package
Is there a way to query a package to see what dynamic shared libraries are
loaded with it?
The reason I ask is because during development, I want to unload libraries
so that they can be reloaded without restarting R. I want to make it
automatic so that you can just pass in the name of the package, and it will
unload all the relevant shared libraries.
Typically, the name of the shared library is
2015 Jan 26
0
speedbump in library
...aceLoaded() function would be a useful thing to have in
general if we are interested in readable code. An efficient
implementation would be just a bonus.
On Mon, Jan 26, 2015 at 3:36 AM, Martin Maechler
<maechler at lynne.stat.math.ethz.ch> wrote:
>>>>>> Winston Chang <winstonchang1 at gmail.com>
>>>>>> on Fri, 23 Jan 2015 10:15:53 -0600 writes:
>
> > I think you can simplify a little by replacing this:
>
> > pkg %in% loadedNamespaces()
> > with this:
> > .getNamespace(pkg)
>
> almost: It would b...
2020 Mar 26
3
Rebuilding and re-checking of downstream dependencies on CRAN Mac build machines
I have two questions about the CRAN machines that build binary
packages for Mac. When a new version of a package is released,
(A) Do the downstream dependencies get re-checked?
(B) Do the downstream dependencies get re-built?
I have heard (but do not know for sure) that the answer to (A) is no,
the downstream dependencies do not get rechecked.
>From publicly available information on the
2017 Apr 20
0
system/system2 and open file descriptors
...en restarting R inside of RStudio on a Mac, if there are any
extant child processes started by system(), they keep some files open, and
this causes RStudio to hang. (There's a fix in progress for RStudio for
this particular issue.)
-Winston
On Tue, Apr 18, 2017 at 3:20 PM, Winston Chang <winstonchang1 at gmail.com>
wrote:
> It seems that the system() and system2() functions don't close file
> descriptors between the fork() and exec() (on Unix platforms, of course).
> This means that the child processes inherit open files and socket
> connections.
>
> Running this (from...