繪製年數、身體質量指數散佈圖調換為藍色圖例(,pch=17,col=c("blue"))加上圖表題目(,main="1101's BMI"),並插手紅色趨向虛線( 翻譯公司lty=5,col=c("red"))。
。-> 翻譯社|,-> 翻譯公司|的-> 翻譯繪製年紀體重漫衍圖改變圖例,並到場綠色趨向線。
plot(age 翻譯公司height)
abline(lm(height~age))
age <- c(6 翻譯公司6.5 翻譯公司7 翻譯公司7.5,8,8.5,9,9.5 翻譯公司10 翻譯公司10.5 翻譯公司11,11.5)
height<-c(116,119,122.6 翻譯公司124.4 翻譯公司127.8,130,132.7,133.7,136.4,137.6 翻譯公司141.3,145)
weight <- c(19.8,22.1 翻譯公司22,22,23.4,25.7,25.4,27.5 翻譯公司25.9,27.6,28.5,31)
http://rextester.com/l/r_online_compiler
#國小R語言教材
plot(age,weight,pch=8)
R說話繪製身高體重趨線圖(XY漫衍圖)
abline(lm(weight~age),col=c("green"))
height=height/100
BMI=weight/(height*height)
plot(age,BMI,pch=17,col=c("blue"),main="1101's BMI")
abline(lm(BMI~age),lty=5 翻譯公司col=c("red"))
繪製年數身高漫衍圖,並插手趨向線 翻譯社
本篇文章引用自此: http://blog.xuite.net/cariahwang0418/0418/552842938-R%E8%AA%9E%E8%A8%80%E7%B9%AA%E8%A3%BD%有關翻譯的問題歡迎諮詢天成翻譯社
文章標籤
全站熱搜