我正在尝试关注this site中某些R代码的示例,但我收到的错误如下所示。
>Results = RS_simulation(sims=5, params=params, budget=3000, designtype = "one factor", nmax = 20, nmin = 5, program="DESeq")
[1] "DESeq"
> plot(rownames(results),rowMeans(results, na.rm=T), main="DESeq simulations on Bottomly Dataset", xlab = "number of replicates", ylab = "Power")
Error in rowMeans(results, na.rm = T) :
'x' must be an array of at least two dimensions
我也试过这个命令,但得到这个:
> plot(rownames(results),rowMeans(results[, na.rm=T, drop=FALSE]), main="DESeq simulations on Bottomly Dataset", xlab = "number of replicates", ylab = "Power", drop=FALSE)
Error in results[, na.rm = T, drop = FALSE] :
object of type 'closure' is not subsettable
对此有何帮助?总是试图在R
做得更好答案 0 :(得分:0)
在原始作业声明中,您将RS_simulation()
调用的输出保存到名为Results
的变量中,然后尝试绘制来自results
的内容。 R区分大小写 - 一致的情况下你应该好好去。