[Question]: Making easier to add piped expression to qenv
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
Bắt đầu bằng cách so sánh cách các API qenv và within hiện có thu nhận và xác thực các biểu thức, cũng như cách get_code render chúng. Xem xét workflow add_pipe được đề xuất và tương tác của nó với teal_data. Được xem là hoàn tất khi có thể nối thêm một pipe chưa hoàn chỉnh và tiếp tục nó qua nhiều lần gọi, trong khi việc xác thực được trì hoãn cho đến khi biểu thức kết thúc.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- R
- Star
- 11
- Fork
- 9
- Merge trung bình
- 6 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của insightsengineering/teal.data
-
Move to PharmaverseCó thể đã có người làm @llrs-roche đã nhận 37 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
insightsengineering/teal.data#392 ·
-
[Bug]: Can't find join_keys between indirectly linked datasetsCó thể đã có người làm @gogonzo đã nhận 363 ngày trước. Đang mởbug core
insightsengineering/teal.data#384 · 1 người được giao ·
-
bug core enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
insightsengineering/teal.data#375 ·
-
bug core
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
insightsengineering/teal.data#374 ·
-
core enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
insightsengineering/teal.data#368 · 4 bình luận ·
Tất cả issue của insightsengineering/teal.data
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
stan-dev/priorsense#150 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
bennettoxford/opencodecounts#170 ·
-
complexity::1-low effort::1-hours priority::3-could
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
jumpingrivers/audit.workbench#43 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
complexity::1-low effort::1-hours priority::3-could
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
jumpingrivers/audit.connect#71 ·
Maintainer thường phản hồi trong vòng 1 ngày