diff --git a/README.md b/README.md index 7f9836f..ecc4a31 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,19 @@ using TableDistances using ScientificTypes # create an heterogeneous table -table = (a=1:5, b=rand(5), c=[:A,:B,:C]) +table = (a=1:3, b=rand(3), c=["A", "B", "C"], d=[1, 2, 4]) +(a = 1:3, b = [0.7596581938450753, 0.6952806574889876, 0.6669145844749085], c = ["A", "B", "C"], d = [1, 2, 4]) # adjust the scientific types -t = coerce(table, :a => Count, :b => Continuous, :c => Multiclass) +t = coerce(table, :a => Count, :b => Continuous, :c => Multiclass, :d => OrderedFactor) +(a = 1:3, b = [0.7596581938450753, 0.6952806574889876, 0.6669145844749085], c = CategoricalArrays.CategoricalValue{String, UInt32}["A", "B", "C"], d = CategoricalArrays.CategoricalValue{Int64, UInt32}[1, 2, 4]) # compute the pairwise distance between rows D = pairwise(TableDistance(), t) +3×3 Matrix{Float64}: + 0.0 1.09707 1.75 + 1.09707 0.0 0.902927 + 1.75 0.902927 0.0 ``` Default distances from various packages such as