-
SAS / SPSS File R에서 불러오기Computer Engineering/빅데이터 2023. 5. 4. 20:24
install.packages("sas7bdat") library(sas7bdat) setwd("H:/내 드라이브/[DAC]Lab/K-nhanes") hn21_allsas = read.sas7bdat('hn21_all.sas7bdat') library(dplyr) glimpse(hn21_allsas)
# SAS 파일을 R에서 불러오기 : sas7bdat
R 스튜디오에서 SAS 파일을 불러오기 위해 "sas7bdat"라는 패키지를 install
library(sas7bdat)
작업 환경을 불러오고자 하는 sas.file 이 있는 곳으로 지정 !
나 같은 경우에는 구글 드라이브 특정 파일 내에 따로 지정해두었다.
최종적으로 read.sas7bdat 를 통해 sas 파일 호출 !!
# SPSS 파일을 R에서 불러오기 : haven
"haven" 패키지 install
library(haven)
read_spss(" ")
install.packages("haven") library(haven) setwd("H:/내 드라이브/[DAC]Lab/K-nhanes") hn21_allspss = read_spss('hn21_all.sav') glimpse(hn21_allspss)
⊙ 이 글은 개인 공부를 목적으로 작성된 글입니다.
⊙ 내용에 대한 오류나 피드백 감사히 받고 있습니다 !
반응형'Computer Engineering > 빅데이터' 카테고리의 다른 글
R studio dplyr라이브러리 / ggplot2 기초 (0) 2023.05.07 빅데이터 처리 기술 (0) 2023.04.18 빅데이터 저장 및 관리 기술 (0) 2023.04.12 빅데이터 수집 및 통합 기술 (0) 2023.04.06 R studio Google Drive 연동 (0) 2023.03.25