Add R.adjustAll
See original GitHub issueI was looking into an alternative for evolve that worked with arrays, but the closest thing I found was adjust. However it only works in a single element. I propose we do something similar to evolve, or a variant of adjust that could take a transform object to apply to difference indexes.
Here is currently my workaround (it won’t work as good as evolve, since it doesn’t account for nesting):
const adjustAll = R.curry((transforms, arr) => {
const newArrEls = Object.keys(transforms)
.reduce((r, i) => {
const fn = transforms[i];
r[i] = fn(arr[i]);
return r;
}, {});
return Object.assign(
[],
arr,
newArrEls
);
});
Here is a demo: https://goo.gl/ZbcpJj
What do you guys think?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Adjusting Multiple Series
In order to seasonally adjust all series in the data frame, you can run: ... Alternatively, X-13 can be called for each series...
Read more >Title and subtitle in R [Set and Adjust] - R CHARTS
Add titles and a subtitle to your base R graphics. Customize the color, adjust the position, use mathematical expressions or change the font...
Read more >adjustOHLC: Adjust Open,High,Low,Close Prices For Splits ...
View source: R/adjustOHLC.R. adjustOHLC, R Documentation ... Description. Adjust all columns of an OHLC object for split and dividend.
Read more >Loops and Functions in R
Now let's adjust all of our weight up by 10% if the measurement was taken in 1984. The first thing we'll need to...
Read more >Drawing beautiful maps programmatically with R, sf and ggplot2
The modular approach of ggplot2 allows to successively add ... As such, we can adjust all characteristics of points (e.g. color of the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is a common statement. I think we should have a link to the cookbook (or the wiki in general) somewhere on website or in the readme…
I just worked this up in response to a question in the Ramda Gitter: