User Tools

Site Tools


r:baseball_data

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
r:baseball_data [2017/06/05 08:56] hkimscilr:baseball_data [2017/06/05 11:37] hkimscil
Line 1: Line 1:
 +http://score.sports.media.daum.net/record/baseball/kbo/brnk.daum
 +http://www.koreabaseball.com/Record/Player/HitterBasic/Basic1.aspx
 +
 {{:r:baseball_performance.csv}} {{:r:baseball_performance.csv}}
 {{:r:17.3-1.txt}} {{:r:17.3-1.txt}}
Line 35: Line 38:
 {{:r:out_rate.png}} {{:r:out_rate.png}}
  
 +나이팅게일 챠트
 <code> <code>
-# 나이팅게일 챠트로 표현하기 
 data <- read.csv("주요선수별성적-2013년.csv", header=T) data <- read.csv("주요선수별성적-2013년.csv", header=T)
 data data
Line 45: Line 47:
 stars(data2,flip.labels=FALSE, draw.segment=TRUE, frame.plot=TRUE, full=TRUE,  stars(data2,flip.labels=FALSE, draw.segment=TRUE, frame.plot=TRUE, full=TRUE, 
      main=" 야구 선수별 주요 성적 분석-2013년 ")      main=" 야구 선수별 주요 성적 분석-2013년 ")
 +dev.copy(png, filename="baseball_ny.png")
 +dev.off()
  
-savePlot("baseball_ny.png",type="png") 
  
 label <- names(data2) label <- names(data2)
Line 52: Line 55:
 color <- c("black","red","green","blue","cyan","violet","yellow","grey") color <- c("black","red","green","blue","cyan","violet","yellow","grey")
 pie(val,labels=label,col=color, radius=0.1, cex=0.6) # 범례용 그래프 만들기 pie(val,labels=label,col=color, radius=0.1, cex=0.6) # 범례용 그래프 만들기
-savePlot("baseball_regend.png",type="png")+dev.copy(png, filename="baseball_regend.png") 
 +dev.off() 
 +</code>
  
 +{{:r:baseball_ny.png}}
 +{{:r:baseball_regend.png}}
 +
 +<code>
 #연봉대비 출루율과 연봉대비 타점율 표현하기 #연봉대비 출루율과 연봉대비 타점율 표현하기
  
Line 70: Line 79:
 par(new=T)  par(new=T) 
      
-plot(line2,type="o",axes=F, ylab="",xlab="",ylim=c(0,50),lty=2,col="red")+plot(line2,type="o",axes=F, ylab="",xlab="",ylim=c(0,50),lty=2,col="red",lwd=2)
 axis(4,las=1)  axis(4,las=1) 
 mtext(side=4,line=2.5,"연봉대비 타점율" mtext(side=4,line=2.5,"연봉대비 타점율"
Line 78: Line 87:
  
 legend(18,50,names(data[21:22]),cex=0.8,col=c("red","blue"),lty=1,lwd=2,bg="white") legend(18,50,names(data[21:22]),cex=0.8,col=c("red","blue"),lty=1,lwd=2,bg="white")
- 
-savePlot("baseball_4.png",type="png") 
- 
- 
  
 </code> </code>
 +{{:r:baseball_4.png}}
  
r/baseball_data.txt · Last modified: 2019/09/18 08:00 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki