Displaying 20 results from an estimated 26 matches for "krivitski".
Did you mean:
krivitsky
2013 Mar 09
2
Submitting packages with weak circular dependencies to CRAN.
Hello, R-devel,
I am planning to submit two packages, A and B, to CRAN. Package B uses
an API exported by package A, while package A uses package B to test the
API in question. Thus, package B Depends on, and Enhances, A, and A
Suggests B.
Could I get some guidance on submitting them to CRAN? A cannot be
checked without B, but B cannot be installed without A.
Thanks in
2023 Mar 07
1
Augment base::replace(x, list, value) to allow list= to be a predicate?
This could be extended to sub and gsub as well which gsubfn in the
gusbfn package already does:
library(gsubfn)
gsubfn("^..", toupper, c("abc", "xyz"))
## [1] "ABc" "XYz"
On Fri, Mar 3, 2023 at 7:22?PM Pavel Krivitsky <p.krivitsky at unsw.edu.au> wrote:
>
> Dear All,
>
> Currently, list= in base::replace(x, list, value)
2012 May 04
4
[patch] Behavior of .C() and .Fortran() when given double(0) or integer(0).
Dear R-devel,
While tracking down some hard-to-reproduce bugs in a package I maintain,
I stumbled on a behavior change between R 2.15.0 and the current R-devel
(or SVN trunk).
In 2.15.0 and earlier, if you passed an 0-length vector of the right
mode (e.g., double(0) or integer(0)) as one of the arguments in a .C()
call with DUP=TRUE (the default), the C routine would be passed NULL
(the C
2023 Mar 08
1
Augment base::replace(x, list, value) to allow list= to be a predicate?
That's an interesting example, as it's conceptually similar to what
Pavel is proposing, but structurally different. gsubfn() is more
complicated than a simple switch in the body of the function, and
wouldn't work well as an anonymous function.
Multiple dispatch can nicely encompass both of these cases. For replace(),
library(S7)
replace <- new_generic("replace",
2019 May 19
2
[R-pkg-devel] Three-argument S3method declaration does not seem to affect dispatching from inside the package.
On Sat, 18 May 2019 at 23:34, Pavel Krivitsky <pavel at uow.edu.au> wrote:
>
> > The issue here is that you are registering a non-standard name
> > (.gen.formula) for that generic and then defining what would be the
> > standard name (gen.formula) for... what purpose? IMHO, this is a bad
> > practice and should be avoided.
>
> The situation initially arose
2019 May 14
2
[R-pkg-devel] Three-argument S3method declaration does not seem to affect dispatching from inside the package.
CCing r-devel.
On Tue, 14 May 2019 at 02:11, Pavel Krivitsky <pavel at uow.edu.au> wrote:
>
> Dear All,
>
> I've run into this while updating a package with unfortunately named
> legacy functions. It seems like something that might be worth changing
> in R, and I want to get a sense of whether this is a problem before
> submitting a report to the Bugzilla.
>
>
2019 May 14
2
[R-pkg-devel] Three-argument S3method declaration does not seem to affect dispatching from inside the package.
On Tue, 14 May 2019 at 12:31, Pavel Krivitsky <pavel at uow.edu.au> wrote:
>
> > Note that disabling name-based dispatch implies two things: 1) the
> > inability to override your method by defining gen.formula in the
> > global environment, and 2) another package can break yours (i.e.,
> > internal calls to gen()) by registering an S3 method for gen() after
>
2019 May 03
1
Strange error messages from parallel::mcparallel family under 3.6.0
Dear All,
Since upgrading to 3.6.0, I've been getting a strange error messages
from the child process when using mcparallel/mccollect. Before filing a report in the Bugzilla, I want to figure out whether I had been doing something wrong all this time and R 3.6.0 has exposed it, or whether something else is going on.
# Background #
Ultimately, what I want to do is to be able to set a time
2023 Mar 04
3
Augment base::replace(x, list, value) to allow list= to be a predicate?
Dear All,
Currently, list= in base::replace(x, list, value) has to be an index
vector. For me, at least, the most common use case is for list= to be
some simple property of elements of x, e.g.,
x <- c(1,2,NA,3)
replace(x, is.na(x), 0)
Particularly when using R pipes, which don't allow multiple
substitutions, it would simplify many of such cases if list= could be a
function that returns
2005 Feb 26
1
Profiling C functions called from R.
Hi,
I am working on an R package which includes some C routines. I would
like to profile the C routines (built with GCC under Debian Linux). I
tried running R with
LD_PROFILE=/path/to/C/library.so R
and executing functions that would invoke the code therein. The code
takes about twice as long to run with LD_PROFILE set than without, so I
am guessing that profiling is taking place. However,
2019 May 19
0
[R-pkg-devel] Three-argument S3method declaration does not seem to affect dispatching from inside the package.
Hi, Inaki,
On Sun, 2019-05-19 at 16:59 +0200, I?aki Ucar wrote:
> IMO the simplest way to do this is to check who the caller was:
>
> foo <- function(x) UseMethod("foo")
> foo.bar <- function(x) {
> sc <- sys.call(-1)
> if (is.null(sc) || sc[[1]] != "foo")
> .Deprecated(msg="Calling 'foo.bar' directly is deprecated")
2007 Feb 27
1
Checking for user interrupt in a .C() call without without triggering a non-local exit.
Hi,
An R package on which I am working makes a series of very
computationally-intensive and complex .C() calls, that I would like to
make interruptible. However, calling R_CheckUserInterrupt() causes a
non-local exit, so the memory allocated by malloc() is never freed. The
way the code is structured, it might not be practical to replace all the
malloc() calls with R_alloc() calls.
The question
2019 May 14
0
[R-pkg-devel] Three-argument S3method declaration does not seem to affect dispatching from inside the package.
Hi, I?aki,
Thanks for looking into this.
On Tue, 2019-05-14 at 11:33 +0200, I?aki Ucar wrote:
> > So, calling the same generic function with the same class results
> > in different dispatching behaviour depending on whether the call is
> > from within the package doing the export or from the outside.
>
> It does not depend on whether you export gen.formula() or not. When
2019 May 18
0
[R-pkg-devel] Three-argument S3method declaration does not seem to affect dispatching from inside the package.
Hi, Inaki,
On Tue, 2019-05-14 at 12:50 +0200, I?aki Ucar wrote:
> The thing is that, in R, "nearer" means "the calling environment"
> (and then, other things). When you call test_me(), the calling
> environment for gen() is the package namespace. When you call gen()
> directly, thenthe calling environment is the global environment. So
> what happens here follows
2017 Jul 06
4
Regarding R_LIBS_USER
Hello,
I just subscribed to the list to join the discussion after being
blindsided by the change and reading Dirk Eddelbuettel's reply to my
bug report at https://bugs.debian.org/866768 .
As far as I can tell the advantages of site library are:
1. Saves disk space and a little bit of user time spent installing and
upgrading.
2. Other Debian package manages, like pip, default?to
2019 May 17
5
Give update.formula() an option not to simplify or reorder the result -- request for comments
Dear All,
Martin Maechler has asked me to send this to R-devel for discussion
after I submitted it as an enhancement request (
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17563).
At this time, the update.formula() method always performs a number of
transformations on the results, eliminating redundant variables and
reordering interactions to be after the main effects. This is not
always
2023 Mar 06
1
Augment base::replace(x, list, value) to allow list= to be a predicate?
Le 04/03/2023 ? 01:21, Pavel Krivitsky a ?crit?:
> Dear All,
>
> Currently, list= in base::replace(x, list, value) has to be an index
> vector. For me, at least, the most common use case is for list= to be
> some simple property of elements of x, e.g.,
>
> x <- c(1,2,NA,3)
> replace(x, is.na(x), 0)
>
> Particularly when using R pipes, which don't allow multiple
2019 Jul 05
0
R 3.6.1 is released
The build system rolled up R-3.6.1.tar.gz (codename "Action of the Toes") this morning.
The list below details the changes in this release.
You can get the source code from
http://cran.r-project.org/src/base/R-3/R-3.6.1.tar.gz
or wait for it to be mirrored at a CRAN site nearer to you.
Binaries for various platforms will appear in due course.
For the R Core Team,
Peter Dalgaard
2019 Jul 05
0
R 3.6.1 is released
The build system rolled up R-3.6.1.tar.gz (codename "Action of the Toes") this morning.
The list below details the changes in this release.
You can get the source code from
http://cran.r-project.org/src/base/R-3/R-3.6.1.tar.gz
or wait for it to be mirrored at a CRAN site nearer to you.
Binaries for various platforms will appear in due course.
For the R Core Team,
Peter Dalgaard
2019 Jul 05
0
R 3.6.1 is released
The build system rolled up R-3.6.1.tar.gz (codename "Action of the Toes") this morning.
The list below details the changes in this release.
You can get the source code from
http://cran.r-project.org/src/base/R-3/R-3.6.1.tar.gz
or wait for it to be mirrored at a CRAN site nearer to you.
Binaries for various platforms will appear in due course.
For the R Core Team,
Peter Dalgaard