Comments (3)
If we want this, we will have to create some minimal 'dummy' functions. Consider the example below.
library(R6)
testClass<-
R6Class("test",
public=list(
bar=c(),
foo=function(value){
self$bar<-c(self$bar, value)
invisible(self)
}
)
)
test<-function() testClass$new()
foo<-function(test_instance, value) test_instance$foo(value)
bar<-function(test_instance) test_instance$bar
library(magrittr) # should be imported automatically upon loading package
test() %>%
foo(1) %>%
foo(2) %>%
foo(3) %>%
bar()
[1] 1 2 3
While it doesn't improve function at all, I believe it does improve usability as the average R user IMO is much more familiar with the %>%
syntax. Therefor, it's a nicety but not a priority.
As a side note, if we ever step away from the R6 approach, it think it will be (relatively) easier to maintain a steady syntax using %>%
instead of when using $
.
from simmer.
Mmh... interesting. I'll postpone the submission to CRAN in order to take a look at this. :-)
from simmer.
Done! Thanks for your feedback!
from simmer.
Related Issues (20)
- Trajectory printing has a cap on the number of nested branches
- Get batch size
- Renege-timer error "not previously seized" HOT 4
- Implement arithmetic for schedules
- Use 'given' in CITATION
- Ability to deep-copy simulation environments
- synchronize() not work as expected HOT 3
- Monitors do not register the finalizer
- Dangling environment prevents object destruction HOT 1
- Bank Tutorial Part II: Balking - finished=TRUE even though balked HOT 1
- Batch cloning doesn't clone individual arrivals
- Caller misidentification
- Add support for vectors of capacities, queue sizes... HOT 2
- Airport control security HOT 1
- Option to add wait() time to activity_time
- Option to trap() "all" signals instead of "any"
- Possible Bug? `per_resource = T` drops the `finished` variable in `get_mon_arrivals()` HOT 3
- download version from CRAN does not recognise "tag" argument. HOT 6
- Output options are too limited HOT 2
- Ability to remove embeded attribute dataframes from simmer environment HOT 1
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 simmer.