i******a 发帖数: 27 | 1 上学时用过 R,最近看书的时候,搞不清楚了。data (data name) 到底有什么作用啊?
比如
> library (faraway)
> data (pima)
> pima
> summary (pima)
好像省略 data (pima) 那一步也不影响后面其他命令啊,confused 中 | s*****n 发帖数: 2174 | 2 这个data() 很 confusing, 最好不要这样用. | i******a 发帖数: 27 | 3 啊,试了下,和我说的不是一样东西,改了。谢谢提醒
【在 s*****n 的大作中提到】 : 这个data() 很 confusing, 最好不要这样用.
| i******a 发帖数: 27 | 4 找到这段了,貌似有无 data (name) 不是很重要了?
As from R version 2.0.0 all the datasets supplied with R are available
directly by name. However, many packages still use the earlier convention in
which data was also used to load datasets into R, for example
data(infert)
and this can still be used with the standard packages (as in this example).
In most cases this will load an R object of the same name. However, in a few
cases it loads several objects, so see the on-line help for the object to
see what to ex | i******a 发帖数: 27 | |
|