2016-05-13

빅데이터 분석

조인호 강사
SAS 강좌와 통계컨설팅
============1일차============
[1.R 설치와 기본사용법]
1.R의 특징
1)1995년 뉴질랜드 오클랜드 대학의 로스 이하카와 로버트 젠틀맨 교수에 의해 개발
2)사이트
https://www.r-project.org/
-CRAN에서 프로그램 다운로드
-MANUAL에서 PDF문서 다운로드
-PACKAGES에서 최근 등록된 패키지 확인
-TASK VIEWS : 33개의 TASK로 분류
http://www.rstudio.com
-R개발환경 IDE 다운로드(RStudio Desktop 0.99.896),상업용도는 1년 $999
http://www.r-bloggers.com/
3)무료
4)윈도우,유닉스,,맥에 사용가능,자바,포트란 프로그램과도 연동 가능
2.R-Studio 설치와 실습
1)실행방법 : Ctrl+Enter 또는 RUN
2)인코딩 설정 : Tools -> Global Options -> Code -> Saving -> UTF8확인

[2.R 패키지 다루기]
1.주요명령어
library() #설치된 패키지 살펴보기
installed.packages() #설치된 패키지 살펴보기
search() #로드된 패키지 보기
library(MASS) #패키지 MASS 메모리 로드
search() #로드된 패키지 보기
detach(package:MASS) #패키지MASS 언로드 하기
search() #로드된 패키지 보기
library(ggplot2) #패키지 ggplot2 메모리 로드
install.packages("ggplot2") #패키지 ggplot2를 PC에 설치
library(ggplot2) #패키지 ggplot2 메모리 로드
search() #로드된 패키지 보기
detach("package:ggplot2") #ggplot2 메모리에서 언로드
search()  #로드된 패키지 보기
remove.packages("ggplot2") #설치된 패키지 디스크에서 제거하기
help(package=MASS) #패키지 MASS 도움말 보기
library(help=MASS) #패키지 MASS 도움말 보기
data(package="MASS") #패키지 MASS에 들어있는 데이터셋보기
library(help=stats) #패키지 stats에 들어있는 함수보기
iris #iris 데이터셋 보기
Titanic #Titanic 데이터셋 보기
mtcars #mtcars 데이터셋 보기
data(iris) #iris 로드
class(iris) #데이터 타입 =>"data.frame"
dim(iris) #데이터 크기 => 150 5
length(iris) #변수의 개수 => 5
names(iris) #변수의 이름 => "Sepal.Length" "Sepal.Width"  "Petal.Length" "Petal.Width"  "Species" 
colnames(iris) #변수의 이름
str(iris) #데이터의 구조
attributes(iris) #데이터의 속성
head(iris) #앞 6개의 관측치
tail(iris) #마지막 6개의 관측치
head(iris,n=100) #앞 100개의 관측치
hist(iris$Sepal.Length) #iris 데이터셋 히스토그램
plot(iris$Sepal.Length,iris$Sepal.Width) #iris 데이터셋 2차원 그래프(plot)
boxplot(iris$Sepal.Length) #iris 데이터셋 박스플롯(boxplot)와 빈도(table)
table(iris$Species) #변수 iris$Species의 빈도수 구하기
help(Titanic) #Titanic 데이터셋 살표보기
help(mtcars) #mtcars 데이터셋 살펴보기

[3.R 데이터 객체  : 백터, 행렬, 배열, 데이터프레임,리스트]
1.데이터를 다루는 데이터형

[4.R 프로그래밍]
[5.그래픽 다루기]

============2일차============
[1.R과 통계학]]
[2.설문지작성과 통계적 분석기법]
[3.확률분포의 종류]
[4.정규분포와 신뢰구간]
[5.평균에 대한 분석]
[6.분산에 대한 분석]
============3일차============
[1.t검증]
[2.분산분석법(ANOVA)]
[3.상관분석]
[4.회귀분석]
[5.카이자승법]
[6.로지스틱 회귀분석]
[7.주성분분석]
[8.판별분석,Decision Tree]
[9.군집분석,KNN]

댓글 없음:

댓글 쓰기