Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Feature Request]: Extend `within` to accept a custom parameter that links all lines to a dataname

Đang mở
#200 12 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
r
Lĩnh vực
tooling

Hướng nghiên cứu

Bắt đầu bằng cách lần theo entry point within.qenv và so sánh output get_code của nó với hành vi @linksto hiện có của eval_code. Hoàn tất khi một giá trị links_to trong within.qenv liên kết mã expr liên quan với dataname được chỉ định và giữ nguyên kết quả get_code đã được minh họa; issue không nêu tên file hoặc test nào.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

core enhancement
Feature description

Extend within.qenv(data, expr, links_to = NULL, ...) so that links_to parameter will hint the code parser

The goal is that all the code in expr is hinted to one dataname (?or more?).

The get_code below would output the same code.

library(teal.code)
library(teal.data)

data_within <- teal_data() |> within({
  options("AN_OPTION" = iris)
  IRIS <- getOption("AN_OPTION")
}, links_to = "IRIS")

datanames(data_within) <- "IRIS"

get_code(data_within, datanames = "IRIS") |> cat()
#> IRIS <- getOption("AN_OPTION")

data_eval <- teal_data() |> eval_code("
  options(\"AN_OPTION\" = iris) # @linksto IRIS
  IRIS <- getOption(\"AN_OPTION\")
")

datanames(data_eval) <- "IRIS"

get_code(data_eval, datanames = "IRIS") |> cat()
#> options(AN_OPTION = iris)
#> IRIS <- getOption("AN_OPTION")

Created on 2024-02-20 with reprex v2.0.2

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
12
Fork
11
Merge trung bình
8 ngày 15 giờ
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của insightsengineering/teal.code

Tất cả issue của insightsengineering/teal.code

Issue tương tự

Thêm issue về R

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.