From 1cdf62f7ff1b21612cbb179c7537385e2da11235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20Hoffimann?= Date: Thu, 14 Apr 2022 10:26:19 -0300 Subject: [PATCH] Drop TableOperations.jl --- Project.toml | 6 ++---- src/TableDistances.jl | 1 - src/normalizations.jl | 8 ++++---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Project.toml b/Project.toml index f9d10fe..70c683f 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "TableDistances" uuid = "e5d66e97-8c70-46bb-8b66-04a2d73ad782" authors = ["Júlio Hoffimann ", "José Augusto "] -version = "0.1.4" +version = "0.2.0" [deps] CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597" @@ -10,16 +10,14 @@ Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" ScientificTypes = "321657f4-b219-11e9-178b-2701a2544e81" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StringDistances = "88034a9c-02f8-509d-84a9-84ec65e18404" -TableOperations = "ab02a1b2-a7df-11e8-156e-fb1833f50b87" Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" [compat] CategoricalArrays = "0.10" -CoDa = "0.7, 0.8, 0.9" +CoDa = "0.10" Distances = "0.10" ScientificTypes = "2.3, 3.0" StringDistances = "0.11" -TableOperations = "1.1" Tables = "1.5" julia = "1.6" diff --git a/src/TableDistances.jl b/src/TableDistances.jl index 0e4a486..f0055fc 100644 --- a/src/TableDistances.jl +++ b/src/TableDistances.jl @@ -6,7 +6,6 @@ module TableDistances # basic imports using Tables -using TableOperations using ScientificTypes using Distances using Statistics diff --git a/src/normalizations.jl b/src/normalizations.jl index adf2641..3102885 100644 --- a/src/normalizations.jl +++ b/src/normalizations.jl @@ -11,10 +11,10 @@ default_normalization(::Type{<:Compositional}) = default_normalization(::Type) = nothing function normalize(tables...) - partitions = Tables.partitioner(collect(tables)) - longtable = TableOperations.joinpartitions(partitions) - colnames = Tables.columnnames(longtable) - scitypes = schema(longtable).scitypes + rtables = Tables.rowtable.(tables) + longtable = Tables.columntable(reduce(vcat, rtables)) + colnames = Tables.columnnames(longtable) + scitypes = schema(longtable).scitypes constants = map(zip(colnames, scitypes)) do (c, s) x = Tables.getcolumn(longtable, c)