Displaying 2 results from an estimated 2 matches for "r_has_methods".
2025 Feb 12
1
Unexpected result after auto-attaching of the Matrix package
...siders dispatching a dim() method:
https://github.com/r-devel/r-svn/blob/fa73948a1977da05788499807469e69d5a21bd98/src/main/attrib.c#L1181
2. DispatchOrEval() first considers S4 dispatch:
https://github.com/r-devel/r-svn/blob/fa73948a1977da05788499807469e69d5a21bd98/src/main/eval.c#L4152
3. But then R_has_methods(dim) finds out that no S4 methods are
currently registered for dim() - Matrix not being loaded yet - and S4
dispatch is abandoned:
https://github.com/r-devel/r-svn/blob/fa73948a1977da05788499807469e69d5a21bd98/src/main/objects.c#L1578
4. Instead, R tries usemethod(...) for S3 dispatch:
https://gith...
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