Comments (5)
"raw" is an implicit class. extendr's inherits()
simply checks the class
attribute, while R's inherits()
considers implicit class. ?class
says:
If the object does not have a class attribute, it has an implicit class, notably "matrix", "array", "function" or "numeric" or the result of typeof(x)
This is the C version of R's ihnerits()
, but this isn't exposed as an API. So, there's no easy way to mimic the R's inherits()
.
If the behavior is confusing, extendr might be better to consider removing it. But, I guess what you really want is is_raw()
in this case, isn't it?
from extendr.
Good to know! Thank you for sharing that. I suppose is_raw()
is what I could be using here. I didn't know about it. In the use case I opted for Raw::try_from()
and matched on the results which is sufficient.
I think the inherits()
is still useful so I don't think removal should be necessary. I've made a PR #689 to clarify the behavior of inherits()
in the docstring.
from extendr.
Can this be closed?
from extendr.
from extendr.
No problem (anyway I don't have permission to close, you know). I was just wondering if this was forgotten to be closed when #689 got merged.
from extendr.
Related Issues (20)
- extendr-macro should propagate syn::Error, not panic!()
- Clarify design: NA checking HOT 1
- The `result_list` feature seems broken HOT 3
- Demacrofy `extendr-api` as much as possible
- add `return_list` and `return_condition` to `#[extendr]`
- Should `extendr-api` be thread safe? HOT 1
- Add multithreaded tests to extendr
- OBJSXP
- Sporadic crash in `serializer_test`
- Feature: Minimal feature to reduce size HOT 4
- File `device_driver` isn't included anywhere
- Rethink GitHub Actions
- Drop graphics device support?
- `@docType "package"` is deprecated in roxygen2 7.3.0
- feature: support exporting traits
- Support basic Date and Date-Time objects
- include `AsTypedSlice` in the prelude HOT 4
- Failed to generate wrapper functions when calling tokio runtime `block_on` in exposed struct constructor HOT 16
- Allow using Rcpp and rextendr in the same R package
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from extendr.