Closed hadley closed 10 years ago
I think that makes sense to have the "droplets" object include a single droplet
I'd probably write something like:
as.droplet <- function(x) UseMethod("as.droplet")
as.droplet.droplet <- function(x) x
as.droplet.numeric <- function(x) droplet(x)
as.droplet.character <- function(x) ...
Now returns a droplet object.
So that you can pass that object to other droplet methods. (Or use S3 dispatch and add a droplet class)
...
Oh I think the problem is that you've built the chaining around "droplets" object, whereas I think building it around a single droplet would make more sense