SAAD LAMJADLI
2026-Feb-12 12:01 UTC
[R] Seeking Guidance on Advancing Functional Programming Skills in R
Dear R Users, I am looking for a roadmap to learn advanced functional programming in R. I have already read *Functional Programming* by Thomas Mailund, and I have been studying base R functions to understand how they are written and to learn from their design. I have analyzed and rewritten dozens of base R functions, and this process has been very instructive. However, I still find it difficult to write more complex and robust functions on my own. I would be very grateful for any advice you might have ? whether in the form of recommended books, learning strategies, advanced resources, or suggestions for progressing toward more advanced functional programming skills in R. Additionally, I was wondering if there are any official workshops, teaching sessions, or training initiatives focused on advanced functional programming within the R ecosystem. Kind regards. [[alternative HTML version deleted]]
Martin Møller Skarbiniks Pedersen
2026-Feb-13 11:51 UTC
[R] Seeking Guidance on Advancing Functional Programming Skills in R
On Thu, 12 Feb 2026 at 18:00, SAAD LAMJADLI <s.lamjadli at uca.ac.ma> wrote:> > Dear R Users, > > I am looking for a roadmap to learn advanced functional programming in R.Which part of functional programming in R do you find hard to understand? Thomas Mailund's book has a lot of focus on R4 but functional programming is so much more. Have you looked at the purrr-packages and the family of apply-functions ? If you want to make your own packages I suggest you read about vctrs: https://vctrs.r-lib.org/ But it sounds like you already have read a lot of materiale including source code so maybe you should not focus on reading. I suggest that you instead just start writing a lot of code yourself. And once every month look at your old code and improve it. Maybe solve some of the many fun problems at https://adventofcode.com/ You can also learn a lot by trying to solve issues with existing packages. Just find the source on github and look at the issues eg. https://github.com/tidyverse/ggplot2/issues Regards Martin
Ivan Krylov
2026-Feb-13 19:11 UTC
[R] Seeking Guidance on Advancing Functional Programming Skills in R
Dear Saad Lamjadli, ? Thu, 12 Feb 2026 13:01:26 +0100 SAAD LAMJADLI <s.lamjadli at uca.ac.ma> ?????:> I have analyzed and rewritten dozens of base R functions, and this > process has been very instructive. However, I still find it difficult > to write more complex and robust functions on my own. > > I would be very grateful for any advice you might have ? whether in > the form of recommended books, learning strategies, advanced > resources, or suggestions for progressing toward more advanced > functional programming skills in R.If you're solely focused on functional programming, try Structure and Implementation of Computer Programs [1] or How to Design Programs [2], but be ready to learn some theory and an unfamiliar language (Scheme). For purely functional programming, you can try learning OCaml or Haskell, but it's not a task for the faint of heart. Once you're done, you'll be saying things like "a monad is just a monoid in the category of endofunctors" and not understanding why people are giving you strange looks in return. If you'd like to make your programs more complex and robust, you need to study software architecture. The Architecture of Open Source Applications [3] is a free resource on the topic. Clean Architecture by Robert C. Martin is a more fundamental book, very much worth obtaining. As for learning software development in R... R is an environment where you can interact with data; it only moonlights as a programming language when you develop packages in it. To this end you can read Extending R by John M. Chambers, Writing R Extensions (RShowDoc("R-exts")) and many other free resources on the Web. Finally, Functional Programming by Thomas Mailund predates the native R pipe (|>) and the currently experimental tail call support (Tailcall(), Exec()), so it's probably worth spending some time to learn the new tools as well. -- Best regards, Ivan [1] https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/6515/sicp.zip/index.html [2] https://htdp.org/2025-12-27/Book/index.html [3] https://aosabook.org/en/
Duncan Murdoch
2026-Feb-13 21:44 UTC
[R] Seeking Guidance on Advancing Functional Programming Skills in R
On 2026-02-12 7:01 a.m., SAAD LAMJADLI wrote:> Dear R Users, > > I am looking for a roadmap to learn advanced functional programming in R. > > I have already read *Functional Programming* by Thomas Mailund, and I have > been studying base R functions to understand how they are written and to > learn from their design. I have analyzed and rewritten dozens of base R > functions, and this process has been very instructive. However, I still > find it difficult to write more complex and robust functions on my own. > > I would be very grateful for any advice you might have ? whether in the > form of recommended books, learning strategies, advanced resources, or > suggestions for progressing toward more advanced functional programming > skills in R. Additionally, I was wondering if there are any official > workshops, teaching sessions, or training initiatives focused on advanced > functional programming within the R ecosystem.Others have told you how to learn functional programming. I'm just writing to say I suspect you may not have used the jargon correctly: "functional programming" is a particular style of programming, and I suspect you may just want to know about programming in R (which involves writing functions, but that doesn't make it "functional programming"). Whether or not that's the case, I hope you follow Bert's advice, and show us more concrete examples of what you are really asking. Without those it'll just be by luck if any of the responses are helpful. Duncan Murdoch
Ian Farm
2026-Feb-13 22:45 UTC
[R] Seeking Guidance on Advancing Functional Programming Skills in R
Advanced R by Hadley Wickham has a helpful section on functional programming in R: https://adv-r.hadley.nz/fp.html Best of luck, Ian ____ Ian Farm Laboratory Manager, University of Maine Agroecology Lab On Thu, Feb 12, 2026 at 12:00?PM SAAD LAMJADLI <s.lamjadli at uca.ac.ma> wrote:> Dear R Users, > > I am looking for a roadmap to learn advanced functional programming in R. > > I have already read *Functional Programming* by Thomas Mailund, and I have > been studying base R functions to understand how they are written and to > learn from their design. I have analyzed and rewritten dozens of base R > functions, and this process has been very instructive. However, I still > find it difficult to write more complex and robust functions on my own. > > I would be very grateful for any advice you might have ? whether in the > form of recommended books, learning strategies, advanced resources, or > suggestions for progressing toward more advanced functional programming > skills in R. Additionally, I was wondering if there are any official > workshops, teaching sessions, or training initiatives focused on advanced > functional programming within the R ecosystem. > > Kind regards. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > https://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]