This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-14
Channels
- # announcements (7)
- # babashka (13)
- # beginners (98)
- # biff (20)
- # calva (3)
- # clj-kondo (5)
- # clj-otel (6)
- # cljs-dev (96)
- # clojure (22)
- # clojure-austin (30)
- # clojure-conj (4)
- # clojure-europe (53)
- # clojure-nl (2)
- # clojure-norway (63)
- # clojure-uk (3)
- # clojurescript (18)
- # cursive (10)
- # data-science (11)
- # datalevin (2)
- # datomic (7)
- # deps-new (1)
- # fulcro (3)
- # graphql (1)
- # gratitude (4)
- # hyperfiddle (43)
- # kaocha (4)
- # malli (15)
- # pathom (6)
- # polylith (2)
- # reagent (3)
- # reitit (2)
- # releases (6)
- # remote-jobs (1)
- # rewrite-clj (45)
- # ring (4)
- # shadow-cljs (47)
- # sql (5)
- # xtdb (8)
Does anyone know of an R package that can parse EDN into R (e.g. R lists)? something like rjson (https://cran.r-project.org/web/packages/rjson/rjson.pdf) ?
had some experience in the past shelling out to @U04V15CAJ's https://github.com/borkdude/jet for that • Jet can convert EDN to JSON • then you can use R's jsonlite package to turn that into R data structures
found the old tweet about it: https://twitter.com/daslu_/status/1208708867074473985
thank you for that. My motivation though, is to use edn instead of json. I will keep looking, but if such a package does not exist, I might write one.
nice. so you'd like to reproduce what jsonlite does, but with EDN instead of JSON? (at least in one direction, EDN->R, while possibly not needing the other direction?)
you may find this paper by Jeroen Oooms useful, quite detailed and thoughtful in sharing their design decisions and challenges: https://arxiv.org/pdf/1403.2805.pdf
one possible shortcut would be to pass through JSON format: EDN->JSON->R. probably that would be the easy way. if you need to avoid Jet for some reason, then maybe you would like to call Clojure from R. here is an example project demonstrating that: https://github.com/scicloj/tutorials/tree/master/interop/calling-clojure-from-R (but that would introduce other dependencies, such as rJava)
https://clojurians.slack.com/archives/C0BQDEJ8M/p1676407176192149?thread_ts=1676358123.507639&cid=C0BQDEJ8M The idea is to make it easy for R users to rely on EDN files.
Sounds wonderful