[R可視化]用ggplot2繪製函數圖像

library(ggplot2) #定義函數 f<-function(x) { y<-0.5*log((1-x)/x) d<-data.frame(x=x,y=y) return(d) } #seq(0,1,0.2) #[1] 0.0 0.2 0.4 0.6 0.8 1.0 #x是偏差率,通常0<x<0.5(若是x>0.5則不如直接用隨機猜想) x<-seq(0.005,0.5,0
相關文章
相關標籤/搜索