728x90

# SAS 에서 인터넷으로 데이터 불러오기

R 에서 인터넷으로 데이터 불러오기

1. SAS 에서 인터넷으로 데이터 불러오기

filename iris URL "https://archive.ics.uci.edu/ml/ machine-learning- databases/ iris/iris.data" ;

DATA a1;

LENGTH x1-x4 8. species $15;

infile iris dlm="," ;

input x1-x4 species $ ;

PROC PRINT;

RUN;

 

(1) filename iris URL "https://archive.ics.uci.edu/ml/ machine-learning- databases/ iris/iris.data" ;

        유명한 데이터 repository 인 UCI 에서 iris 데이터를 불러옴

 

(2) DATA a1;   # SAS 데이터셋 이름 지정

 

(3) LENGTH x1-x4 8. species $15;
         붓꽃의 꽃받침과 꽃잎의 길이와 폭... 붓꽃의 종류   변수의 길이 지정

 

(4) infile iris dlm="," ;

          데이터가 구분자 , 로 분리되어 있음

 

(4) input x1-x4 species $ ;  # 변수명 지정

PROC PRINT;

RUN;

 

2. R 에서 인터넷으로 데이터 불러오기

R에서는 간단하게 불러올 수 있습니다.

 

read.csv("archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data"

 

+ Recent posts