Omnigraph
그래프 엔진으로 컨텍스트를 조립하고, 객체 저장소 기반에서 에이전트가 코드처럼 그래프 데이터를 분기·타입·검토·병합·감사·거버넌스합니다
LASA 데이터 가져오기·정제 도구, 파일명으로 코드·파동 인식하고 라벨 적용
Tools for importing and cleaning data from the Longitudinal Aging Study Amsterdam (LASA). Detects the LASA file code and wave from a data files name, applies variable and value labels from a bundled d
데이터GitHub @Highmeadows온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
저장소 정보는 아직 수집하지 않았습니다.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
R package for importing and cleaning LASA data in R
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗CleanLASA helps you work with LASA (Longitudinal Aging Study Amsterdam)
data in R. LASA data comes as SPSS (.sav) files, and each file uses
its own short-hand variable names and numeric codes, which change
slightly from one measurement wave to the next. Reading such a file
with a generic tool like haven::read_sav() gives you a data frame of
bare numbers with no explanation of what they mean.
CleanLASA fixes that. Point it at a LASA .sav file and it:
4 reads as "married" instead of just 4;All of this metadata lives in one bundled database
(lasa_label_db()), hand-transcribed from LASA's own documentation
and shipped with the package. It gets more complete and more accurate
with every package update, and you can also patch your own local copy
with manual_update_lasa_labels() if something needs a quick, local
fix.
CleanLASA needs R 4.0 or later. Install the latest release (v1.0.0) from GitHub with:
# install.packages("remotes")
remotes::install_github("Highmeadows/[email protected]")
or the development version, with changes that haven't been released yet, with:
remotes::install_github("Highmeadows/CleanLASA")
See NEWS.md for what changed in each release.
The main function is read_lasa_sav(). Give it the path to a LASA
.sav file and it works out the rest from the file name -- reading the
file, matching its columns to LASA's documentation, attaching labels,
turning categorical variables into R factors, and renaming columns to
a name that's the same across every wave:
library(CleanLASA)
data <- read_lasa_sav("LASAB046.sav") # LASA wave B, file code 046
# Check whether anything didn't match:
lasa_label_report(data, problems_only = TRUE)
Z files such as LASAZOA1.sav store several waves side by side
(boak, coak, doak, ...). With format_as_long = TRUE you get
them in long format instead: one row per respondent per wave, with a
Wave column, a Time column counting the waves since the
respondent's baseline, and one oak column. transform_lasa_data()
converts any LASA data -- including merged files -- between long and
wide format:
oa <- read_lasa_sav("LASAZOA1.sav", format_as_long = TRUE)
oa_wide <- transform_lasa_data(oa, format = "wide") # boak, coak, ...
Not sure which file code you need? lasa_topics() searches LASA's
topics and themes for you, and lasa_var_info() opens LASA's own
documentation for a topic or file code:
lasa_topics(topic = "physical activity")
lasa_var_info("046")
This README is just a summary. The package
vignette
is a full, step-by-step tutorial that walks through every function with
worked examples -- how the file-name-based matching works, every option
read_lasa_sav() offers (fuzzy matching, name corrections, converting
to factors/numeric, standardizing names and labels across waves),
what's inside the label database, how to record your own corrections,
how to reshape data between long and wide format, and how to search
LASA's topic index and documentation. Start there if you're new to the
package.
| Function | Description |
|---|---|
read_lasa_sav() | Reads a LASA .sav file and labels it using lasa_label_db(), based on the wave/file code parsed from the file name |
apply_lasa_labels() | Applies lasa_label_db() labels to any data frame, resolving file code/wave explicitly or from stored provenance |
transform_lasa_data() | Transforms LASA data between wide format (one row per respondent, as in Z files) and long format (one row per respondent per wave, with Wave and Time columns) |
manual_update_lasa_labels() | Hand-corrects or adds a variable/value label in your local copy of the database |
restore_lasa_labels() | Undoes manual corrections (entirely, or scoped) and/or rebuilds the local database cache from the bundled one |
lasa_label_db() | Returns the label database currently in effect (bundled snapshot + any local updates) |
lasa_label_report() | Returns variables that could not be matched to the corresponding LASA documentation |
lasa_topics() | Searches the bundled LASA topic database for topics, themes, and file codes |
lasa_var_info() | Finds and opens a topic's or file code's variable-information PDF or LASA webpage, resolved live from the LASA website |
Full function reference and articles are available at: https://highmeadows.github.io/CleanLASA/