是否有一个函数可以打印关于作为从库或包加载的数据集的一部分的变量的描述/详细信息(变量代表什么,它的单位是什么等)?
注意:我正在使用 jupyter 笔记本。
有没有办法检查数据集是否有内置信息?
我已经从库 (ISLR) 中加载了“R 统计学习简介”一书的数据集。
我想查看“College”数据集中包含的变量的描述,例如:Top10perc、Outstate 等。
# load library
library(ISLR)
df = College # saved data with a generic name 'df'
例如:(从包 ISLR的pdf
中
获得此描述)
__College__
U.S. News and World Report’s College Data
__Description__
Statistics for a large number of US Colleges from the 1995 issue of US News and World Report.
__Format__
A data frame with 777 observations on the following 18 variables.
Private A factor with levels No and Yes indicating private or public university
Apps Number of applications received
Accept Number of applications accepted
Enroll Number of new students enrolled
Top10perc Pct. new students from top 10% of H.S. class
Top25perc Pct. new students from top 25% of H.S. class
F.Undergrad Number of fulltime undergraduates
P.Undergrad Number of parttime undergraduates
Outstate Out-of-state tuition
Room.Board Room and board costs
Books Estimated book costs
Personal Estimated personal spending
PhD Pct. of faculty with Ph.D.’s
Terminal Pct. of faculty with terminal degree
S.F.Ratio Student/faculty ratio
perc.alumni Pct. alumni who donate
Expend Instructional expenditure per student
Grad.Rate Graduation rate