我不断收到“类型为'closure'的对象不可子集”错误

时间:2020-05-05 01:39:29

标签: r r-markdown

我应该只选择“ EmplId.Empl.Rcd”,“ Bi.Weekly.Comp.Rate”,“ Age”,“ Ethnic.Grp”,“ Sex”,“ Full.Part”,“城市”,获取所有这些变量的摘要信息。确保“ EmplId.Empl.Rcd”,“性别”,“ Ethnic.Grp”为因子,“ Age”和“ Bi.Weekly.Comp.Rate”为数字。我这样做了,但是当我尝试将其编织到pdf时,我一直收到“类型为'closure'的对象不是子集的”错误。

 ```{r}
summary(raw$EmplId.Empl.Rcd)
class(raw$EmplId.Empl.Rcd)
summary(raw$Bi.Weekly.Comp.Rate)
class(raw$Bi.Weekly.Comp.Rate)
summary(raw$Age)
class(raw$Age)
raw$Age <- as.numeric(raw$Age)
class(raw$Age)
summary(raw$Ethnic.Grp)
class(raw$Ethnic.Grp)
summary(raw$Sex)
class(raw$Sex)
summary(raw$Full.Part)
class(raw$Full.Part)
summary(raw$City)
class(raw$City)
```

0 个答案:

没有答案