Remove the situation column from `summary` when all_situations=FALSE
まだ誰も着手していません。
評価
調査の方向性
Start by locating the summary implementation and checking how all_situations=FALSE shapes its output. Compare the current and proposed outputs, including the suggestion about removing group, and check existing tests for summary behavior. Done means the returned data frame omits the requested redundant columns without changing the remaining statistics.
索引モデルが issue の本文から書いたものです。
説明
When using all_situations=FALSE (the default) in summary, we still get the "situation" column, which is just polluting the output data.frame because all values are set to "all_situations" anyway.
Example:
library(CroPlotR)
workspace <- system.file(
file.path("extdata", "stics_example_1"),
package = "CroPlotR"
)
sim <- SticsRFiles::get_sim(
workspace = workspace,
usms_file = file.path(workspace, "usms.xml")
)
obs <- SticsRFiles::get_obs(
workspace = workspace,
usm = situations,
usms_file = file.path(workspace, "usms.xml")
)
summary(sim,obs = obs, stats = c("EF", "RMSE"))
Returns:
# A tibble: 2 × 5
group situation variable EF RMSE
<chr> <chr> <chr> <dbl> <dbl>
1 Version_1 all_situations lai_n 0.636 0.631
2 Version_1 all_situations masec_n 0.871 0.945
I propose to remove the "situation" column in this case to get:
# A tibble: 2 × 5
group variable EF RMSE
<chr> <chr> <dbl> <dbl>
1 Version_1 lai_n 0.636 0.631
2 Version_1 masec_n 0.871 0.945
And in this case we should we also remove the "group" variable.
What we could do is:
if (length(unique(df$variable)) == 1){
select(df, -variable)
}
if (length(unique(df$group)) == 1){
select(df, -group)
}
- 主要言語
- R
- スター
- 1
- フォーク
- 3
- 平均マージ
- 9時間 41分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SticsRPacks/CroPlotR のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
SticsRPacks/CroPlotR#185 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
SticsRPacks/CroPlotR#180 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
SticsRPacks/CroPlotR#186 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 57/100
SticsRPacks/CroPlotR#181 ·
-
enhancement
難易度 3/5 半日 初心者へのやさしさ 64/100
SticsRPacks/CroPlotR#173 ·
SticsRPacks/CroPlotR の issue をすべて見る
似ている issue
-
1.7
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pharmaverse/admiral#3235 ·
メンテナーはふだん 2 日以内に返信
-
Typo: p.381オープン
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
rmcelreath/rethinking#482 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信