[Question]: Making easier to add piped expression to qenv
まだ誰も着手していません。
評価
調査の方向性
まず、既存の qenv API と within API が式をどのように取得・検証するか、また get_code がそれらをどのようにレンダリングするかを比較します。提案されている add_pipe ワークフローと teal_data との相互作用を確認します。完了条件は、不完全なパイプを追加して呼び出しをまたいで継続でき、式が終了するまで検証が遅延されることです。
索引モデルが issue の本文から書いたものです。
説明
What is your question?
With within is very easy to add a complete expression to qenv.
The pipe has the benefit of reducing the allocation of variables and removing a parameter as is passed implicitly and potentially make code more readable.
R users use/expect pipes (%>% and |> mostly) and often they are created step by step.
If the piped expression is not completed it results in an error, so module developers need to write first the complete expression and then add it to the qenv/teal_data:
library("qenv")
q <- within(qenv(), {
p <- penguins
})
within(q, {
p %>%
subset(!is.na(sex)) %>%
})
#> Error: unexpected '}' in:
#> " subset(!is.na(sex)) %>%
#> }"
It would be great if there were some method/function to be able to append an incomplete piped expression to be continued.
An idea:
q2 <- add_pipe(q, {p <- p %>% subset(!is.na(sex))}, pipe = "%>%")
cat(get_code(q2))
#> p <- penguins
#> p<- p %>% subset(!is.na(sex)) %>% { }
q3 <- add_pipe(q2, {head()}, pipe = "")
cat(get_code(q3))
#> p <- penguins
#> p <- p %>% subset(!is.na(sex)) %>% head()
Adding an empty character instead of the (default?) pipe could signal the end of the pipeable expression.
Only then the code would be verified.
Code of Conduct
- I agree to follow this project's Code of Conduct.
Contribution Guidelines
- I agree to follow this project's Contribution Guidelines.
Security Policy
- I agree to follow this project's Security Policy.
- 主要言語
- R
- スター
- 11
- フォーク
- 9
- 平均マージ
- 6日 2時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
insightsengineering/teal.data のほかの issue
-
question
難易度 3/5 半日 初心者へのやさしさ 62/100
insightsengineering/teal.data#395 ·
-
Move to Pharmaverse対応中かも @llrs-roche が 44 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
insightsengineering/teal.data#392 ·
-
[Bug]: Can't find join_keys between indirectly linked datasets対応中かも @gogonzo が 371 日前に担当しました。 オープンbug core
insightsengineering/teal.data#384 · 担当者 1 名 ·
-
bug core enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
insightsengineering/teal.data#375 ·
-
bug core
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
insightsengineering/teal.data#374 ·
insightsengineering/teal.data の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
make sure .Random.seed exists対応中かも @topepo が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
tidymodels/tune#1211 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
PecanProject/pecan#4183 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
Rate metrics miscompute list and tuple labels対応中かも @AryanRG が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Trusted-AI/AIF360#582 ·