Native Shell
Native Shell은 모든 플랫폼의 앱 안에서 만들어지는 AI UI입니다
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