Skip to content

Commit 6138a11

Browse files
authored
Cleanup docs (#708)
Ensure that all exported methods are included in the manual, so that we can enable strict=true, which ensures that doctests pass. Update doctests to latest Julia version.
1 parent 7fcea24 commit 6138a11

File tree

14 files changed

+76
-41
lines changed

14 files changed

+76
-41
lines changed

docs/make.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ makedocs(
1010
modules = [StatsBase],
1111
pages = ["index.md",
1212
"weights.md",
13-
"means.md",
1413
"scalarstats.md",
1514
"robust.md",
1615
"deviation.md",
@@ -23,7 +22,9 @@ makedocs(
2322
"multivariate.md",
2423
"misc.md",
2524
"statmodels.md",
26-
"transformations.md"]
25+
"transformations.md"],
26+
strict=true,
27+
checkdocs=:exports
2728
)
2829

2930
deploydocs(

docs/src/counts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ addcounts!(r::AbstractArray, x::StatsBase.IntegerArray, levels::StatsBase.IntUni
1515
```@docs
1616
countmap
1717
proportionmap
18-
addcounts!{T}(cm::Dict{T}, x::AbstractArray{T})
18+
addcounts!(cm::Dict, x::Any)
1919
```

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ end
1212

1313

1414
```@contents
15-
Pages = ["weights.md", "means.md", "scalarstats.md", "robust.md", "deviation.md", "cov.md", "counts.md", "ranking.md", "sampling.md", "empirical.md", "signalcorr.md", "misc.md", "statmodels.md", "transformations.md"]
15+
Pages = ["weights.md", "scalarstats.md", "robust.md", "deviation.md", "cov.md", "counts.md", "ranking.md", "sampling.md", "empirical.md", "signalcorr.md", "misc.md", "statmodels.md", "transformations.md"]
1616
Depth = 2
1717
```
1818

docs/src/means.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs/src/robust.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
```@docs
44
trim
5+
trim!
56
winsor
7+
winsor!
68
trimvar
79
```

docs/src/sampling.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ The package provides functions for sampling from a given population (with or wit
77
```@docs
88
sample
99
sample!
10+
wsample
11+
wsample!
1012
```
1113

1214
## Algorithms

docs/src/scalarstats.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22

33
The package implements functions for computing various statistics over an array of scalar real numbers.
44

5+
## Weighted sum and mean
6+
7+
```@docs
8+
sum
9+
sum!
10+
wsum
11+
wsum!
12+
mean
13+
mean!
14+
```
15+
16+
## Means
17+
18+
The package provides functions to compute means of different kinds.
19+
20+
```@docs
21+
geomean
22+
harmmean
23+
genmean
24+
```
25+
526
## Moments
627

728
```@docs
@@ -21,6 +42,7 @@ span
2142
variation
2243
sem
2344
mad
45+
mad!
2446
```
2547

2648
## Z-scores

docs/src/statmodels.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ loglikelihood
2424
mss
2525
nobs
2626
nulldeviance
27+
nullloglikelihood
2728
r2
2829
rss
2930
score
@@ -47,3 +48,8 @@ predict
4748
predict!
4849
residuals
4950
```
51+
52+
An exception type is provided to signal convergence failures during model estimation:
53+
```@docs
54+
ConvergenceException
55+
```

docs/src/transformations.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,17 @@ in a single call.
4040
fit(::Type{UnitRangeTransform}, X::AbstractArray{<:Real,2}; unit::Bool=true)
4141
```
4242

43-
## Additional Methods
43+
## Methods
4444
```@docs
4545
StatsBase.transform
4646
StatsBase.transform!
4747
StatsBase.reconstruct
4848
StatsBase.reconstruct!
4949
standardize
5050
```
51+
52+
## Types
53+
```@docs
54+
UnitRangeTransform
55+
ZScoreTransform
56+
```

docs/src/weights.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ w = uweights(Float64, 3)
5454

5555
### `Weights`
5656

57-
The `Weights` type describes a generic weights vector which does not support all operations possible for `FrequencyWeights`, `AnalyticWeights` and `ProbabilityWeights`.
57+
The `Weights` type describes a generic weights vector which does not support all operations possible for `FrequencyWeights`, `AnalyticWeights`, `ProbabilityWeights` and `UnitWeights`.
5858

5959
```julia
6060
w = Weights([1., 2., 3.])
@@ -142,10 +142,12 @@ The following constructors are provided:
142142
AnalyticWeights
143143
FrequencyWeights
144144
ProbabilityWeights
145+
UnitWeights
145146
Weights
146147
aweights
147148
fweights
148149
pweights
149150
eweights
151+
uweights
150152
weights
151153
```

0 commit comments

Comments
 (0)