Julia
Julia is a programming language that aims for easy coding while maintaining high speed, and it is ambitiously developed to replace languages like Fortran, MATLAB, Python, and R. As you can tell from the commonalities among these languages, Julia is gaining traction in scientific computing. Fresh Shrimp Sushi House, operating in the same field, also aims to popularize Julia in Korea.
Icon | Subcategory |
---|---|
Features from Python | |
Features from MATLAB | |
Features from R | |
Features unique to Julia |
Here, “features unique to Julia” means characteristics that differentiate it from MATLAB, Python, and R. These may be common features in other programming languages. If you’re already familiar with these languages, the phrase “learning Julia” might sound odd. Many functions and expressions are similar, so knowing these languages is almost equivalent to knowing Julia. Refer to the post Equivalent Codes in Julia, MATLAB, Python, and R.
For information on how to perform machine learning in Julia, see the Machine Learning category.
Tutorial
Installation and Packages
- Julia Programming Language
- How to Install the Latest Version of Julia on Windows
- How to Install the Latest Version of Julia on Linux
- How to Install and Use Packages
Pkg.jl
- How to Use Functions Defined in Other Files
include("file.jl")
- How to Clear the Console Ctrl + L,
print("\033c")
I/O
- How to Read and Write *.mat Files
MAT.jl
- How to Load *.npy Files
PyCall.jl
- How to Read *.csv Files
CSV.read()
- How to Output a 2D Array to a *.csv File
CSV.write()
- How to Read *.shp Files
Shapefile.Table()
- How to Open a Dialog Box to Select Files Like
file.choose()
open_dialog()
- How to Load Built-in Datasets Used in R
RDatasets.jl
- How to Use the Clipboard
clipboard()
,clipboard(x)
- How to Read Excel
*.XLSX
FilesXLSX.jl
Basic Syntax
- How to Perform Random Sampling
rand()
- Essential Julia Syntax: Broadcasting
f.(x)
- Julia’s Powerful Convenience Feature, Macros
@
- How to Use Greek Letters and Subscripts in Variable Names
\alpha
→α
- How to Use Elegant Loops
while
,for
,zip()
- Symbols
:foo
- Exclamation Mark Convention
foo!()
- Comprehensions
Advanced Syntax
- Difference Between
==
and===
- Lambda Expressions
foo -> bar
- How to Use the Pipe Operator
|>
- Ternary Operator
? :
- How to Print Data Without Truncation
show(stdout, "text/plain", foo)
- Metaprogramming
Meta.parse()
,eval()
- How to Execute External Programs
run()
- How to Use Progress Bars
ProgressMeter.jl
,ProgressBars.jl
- How to Send Emails via Naver
SMTPClient.jl
- How to Check the Operating System
Sys.iswindows
Splat Operator ...
- Splat Operator
...
- How to Define Variadic Functions
function f(x...)
- How to Convert Between 2D Arrays and Matrices
[eachrow(M)...]
,hcat(A...)
- Tips for Passing Optional Arguments Using Julia’s Splat Operator
foo(; args...)
Data Structures
- Array Slicing and Indexing
x[1:end]
,x[[1,3,4]]
- How to Check Struct Attributes
propertynames()
- Dictionaries and Pairs
Dict()
,x => y
- Set Data Type and Operators
Set
- Difference Between Vectors and Tuples
- Named Tuples
(; x, y)
- How to Change the Default Data Type
@changeprecision
- How to Convert Strings to Numbers
parse(type, str)
- How to Remove Duplicates from a Collection
unique()
,allunique()
Arrays
- How to Create an Empty Array
- How to Define an Array with a Specified Type
- Various Ways to Generate Vectors
- How to Directly Define High-Dimensional Vectors
- How to Compute Arrays Column-wise
- How to Shift Arrays
circshift()
- Multidimensional Indices
CartesianIndex
- Function to Access Elements in a Singleton Set
only
- Sorting Permutation Functions and Their Applications
sortperm
- Categorical Arrays
CategoricalArrays.jl
- Named Arrays
NamedArrays.jl
Strings
- How to Concatenate Strings
*
,string()
,join()
,^
- How to Conveniently Print Variable Values Using Interpolation
$string
- How to Manipulate Strings Like in Python
replace(, "a" => "A"), join(), split()
- How to Find Specific Pattern Positions in a String
findfirst(), findnext(), findlast()
- Built-in Functions to Style Text Output
printstyled()
DataFrames DataFrames.jl
- How to Create an Empty DataFrame
- How to Convert Between DataFrames and 2D Arrays
Array(df)
,DataFrame(array, :auto)
- How to Create a DataFrame with Variable Names as Column Names
DataFrame(; x, y)
- How to Summarize a DataFrame
describe()
- How to Modify Specific Values in a DataFrame
replace!(df, A=>B)
- How to Split and Compute DataFrames by Group
groupby()
,combine()
- How to View DataFrames Neatly in VSCode
Main.VSCodeServer.vscodedisplay(df)
Images Images.jl
- How to Rotate Image Arrays
imrotate()
- How to Resize Images
imresize()
- How to Load Images and Convert Them to Matrices
convert(Array{Float64},)
- How to Flip Images Vertically and Horizontally
rotr90(img')
Visualization
- List of Plot Properties
- How to Set Figure Size and Resolution
size=(w,h)
,dpi=
- How to Create Animations
@animate
- How to Create Plot Themes
RecipesBase.jl
- How to Change Default Plot Settings
default()
- How to Output Simple Plots in the Console
UnicodePlots.jl
- How to Adjust Camera Angles in 3D Plots
camera=(azimuth, elevation)
Rendering
- How to Add Lines to Plots
plot!(xs, ys)
- How to Output Plots with Transparent Backgrounds
background_color = :transparent
- How to Adjust Aspect Ratios
ratio = :equal
- How to Fill Areas Up to Specific Values/Between Two Curves/Inside Closed Curves
fill=()
- How to Plot Vector Fields
quiver(, quiver=)
Text
- How to Add Text to Plots
annotate!()
- How to Use $\TeX$ in Plots
LaTexStrings.jl
,L"$f(x)$"
- How to Add Korean Text to Plots
default(fontfamily = "")
,Plots.plotly()
- How to Adjust Legend Positions
legend = :topbottom
Style
- How to Share Axes with Different Scales in Plots
twinx()
,twiny()
- How to Style Grid Lines in Plot Backgrounds
- How to Change Axis Styles
framestyle
- List of Marker and Line Styles
plot(shape=, linestyle=)
- How to Draw Regression Lines in Scatter Plots
scatter(smooth = true)
- How to Use Pi Symbols on Axes
xtick = ([π, 2π], ["π", "2π"])
Color
- How to Use Colors
- How to Use Palettes
- How to Use Color Gradients
- Package for Color Processing
Colors.jl
- How to Specify Colors for Graph Elements
- How to Specify Colors for Axes, Axis Labels, Ticks, and Tick Labels
- How to Specify Background Colors
- How to Get Colors from a Color Scheme Using Values Between 0 and 1
get(colorschemes[:plasma], 1.0)
Layout
- How to Create Subplots Using Layouts
layout = (n,m)
- How to Add a Main Title to Subplots
plot_title = ""
Heatmaps
- How to Specify Color Ranges in Heatmaps
clim = (,)
- How to Output and Save Arrays as Heatmap Images
- How to Overlay Plots on Heatmaps
StatsPlots.jl
- How to Draw Dendrograms
- Macro to Omit DataFrame Names
@df
- How to Draw Box Plots
boxplot(data, labels="label")
Mathematics
You can find Graphs.jl
, a package related to Graphs (Networks), in the Graph Theory category.
Computation
- How to Perform Random Sampling with Weights
sample(, Weights())
- How to Round to Specific Decimal Places
round(digits=)
- How to Invert Bit Arrays
.!(foo)
- How to Count Frequencies
freqtable()
- How to Use Date and Time Functions
Dates
- How to Use Composite Functions
∘
- How to Use Infinity
∞
- How to Check Approximate Equality
≈
- How to Use Complex Numbers
im
- How to Compute the Mean Excluding Zeros or Missing Values
mean(!iszero,)
- Difference Between
Inf
andNaN
When Dividing by Zero - Comparison of
NaN
Values - 🔒 How to Perform Distributed Computing
@distributed
Libraries
- Linear Algebra Module
LinearAlgebra
- Polynomial Functions Package
Polynomial.jl
- Number Theory Package
Primes.jl
- Differential Calculus Package
Calculus.jl
- How to Compute Distance Matrices
Distances.jl
- Symbolic Computation Package
Symbolics.jl
- How to Perform Regression Analysis
GLM.jl
- Fourier Transform Package
FFTW.jl
- How to Use Infinite Arrays
InfiniteArrays.jl
- How to Perform Numerical Interpolation
Interpolations.jl
- How to Use Finite Differences
FiniteDifferences.jl
- Clustering Package
Clustering.jl
- How to Use Decision Trees
DecisionTree.jl
- Natural Language Processing Package
TextAnalysis.jl
Code Optimization Techniques
- Performance Comparison of
==
Operator with Characters and Integers - How to Optimize Distance Matrix Computations
pairwise()
- How to Truncate Decimal Places and Convert to Integers
trunc()
- How to Reference Subarrays Quickly
@views
- Short-Circuit Evaluation
&&
,||
Looking for Features Not Listed?
If you can’t find what you’re looking for in the posts, you might find it in the list below.
- Community
- Fresh Shrimp Sushi House Community 💬: The only Korean-language Julia community.
- Practical First Steps in Julia: Introduces several problems to help you get familiar with the basics of Julia.
- Practice Problems for Practical First Steps in Julia
- Advanced Course in Practical Julia: Learn about packages.
- Books
- First Semester in Numerical Analysis with Julia: Covers basic content in numerical analysis and how to implement it in Julia. You can download the PDF from the link.
- Julia Data Science: An online book released in November 2021. Available in English, Portuguese, and Chinese. Mainly covers
DataFrames.jl
and the visualization packageMakie.jl
. You can download the PDF from the link. - Algorithm for Optimization: Contains various methods for solving optimization problems and how to implement them in Julia. You can download the original or chapter PDFs from the link. A Korean translation titled Practical Optimization Algorithms (Understanding Optimization Algorithm Solutions with Julia) has been published in Korea.
- Packages
- JuliaDB.jl: A data processing library boasting high speed and memory management.
- Metatheory.jl: A library for metaprogramming and symbolic computation.
- Cairo.jl: A package offering powerful image creation capabilities. It differs from general visualization tools.
- Miscellaneous
- Profiler: Provides performance profiling similar to MATLAB.
- The Fast Track to Julia: A concise table summarizing Julia syntax.
- Julia?: A blog run by an individual who shares many advanced tips on using Julia.
All posts
- How to Swap the Horizontal and Vertical Axes in Julia
- How to Check the Operating System in Julia
- Julia Programming Language
- 줄리아의 타입과 애노테이션
- Installing and Using Packages in Julia
- Translating Arrays in Julia
- Various Methods of Creating Vectors in Julia
- Slicing and Indexing of Arrays in Julia
- Sets and Operators in Julia
- Functions for 2D Array Operations in Julia
- How to output and save arrays as heatmap images in Julia
- How to Rotate Image Arrays in Julia
- How to Change Image Size in Julia
- How to Load Images in Julia and Save Them as Matrices
- Lambda Expressions in Julia
- How to Use Pipe Operators in Julia
- Julia's Powerful Convenience Features, Macros
- How to Parallel Process in Julia
- Installing the Latest Version of Julia on Linux
- How to Create an Empty Array in Julia
- How to Compute Distance Matrices in Julia
- Making GIFs in Julia
- How to Use Composite Functions in Julia
- Changing the Number of Threads for parallel Computing in Julia on Linux
- How to Determine the Location of Code Files Executed in Julia
- Changing the Number of Threads for parallel Computing in Julia on Windows
- How to Read *.csv Files in Julia
- Converting Between DataFrames and 2D Arrays in Julia
- How to Use Hexadecimal RGB Codes (HEX) in Julia
- How to Install the Latest Version of Julia on Windows
- Solving \General\Registry.toml: No such file or directory when Installing Julia Packages
- Comparison of the Speed of the Equality Operator == for Characters and Integers in Julia
- How to Weight and Random Sample in Julia
- Optimizing Distance Matrix Calculations in Julia
- How to Flatten an Array in Julia
- Metaprogramming in Julia
- Using Julia in Windows CMD and PowerShell
- How to Conveniently Print Variable Values in Julia, Interpolation
- Writing Greek Characters and Subscripts in Julia Variable Names
- How to Output a 2D Array to a CSV File in Julia
- How to Calculate Distance using NearstNeibors.jl in julia
- Renaming Column Names of a DataFrame in Julia
- How to truncate decimal points and convert to an integer in Julia
- How to Read SHP Files in Julia
- How to Create an Array Filled with a Specific Value in Julia
- How to Find Derivatives in Julia
- Checking Struct Properties in Julia
- How to Use zfill() in Julia
- How to Specify Heatmap Color Ranges in Julia
- How to Round to a Specific Decimal Place in Julia
- How to Open a Dialog Box and Select a File Like file.choose() in Julia
- How to Invert a Bit Array in Julia
- The Difference Between == and === in Julia
- Methods for Coloring Up to a Certain Value from Curves in Julia / Between Two Curves / Inside a Closed Curve
- How to Make a Transparent Background in Graphics with Julia
- Performing Operations on Vectors of Different Sizes Component-wise in Julia
- Using TeX in Plots in Julia
- Overlaying Plots on Heatmaps in Julia
- How to load a npy file in Julia
- List of Available Commands in Julia Package Management Mode
- How to Use Elegant Loops in Julia
- How to Directly Define Multidimensional Arrays in Julia
- How to Check if Elements of an Array Belong to a List in Julia
- Symbols in Julia
- How to Refer to Both Index and Value in Julia's Loops
- How to Store Data like .mat in Julia
- From Julia: Dictionaries and Pairs
- How to Check Approximate Values in Julia
- Handling Strings in Julia like in Python
- Inserting Korean Text into Julia Plots
- How to Insert Text into a Julia Plot
- Hiding Specific Data Labels in Julia Plots
- Concatenating Strings in Julia
- How to Use Polynomials in Julia
- How to Use Factorization and Prime Number Functions in Julia
- How to Check if a Specific String is Contained in Julia
- How to Draw a Dendrogram in Julia
- How to Find a Specific Pattern Location in Julia Strings
- How to Perform Hierarchical Clustering in Julia
- How to Make Empty DataFrame in julia
- How to Install a Specific Version of a Package in Julia
- Using Infinity in Julia
- Inserting a New Row into a DataFrame in Julia
- How to Sort Dataframe in julia
- Inserting a Line into a Julia Set Image
- Adding a New Column to a DataFrame in Julia
- - Text Formatting Package in Julia
- Solving Broken Characters when Exporting CSV in Julia
- How to Adjust the Aspect Ratio of a Julia Set Picture
- Adjusting the Position of the Legend in Julia Plots
- Drawing Subplots with a Layout in Julia
- How to Delete Duplicate Rows in DataFrames in Julia
- grouping and Calculating DataFrames in Julia
- How to Create Art Styles in Julia
- How to Insert Vertical and Horizontal Lines in Figures in Julia
- How to Remove Specific Rows from a DataFrame in Julia
- How to Change the Basic Settings of a Julia Plot
- How to Check the Element Type Inside a Julia Container
- How to Define Variadic Functions in Julia
- Converting String to Number in Julia
- Executing External Programs in Julia
- Methods for Symbolic Computation in Julia
- How to Insert Command Line Arguments in Julia
- Differences in Array Dimensions in Julia, Python (NumPy, PyTorch)
- Julia's Named Tuples
- How to Create a DataFrame with Variable Names as Column Names in Julia
- How to Check DataFrame Size in Julia
- How to Handle Exceptions in Julia
- How to Check if an Array is Empty in Julia
- How to Check Package Versions in Julia
- How to Load a Built-in Dataset in R Used in Julia
- Julia's Categorical Array
- How to View Data Frame Summaries in Julia
- Reading Only Columns from a CSV File in Julia
- How to Calculate Frequency in Julia
- How to Change a Specific Value in a DataFrame in Julia
- Julia's Ternary Operator ? :
- How to Replace NaN with 0 in Julia DataFrames
- How to Write Conditional Statements Concisely in Julia
- How to Change Axis Style in Julia Plots `framestyle`e`
- How to Use Complex Numbers in Julia
- Creating Dictionaries from Arrays in Julia
- Julia's Broadcasting Syntax
- How to Quickly Reference Subarrays in Julia
- Julia's Exclamation Point Convention
- Julia's find functions
- Julia's Short Circuit
- Julia's Multidimensional Indices
- Distributed Computing in Julia
- How to Change Basic Data Types in Julia
- How to Use Fast Fourier Transform (FFT) in Julia
- Using Date and Time Functions in Julia
- How to Use the Linear Algebra Package in Julia
- How to Print Without Omitting Data in Julia
- Sampling Randomly in Julia
- Sampling Randomly from a Given Distribution in Julia
- How to Send an Email via Naver in Julia
- How to Convert between 2D Arrays and Matrices in Julia
- Specifying the Color of Axes, Axis Names, Ticks, and Tick Values in Julia Plots
- How to Calculate the Difference Between Two Times in Seconds in Julia
- Broadcasting of Multivariable Functions in Julia
- How to Create a Meshgrid in Julia
- How to Neatly Print without Axes, Scales, etc. in Julia
- How to Perform Regression Analysis in Julia
- Calculating the Mean Excluding 0 or Missing Values in Julia
- How to use progress bars in Julia
- How to Reference Environment Variables in Julia
- Removing Missing Values in DataFrames in Julia
- How to Initialize the Console in Julia
- How to Output Simple Graphics in the Julia Console
- Reading and Writing mat Files in Julia
- How to Use Infinite Arrays in Julia
- How to Draw a Box Plot in Julia
- How to Fix the Random Seed in Julia
- How to Adjust Camera Position for 3D Plots in Julia
- Drawing Arrows in Graphics with Julia
- How to Adjust the Size and Resolution of an Image in Julia
- How to Color Markers in a Julia Fractal
- How to k-means cluster in Julia
- How to Use Functions Defined in Other Files in Julia
- Omitting DataFrame Names in Julia StatsPlots with Macro @df
- Slicing Only a Part of Unicode Strings in Julia
- Julia's Splat Operator
- Tips for passing Optional Arguments through the Julia Splatt Operator
- The Difference Between Inf and NaN When Dividing by Zero in Julia
- Drawing a Regression Line on a Julia Plot
- List of Markers and Line Styles in Julia
- How to Use Circular Arrangements in Julia
- Calculating the Difference of Arrays in Julia
- Numerical Interpolation in Julia
- Decorating Text Output with Built-in Functions in Julia
- How to Use Finite Difference in Julia
- How to Use Colors in Julia Plots
- Package for Color Processing in Julia
- How to Remove Axis Values in Julia Plots
- How to Use RGB Color Codes in Julia
- Specifying the Color of Graph Elements in Julia Plots
- How to Add a Main Title in Julia Subplots
- How to Specify Graph Colors for Each Subplot in Julia Plots
- Specifying Background Color in Julia Plots
- How to Call a DataFrame without String7, String15 in Julia
- Decorating the Background Grid in Julia Plots
- List of Plot Properties in Julia Plots
- How to Plot Two Data Axes of Different Scales in Julia Plots
- How to Use Palettes in Julia Plots
- How to Use Color Gradients in Julia Plots
- Multiplying Matrices Row-wise and Column-wise with Scalar in Julia
- How to Normalize Matrices Column-wise in Julia
- How to Import Packages from Julia to R
- Referencing Specific Positions in an Array with Functions in Julia
- How to Draw Vector Fields in Julia
- Referencing Struct Properties as Functions in Julia
- Julia's Automatic Differentiation Package Zygote.jl
- How to Use Clustering Packages in Julia
- How to Remove Duplicates from a Collection in Julia
- How to Use Decision Trees in Julia
- How to Preview a DataFrame in vscode julia
- Functions for accessing elements of a singleton set in Julia
- Comparing NaN in Julia
- Differences Between Vectors and Tuples in Julia
- Application for sortperm in julia
- Methods for Calculating Arrays Column-wise in Julia
- Comprehensions in Julia
- How to Assess Code Performance, Benchmark in julia
- How to Define an Array by Specifying Its Type in Julia
- NamedArrays.jl Package in Julia
- How to Use Clipboard in Julia
- How to Flip Images Vertically and Horizontally in Julia
- Introduction to Julia's Symbolic Computing Package Symbolics.jl
- How to Pass Multiple Keyword Arguments at Once Using a Dictionary in Julia
- Introduction to the Julia Natural Language Processing Package TextAnalysis.jl
- Obtaining Colors with Values from 0 to 1 in the Julia Color Scheme
- How to Use the Symbol of Pi on the Axis in Julia
- How to Read Excel XLSX Files in Julia