On Sun, Mar 5, 2017 at 2:50 PM, Michael Lawrence
wrote:
>
>
> On Sat, Mar 4, 2017 at 12:36 PM, Da Zheng wrote:
>>
>> In my case, I create a new type of matrices and override matrix
>> operations in R for these matrices.
>> My goal is to make the system as tra
this sound reasonable?
Best,
Da
On Sat, Mar 4, 2017 at 3:22 PM, Michael Lawrence
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 wrote:
>>
>> I'm just curious. Why making "if" generic
unction(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 else FALSE
> [1] T
gt; 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 wrote:
>> Hello,
>>
>> I heard we can override almost everything
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
ettel wrote:
> >
> > On 27 January 2017 at 21:54, Gábor Csárdi wrote:
> > | On Fri, Jan 27, 2017 at 9:28 PM, Da Zheng
> wrote:
> > | > What major R platforms does this policy refer to?
> > | >
> > |
> > | Linux, macOS, Windows.
>
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 does
> 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-security -D_FORTIFY_SOURCE=2 -g
Hello,
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-security -D_FORTIFY_SOURCE=2 -g
However, my package is fairly large. With debug info compiled into th
hould 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 wrote:
>> Hello,
>>
>> I'm trying to override pmin and pmax for my own matrix. These two
>> functions have ... as an ar
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.
But
11 matches
Mail list logo