Native Shell
Native Shell:AI 生成的 UI,在你的應用中原生呈現,涵蓋每個平台。iOS、Android、macOS、Windows 與 Linux 上的應用、GPUI 應用與網頁在執行時載入已簽名、沙箱隔離的 TSX 模組並繪製 th
AI 翻譯
Work with vectors of age, period, and cohort labels. Infer the intervals underlying labels, and use this information to validate, reformat, and manipulate the labels. Common tasks such as filtering on
翻譯準備中
開發工具GitHub @bayesiandemography上線中營運者未確認
試用過了嗎? 點一下就好,不需要登入。
尚未收集儲存庫資訊。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
Work with labels for age groups, periods, and cohorts
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Work with age, period, and cohort labels.
install.packages("agetime")
Functions for
library(agetime)
Create a new set of labels.
period_labels_five(lower_first = 2001, lower_last = 2026)
#> [1] "2001-2006" "2006-2011" "2011-2016" "2016-2021" "2021-2026" "2026-2031"
Standardize existing labels.
x <- c("2003 to 2005", "2012--2015", "2000-2005")
period_standard(x)
#> [1] "2003-2005" "2012-2015" "2000-2005"
Calculate widths.
x <- c("10-14", "infants", "1-4")
age_width(x)
#> [1] 5 1 4
Filter and sort on age.
library(dplyr, warn.conflicts = FALSE)
df <- data.frame(
age = c("0-14", "100+", "15-39"),
count = c(100, 40, 200)
)
df
#> age count
#> 1 0-14 100
#> 2 100+ 40
#> 3 15-39 200
df |>
filter(age_lower(age) >= 15) |>
arrange(age_lower(age))
#> age count
#> 1 15-39 200
#> 2 100+ 40
vignette("agetime") for a quick startvignette("cookbook") for task-oriented recipesvignette("troubleshooting") for solutions to common problems?agetime for a full list of functions grouped by task