change examples with help mode to avoid editor warnings
This commit is contained in:
13
README.md
13
README.md
@@ -68,10 +68,15 @@ line (assuming you have downloaded Julia 1.7.2 and extracted it to `/opt` folder
|
|||||||
## Organization of the code
|
## Organization of the code
|
||||||
|
|
||||||
The codes for each chapter are stored in files named *chXX.jl*, where *XX* is
|
The codes for each chapter are stored in files named *chXX.jl*, where *XX* is
|
||||||
chapter number. The only exception is chapter 14, where additionally a separate
|
chapter number. The exceptions are
|
||||||
*ch14_server.jl* is present along with *ch14.jl* (the reason is that in this
|
|
||||||
chapter we create a web service and the *ch14_server.jl* contains the
|
* chapter 14, where additionally a separate *ch14_server.jl* is present along
|
||||||
server-side code that should be run in a separate Julia process).
|
with *ch14.jl* (the reason is that in this chapter we create a web service and
|
||||||
|
the *ch14_server.jl* contains the server-side code that should be run in a
|
||||||
|
separate Julia process);
|
||||||
|
* appendix A, where the file name used is *appA.txt* because it also
|
||||||
|
contains other instructions than only Julia code (in particular package
|
||||||
|
manager mode instructions).
|
||||||
|
|
||||||
Solutions to the exercises that are presented in appendix B in
|
Solutions to the exercises that are presented in appendix B in
|
||||||
the book are stored in *appB.jl* file. These solutions assume that they are
|
the book are stored in *appB.jl* file. These solutions assume that they are
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ exit()
|
|||||||
|
|
||||||
# getting help
|
# getting help
|
||||||
|
|
||||||
?&&
|
- press ?
|
||||||
|
- write &&
|
||||||
|
- press Enter
|
||||||
|
|
||||||
# setting up the project environment for working with examples in the book
|
# setting up the project environment for working with examples in the book
|
||||||
# D:\\JuliaForDataAnalysis is an example folder
|
# D:\\JuliaForDataAnalysis is an example folder
|
||||||
7
ch02.jl
7
ch02.jl
@@ -49,8 +49,11 @@ Kamiński = 1
|
|||||||
x₁ = 0.5
|
x₁ = 0.5
|
||||||
ε = 0.0001
|
ε = 0.0001
|
||||||
|
|
||||||
?₁
|
# - change to help mode by pressing `?` key
|
||||||
?ε
|
# - type (or copy-paste) "₁" and press Enter
|
||||||
|
|
||||||
|
# - change to help mode by pressing `?` key
|
||||||
|
# - type (or copy-paste) "ε" and press Enter
|
||||||
|
|
||||||
# Code for listing 2.3
|
# Code for listing 2.3
|
||||||
|
|
||||||
|
|||||||
5
ch03.jl
5
ch03.jl
@@ -114,7 +114,10 @@ mean([1, 2, 3])
|
|||||||
# start a fresh Julia session before running this code
|
# start a fresh Julia session before running this code
|
||||||
using Statistics
|
using Statistics
|
||||||
using StatsBase
|
using StatsBase
|
||||||
?winsor
|
|
||||||
|
# - change to help mode by pressing `?` key
|
||||||
|
# - type "winsor" and press Enter
|
||||||
|
|
||||||
mean(winsor([8, 3, 1, 5, 7], count=1))
|
mean(winsor([8, 3, 1, 5, 7], count=1))
|
||||||
|
|
||||||
# Code for section 3.4
|
# Code for section 3.4
|
||||||
|
|||||||
7
ch04.jl
7
ch04.jl
@@ -60,7 +60,9 @@ end
|
|||||||
[std(aq[:, j]) for j in axes(aq, 2)]
|
[std(aq[:, j]) for j in axes(aq, 2)]
|
||||||
|
|
||||||
axes(aq, 2)
|
axes(aq, 2)
|
||||||
?Base.OneTo
|
|
||||||
|
# - change to help mode by pressing `?` key
|
||||||
|
# - type "Base.OneTo" and press Enter
|
||||||
|
|
||||||
[mean(view(aq, :, j)) for j in axes(aq, 2)]
|
[mean(view(aq, :, j)) for j in axes(aq, 2)]
|
||||||
[std(@view aq[:, j]) for j in axes(aq, 2)]
|
[std(@view aq[:, j]) for j in axes(aq, 2)]
|
||||||
@@ -97,7 +99,8 @@ function R²(x, y)
|
|||||||
end
|
end
|
||||||
[R²(aq[:, i], aq[:, i+1]) for i in 1:2:7]
|
[R²(aq[:, i], aq[:, i+1]) for i in 1:2:7]
|
||||||
|
|
||||||
?²
|
# - change to help mode by pressing `?` key
|
||||||
|
# - type (or copy-paste) "²" and press Enter
|
||||||
|
|
||||||
# Code for section 4.1.7
|
# Code for section 4.1.7
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user