Hmisc describe 输出
与 psych 包类似,Hmisc 包会生成定制化的输出。str() 函数将显示定制的类类型以及存储在 Hmisc::describe() 列表输出中的各元素名称。
由于输出是列表,您可以使用 $ 选择器运算符从 Hmisc::describe() 输出对象中提取特定元素。
abaloneKeep 数据集以及 dplyr 和 Hmisc 包已为您加载。
本练习是课程的一部分
面向 SAS 用户的 R
练习说明
- 使用
Hmisc::describe()对鲍鱼的 whole weight、shucked weight 和 shell weight 生成结果,并将输出保存为abhmisc。 - 显示
abhmisc的结构。 - 显示
abhmisc输出对象中的shuckedWeight元素。 - 显示
abhmisc输出对象中shuckedWeight元素下的extremes元素。
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Save output from Hmisc::describe(), view class of output
abhmisc <- ___ %>%
___ %>%
___
# Get structure of abhmisc
___
# View shuckedWeight statistics from abhmisc
___
# View shuckedWeight extremes from abhmisc
___