On Sun, Mar 5, 2017 at 2:50 PM, Michael Lawrence
<lawrence.mich...@gene.com> wrote:
>
>
> On Sat, Mar 4, 2017 at 12:36 PM, Da Zheng <zhengda1...@gmail.com> wrote:
>>
>> In my case, I create a new type of matrices and override matrix
>> operations in R fo
sound reasonable?
Best,
Da
On Sat, Mar 4, 2017 at 3:22 PM, Michael Lawrence
<lawrence.mich...@gene.com> wrote:
> I'm curious as to precisely why someone would want to do this.
>
> On Sat, Mar 4, 2017 at 11:49 AM, Da Zheng <zhengda1...@gmail.com> wrote:
>>
>> I'm
> ❯ `if` <- function(a, b, c) UseMethod("if")
> ❯ `if.default` <- function(a,b,c) base::`if`(a, b, c)
> ❯ `if.foo` <- function(a, b, c) FALSE
> ❯ a <- structure(42, class = "foo")
>
> ❯ if (a) TRUE else FALSE
> [1] FALSE
>
> ❯ if (1) TRUE el
.ga...@gmail.com> wrote:
> You can. Perhaps needless to say, be careful with this.
>
> ❯ `if` <- function(...) FALSE
> ❯ if (TRUE) TRUE else FALSE
> [1] FALSE
>
> G.
>
> On Sat, Mar 4, 2017 at 5:36 PM, Da Zheng <zhengda1...@gmail.com> wrote:
>> Hello,
>>
Hello,
I heard we can override almost everything in R. Is it possible to
override "if" keyword in R to evaluate my own object instead of a
logical value?
Thanks,
Da
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
...@debian.org> wrote:
> >
> > On 27 January 2017 at 21:54, Gábor Csárdi wrote:
> > | On Fri, Jan 27, 2017 at 9:28 PM, Da Zheng <zhengda1...@gmail.com>
> wrote:
> > | > What major R platforms does this policy refer to?
> > | >
> > |
> > |
Hello,
I'm trying to submit my package to CRAN. When I read the policy, it says:
Package authors should make all reasonable efforts to provide
cross-platform portable code. Packages will not normally be accepted
that do not run on at least two of the major R platforms.
What major R platforms
wrote:
>
> On 16 October 2016 at 09:46, Da Zheng wrote:
> | I'm writing an R package that is mainly written in C++. By default, R
> | CMD INSTALL creates C/C++ flags as follows:
> | -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat
> | -Werror=format-securit
method signature. At some point we
> should solve that by introducing a binary pmin2, pmax2 as we have for
> cbind and rbind.
>
>
> On Thu, Dec 24, 2015 at 5:54 AM, Da Zheng <zhengda1...@gmail.com> wrote:
>> Hello,
>>
>> I'm trying to override pmin and pmax for my own m
Hello,
I'm trying to override pmin and pmax for my own matrix. These two
functions have ... as an argument. I tried to override them as
follows:
setMethod("pmax", class_name, function(x, ..., na.rm) { ... })
I use this way to override primitive functions such as min/max and it
works fine.
10 matches
Mail list logo