How to Import Packages from Julia to R
Overview
The way to load a package in Julia is to use using
, but as the program grows, it becomes a task to individually write them each time. This introduces a method to load packages through a loop1.
Code
Metaprogramming
packages = [:CSV, :DataFrames, :LinearAlgebra, :Plots]
for package in packages
@eval using ▷eq1◁(package)
end
In actual use, it is better to load only the progress bar separately and visually check the loading of other packages.
Environment
- OS: Windows
- julia: v1.9.0