title: writing p-values to file in R
body: <p>Can someone help me with this piece of code. In a loop I'm saving p-values in f and then I want to write the p-values to a file but I don't know which function to use to write to file. I'm getting error with write function.</p>
  
  <pre><code>{
  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'
  </code></pre>