我试图从R降价脚本创建一个pdf,其中写道:
test <- group_by(trials, SubjID)
number <- summarise(test, nsubj=n())
sum(number$nsubj != 12)
但是当我点击Knitpdf时,我收到以下错误:
error in eval(expr,envir,enclos): could not find function "group_by" Calls:
<Anonymous>...handle->withCallingHandlers->withVisible->eval->eval Execution halted
我安装了dplyr
,当我将信息发送到控制台时它会起作用,但是当我按下knitPDF
时却没有。