Displaying 8 results from an estimated 8 matches for "r_data_class2".
2025 Feb 12
1
Unexpected result after auto-attaching of the Matrix package
...b/fa73948a1977da05788499807469e69d5a21bd98/src/main/objects.c#L1578
4. Instead, R tries usemethod(...) for S3 dispatch:
https://github.com/r-devel/r-svn/blob/fa73948a1977da05788499807469e69d5a21bd98/src/main/eval.c#L4215
5. UseMethod() wants to find out the S3 class vector for 'd' and calls
R_data_class2():
https://github.com/r-devel/r-svn/blob/fa73948a1977da05788499807469e69d5a21bd98/src/main/objects.c#L493
6. R_data_class2() sees it's an S4 object and calls
methods:::.extendsForS3(class(d)), which finally loads Matrix in order
to find out classes extended by "dgCMatrix":
https://git...
2025 Feb 11
2
Unexpected result after auto-attaching of the Matrix package
Dear all,
I just stumbled on this behavior - not sure if this is expected:
R version 4.4.2 (2024-10-31) -- "Pile of Leaves"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu
> library(Matrix)
> sparseMatrix(i=1:10, j=1:10, x=rnorm(10)) |>
saveRDS("~/Downloads/sparsemat_test.rds")
> q()
Save workspace image? [y/n/c]: n
2020 Jan 21
2
class(<matrix>) |--> c("matrix", "arrary") -- and S3 dispatch
....
> Hadley calls this long class vector the 'implicit class' -- which
> is a good term but somewhat conflicting with R's (i.e. R-core's)
> "definition" used in the ?class help page (for ca. 11 years).
>
> R's internal C code has a nice function class R_data_class2()
> which computes this 'S3-dispatch-class' character (vector) for
> any R object, and R_data_class2() is indeed called from (the
> underlying C function of) R's UseMethod().
>
> Using the above fact of an error message,
> I wrote a nice (quite well tested) function...
2019 Nov 21
0
class(<matrix>) |--> c("matrix", "arrary") -- and S3 dispatch
...same as R's class().
Hadley calls this long class vector the 'implicit class' -- which
is a good term but somewhat conflicting with R's (i.e. R-core's)
"definition" used in the ?class help page (for ca. 11 years).
R's internal C code has a nice function class R_data_class2()
which computes this 'S3-dispatch-class' character (vector) for
any R object, and R_data_class2() is indeed called from (the
underlying C function of) R's UseMethod().
Using the above fact of an error message,
I wrote a nice (quite well tested) function my.class2() which
returns th...
2020 Jan 28
0
class(<matrix>) |--> c("matrix", "arrary") -- and S3 dispatch
...ass vector the 'implicit class' -- which
>> is a good term but somewhat conflicting with R's (i.e. R-core's)
>> "definition" used in the ?class help page (for ca. 11 years).
>>
>> R's internal C code has a nice function class R_data_class2()
>> which computes this 'S3-dispatch-class' character (vector) for
>> any R object, and R_data_class2() is indeed called from (the
>> underlying C function of) R's UseMethod().
>>
>> Using the above fact of an error message,
>&...
2019 Nov 15
5
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
>>>>> Pages, Herve
>>>>> on Thu, 14 Nov 2019 19:13:47 +0000 writes:
> On 11/14/19 05:47, Hadley Wickham wrote:
>> On Sun, Nov 10, 2019 at 2:37 AM Martin Maechler
>> <maechler at stat.math.ethz.ch> wrote:
>>>
>>>>>>>> Gabriel Becker
>>>>>>>> on Sat, 2 Nov 2019
2005 Jul 20
1
(PR#8017) build of REventLoop package crashes with 2.1 due
...ine duplicated Rf_duplicated
> 633c631
> < # define Mbrtowc Rf_mbrtowc
> ---
>> # define match Rf_match
> 686a685
>> int R_ShowFile(char*, char*);
> 799,800c798
> < SEXP R_data_class(SEXP , Rboolean);
> < SEXP R_data_class2(SEXP);
> ---
>> SEXP R_data_class(SEXP , int);
> 864,869d861
> < typedef enum {
> < Rprt_adj_left = 0,
> < Rprt_adj_right = 1,
> < Rprt_adj_centre = 2
> < } Rprt_adj;
> <
> 872,939c864
> < char *EncodeString(SEXP, int, int, Rprt_a...
2005 Jul 19
0
build of REventLoop package crashes with 2.1 due tosyntax error in Defn.h (PR#8017)
...this a UTF-8 locale? */
596a594
> # define duplicated Rf_duplicated
633c631
< # define Mbrtowc Rf_mbrtowc
---
> # define match Rf_match
686a685
> int R_ShowFile(char*, char*);
799,800c798
< SEXP R_data_class(SEXP , Rboolean);
< SEXP R_data_class2(SEXP);
---
> SEXP R_data_class(SEXP , int);
864,869d861
< typedef enum {
< Rprt_adj_left = 0,
< Rprt_adj_right = 1,
< Rprt_adj_centre = 2
< } Rprt_adj;
<
872,939c864
< char *EncodeString(SEXP, int, int, Rprt_adj);
<
<
< #if defined(HAVE_WCHAR_H) &&am...