objects.size()

objects()


脚本举例

#将以下代码粘贴到编辑器中,另存为regression.r文件。
rate<-c(20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42)
impurity <-c(8.4, 9.5, 11.8, 10.4, 13.3, 14.8, 13.2, 14.7, 16.4, 16.5, 18.9, 18.5)
plot(impurity~rate)
reg<-lm(impurity~rate)
abline(reg,col="red")
summary(reg)

运行脚本
 
三种运行方式
1 通过source()函数运行
source("d:/regression.r")
2 通过R脚本编辑器运行
路径:RGui>File>Open Script   #Ctrl+R运行
3 直接粘贴到R控制台
ctrl+c, ctrl+v
第三种最为简单直接
 

相关文章:

  • 2022-01-20
  • 2021-12-30
  • 2022-01-10
  • 2021-09-04
  • 2021-12-04
  • 2021-11-23
  • 2022-12-23
  • 2021-07-23
猜你喜欢
  • 2021-07-25
  • 2022-01-05
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案