Comments (4)
- 'isa' is not such a good model here, e.g., R's connections are not character vectors.
- presumably one would like to transparently manage a collection of files, so File() has
length()
,[
andnames()
methods - It would be helpful to define the API, e.g.,
open()
,close()
,isOpen()
and it's relation to the existing connection API. - Finalizers seem important
- a 'registry' of file types seems useful, to map extensions (e.g., '.csv') to appropriate subclasses.
from wishlist-for-r.
Need to keep the notions of path (File) and stream (connection) distinct. We open()
a path to get a stream. There would only be close()
and isOpen()
methods for the stream.
Also, the path represents a low-level format, but the stream might have richer semantics. For example, an HDF5 file might be represented by an HDF5File
object. Lets say someone stored genotypes in the HDF5 file. The open()
function might return an object that implements the same API as the VCF
class. We could have a dual-dispatch openWithScheme
generic that dispatches on the path and some object representing the VCF scheme.
from wishlist-for-r.
@lawremi Path versus stream is a useful distinction; sometimes its useful to create a stream without opening it, or to have a stream that exists in a state where it can be opened after being closed. Hence open()
on the stream.
from wishlist-for-r.
And what potentially intrigues me would be filetype-specific classes that would allow method dispatch. I'm mainly think about this for data import/export (in the context of rio), but I can imagine there might be other contexts, such as calling graphics devices based on file type without the need for jpeg()
, png()
, etc.
from wishlist-for-r.
Related Issues (20)
- Rscript -e EXPR fails to launch if stdin is closed HOT 3
- Suggested performance improvements in R HOT 1
- Separate Build-depends: from Suggests: in DESCRIPTION files HOT 9
- Allow setting breakpoints from debugger
- WISH: `drop` = FALSE by default for `[.data.frame` HOT 9
- Fast check for discreteness
- Make UTF-8 the default encoding for package metadata HOT 2
- WISH/ROBUSTNESS: Mechanism to prevent var <<- value from assigning non-existing 'var' HOT 1
- Consistency: fix matrix subsetting behaviour to be consistent with vectors and data.frames.
- Base R function for length(unique(x))
- WISH: Standardized SystemRequirements HOT 1
- `grDevices::dev.capabilities()` enhancements
- Permit larger seed argument values in set.seed() HOT 1
- Wish: base version of glue::glue() HOT 3
- Add predict method for `stats::kmeans()`
- R CMD check: Option for reporting on writes/updates to tools::R_user_dir() during checks HOT 1
- R CMD check: Option for testing with empty tools::R_user_dir() folders
- Control over `NA` equality in `base::rle()`
- WISH: Make serverSocket(0) useful (+ find a random TCP port that can be listened to) HOT 1
- Task & browser hooks to support implementation of a debug adapter protocol client
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 wishlist-for-r.