从特定的向量值

时间:2018-04-25 21:45:47

标签: r kable

所以我试图在数据集“mydata”中根据一组特定的值创建一个kable,在这种情况下是异常值,我找不到正确的上下文:

# this pulls out the outliers from the RATIO boxplot data
RT_outliers = (boxplot(mydata$RATIO, plot=FALSE)$out)

#below is my best shot so far as to how to create a table that 
#contains just the rows that have the outlier values
kable(mydata$[mydata$RATIO==RT_outliers])

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

在mydata之后的美元是问题 此外,您需要添加昏迷,因为您正在过滤行

# this pulls out the outliers from the RATIO boxplot data
RT_outliers = (boxplot(mydata$RATIO, plot=FALSE)$out)

#below is my best shot so far as to how to create a table that 
#contains just the rows that have the outlier values
kable(mydata[mydata$RATIO==RT_outliers,])