gtools is orphaned - Consider a replacement?
まだ誰も着手していません。
評価
調査の方向性
inst/ShinyStan/server_files/utilities/make_param_list_with_groups_sort.R から始めて、gtools::mixedsort() の使用箇所を調べます。Issue にある数値文字列の例に対する置き換えの動作を比較します。完了条件は、孤立した依存関係が不要になり、パラメーター名が意図どおり数値順にソートされることです。
索引モデルが issue の本文から書いたものです。
説明
Hi shinystan team,
We noticed that gtools is orphaned https://cran.r-project.org/web/packages/gtools/index.html, we were wondering if you'd consider replacing your usage of it with something else.
It seems that you use gtools::mixedsort() to ensure that sorting is done correctly with respect to numeric character strings.
I'm not sure the comment there is correct, because sort() works as you expect on that specific example. However, it does matter when you sort strings like c("1", "2", "10") because the 10 will come before the 2 with typical sort methods. You could use stringi instead of gtools for this purpose if you are looking for a good replacement:
# Small numbers aren't a problem with base sort()
x <- c("beta[1,1]", "beta[1,2]", "beta[2,1]", "beta[2,2]")
sort(x)
#> [1] "beta[1,1]" "beta[1,2]" "beta[2,1]" "beta[2,2]"
gtools::mixedsort(x)
#> [1] "beta[1,1]" "beta[1,2]" "beta[2,1]" "beta[2,2]"
# Maybe it was for this?
x <- c("beta[1,1]", "beta[2,1]", "beta[10,1]")
sort(x)
#> [1] "beta[1,1]" "beta[10,1]" "beta[2,1]"
gtools::mixedsort(x)
#> [1] "beta[1,1]" "beta[2,1]" "beta[10,1]"
# You can sort that "correctly" with stringi instead
stringi::stri_sort(x, numeric = TRUE)
#> [1] "beta[1,1]" "beta[2,1]" "beta[10,1]"
Created on 2022-06-16 by the reprex package (v2.0.1)
- 主要言語
- R
- スター
- 200
- フォーク
- 47
- 平均マージ
- 1日 17時間
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stan-dev/shinystan のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
Rocker script?オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
stan-dev/shinystan の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
ropensci-review-tools/pkgstats#136 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Soft restart fails when a dependent domain's parameter is inactive対応中かも @Saethox が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
MLopez-Ibanez/irace#103 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
make sure .Random.seed exists対応中かも @topepo が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
tidymodels/tune#1211 ·