有人可以帮我解决这段代码.在循环中,我将p值保存在f中,然后我想将p值写入文件,但我不知道用哪个函数写入文件.我写入函数出错了.
{
f = fisher.test(x, y = NULL, hybrid = FALSE, alternative = "greater",
conf.int = TRUE, conf.level = 0.95, simulate.p.value = FALSE)
write(f, file="fisher_pvalues.txt", sep=" ", append=TRUE)
}
Error in cat(list(...), file, sep, fill, labels, append) :
argument 1 (type 'list') cannot be handled by 'cat'
Run Code Online (Sandbox Code Playgroud)