# I'm doing a pairwise.t.test on a large dataset and need the output in a
data frame so I can work further with it, e.g. so I can export it to a
spreadsheet. Is there any way to coerce the results to an exportable format?

# For example, if I do:

test <- pairwise.t.test(numbers, factors, p.adj="bonferroni")

# and then

write.table(test, file="output.csv", sep=",")

# I get the error

# Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors =
stringsAsFactors) :
  cannot coerce class "pairwise.htest" into a data.frame

	[[alternative HTML version deleted]]


