Comments (4)
This is a function that can make a copy by value at least the first enclosing environment. A recursive version is left as an exercise for the reader, and may be too costly computationally. This may cover most use cases
protect =
function(x) {
envx= environment(x)
nenv = as.environment(as.list(envx))
parent.env(nenv) = parent.env(envx)
environment(x) = nenv
x}
from plyrmr.
protect is now implemented, need to test more before closing
from plyrmr.
still broke
from plyrmr.
delta = 0
ff = function()function(x) x$carb + delta #two deep env created
p = do(input(mtcars), ff())
as.data.frame(p)
delta = 100
as.data.frame(p)
p = do(input(mtcars), ff())
as.data.frame(p)
rejoice!
works also for where and select, not for mutate or transform. It may be the most we can do so I am going to close for now. If someone has an idea as to get the ... args of these other function evaluated in an environment of choice, please let me know.
from plyrmr.
Related Issues (20)
- function nrow
- function ncol
- functions name, colnames
- function summary
- extreme.k could be vectorized HOT 2
- Review what happens on empty input
- annoying irrelevant startup message whenever launching distributed R
- dplyr functions should not shadow sparkR functions
- equivalent on spark backend of file system ops
- vectorization of reduce operations
- automated partitions
- Consistency of spark and rmr backends
- default for .columns
- outer joins on spark
- print fails on empty merge
- Deleted columns HOT 1
- How to set the root of result file?
- Questions about the magic.wand function and the piping operators
- Error I can't figure out
- Data Manipulation of Big data using plyrmr function
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 plyrmr.