par(ask=TRUE) opar <- par(no.readonly=TRUE) # record current settings # Listing 11.1 - A scatter plot with best fit lines attach(mtcars) plot(wt, mpg, main="Basic Scatterplot of MPG vs. Weight", xlab="Car Weight (lbs/1000)", ylab=&q
par(ask=TRUE) opar <- par(no.readonly=TRUE) # make a copy of current settings attach(mtcars) # be sure to execute this line plot(wt, mpg) abline(lm(mpg~wt)) title("Regression of MPG on Weight") # Input data for drug example dose <- c(20, 3
本系列是一个新的系列,在此系列中,我将和大家共同学习R语言.由于我对R语言的了解也甚少,所以本系列更多以一个学习者的视角来完成. 参考教材:<R语言实战>第二版(Robert I.Kabacoff),书中所提到的John Cook的优秀博文,关于代码规范的<来自Google的R语言编码风格指南>. 目录 Part 1:图形参数 Unit 1:点型和线型 Unit 2:颜色 Unit 3:文本 Unit 4:图形尺寸与边界尺寸 Part 2:添加要素 Unit 1:添加标题和坐标轴标