- Homebrew
- RStudio
- Install R and RStudio
brew install R
brew install -cask rstudio- Launch RStudio.
open -a RStudioThis opens a new application. Stay on the Console tab -- does what it says on the tin
The rest of the commands should be run in Rstudio
- Install the jsonlite package (if not already installed).
install.packages("jsonlite")- Load the .rda file:
In the console:
load("path/to/your/file.rda")Or in the Rstudio UI:
- Check the loaded object(s) by running:
ls()- Convert the loaded object to JSON and save it to your desired location (in this example, the Desktop folder):
jsonlite::write_json(loaded_object, "~/Desktop/output_file.json")Replace loaded_object with the name of the object you want to convert, as obtained from the ls() command.
Result:



