[Question]: Making easier to add piped expression to qenv
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
Direzione di ricerca
Inizia confrontando il modo in cui le API esistenti qenv e within acquisiscono e validano le espressioni e il modo in cui get_code le renderizza. Esamina il workflow add_pipe proposto e la sua interazione con teal_data. Il lavoro è completato quando è possibile aggiungere una pipe incompleta e continuare attraverso più chiamate, rimandando la validazione fino alla terminazione dell’espressione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- R
- Stelle
- 11
- Fork
- 9
- Merge medio
- 6g 2h
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di insightsengineering/teal.data
-
Move to PharmaverseForse già presa @llrs-roche l’ha presa 37 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
insightsengineering/teal.data#392 ·
-
[Bug]: Can't find join_keys between indirectly linked datasetsForse già presa @gogonzo l’ha presa 364 giorni fa. Apertabug core
insightsengineering/teal.data#384 · 1 assegnatario ·
-
bug core enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
insightsengineering/teal.data#375 ·
-
bug core
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
insightsengineering/teal.data#374 ·
-
core enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
insightsengineering/teal.data#368 · 4 commenti ·
Tutte le issue di insightsengineering/teal.data
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
stan-dev/priorsense#150 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
xuzhougeng/wisp-science#1571 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
bennettoxford/opencodecounts#170 ·