开始使用免费开始使用

Hmisc describe 输出

psych 包类似,Hmisc 包会生成定制化的输出。str() 函数将显示定制的类类型以及存储在 Hmisc::describe() 列表输出中的各元素名称。

由于输出是列表,您可以使用 $ 选择器运算符从 Hmisc::describe() 输出对象中提取特定元素。

abaloneKeep 数据集以及 dplyrHmisc 包已为您加载。

本练习是课程的一部分

面向 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
___
编辑并运行代码