[R_bigdata] 웹 상의 데이터를 읽는 방법과 엑셀의 데이터를 읽을 수 없는 이유, 결측치
웹 상의 데이터를 읽는 방법과 엑셀의 데이터를 읽을 수 없는 이유 데이터의 형태에 따라 read.table, read.csv 를 이용하여 웹 의 절대경로를 통해 조회할 수 있다. 한편 엑셀의 데이터는 보안상의 이유로 위와 동일한 방식으로 읽는 것이 거의 불가하다. NA(결측치)의 여부를 탐색할 수 있는 메소드인 is.na() 를 통해 결측치값이 존재하는지 파악하고, NA를 대신할 값을 대입할 수 있다. #day03_03_file.R mem<- read.table('https://raw.githubusercontent.com/luxdolorosa/data_set/master/etc/member_yes_sep2.txt',header=TRUE,sep=',') mem #read.csv는 read.table에서 sep=','와 header=TRUE 옵션이 기본인 함수이다. read.csv('https://raw.githubusercontent.com/luxdolorosa/data_set/master/etc/member_yes_sep2.txt') fruits <- read.csv('https://raw.githubusercontent.com/luxdolorosa/data_set/master/etc/fruits.csv') fruits fruits <- read.csv('https://raw.githubusercontent.com/luxdolorosa/data_set/master/etc/fruits.csv', row.names = '순번' ) #기본 열이름 지정, 여기서 순번은 no에 해당된다. # fruits <- read.csv('https://raw.githubusercontent.com/luxdolorosa/data_set/master/etc/fruits.csv',row.names = '남은수량'...