Displaying 1 result from an estimated 1 matches for "poisson0".
Did you mean:
poisson
2008 Jun 29
1
function to export data
...function that allows me to export
automatically some results to a text file. I’ve tried the two following
approaches but none worked.
> exportdata<-function(x) {
+ dataexp<-summary(x)
+ export(dataexp,type="ascii",file="dataexp.txt")
+ }
> exportdata(glm.poisson0)
Error in eval(expr, envir, enclos) : object "dataexp" not found
exportdata2<-function(x) {
sink("exportdata2.txt")
summary(x)
sink()
}
> exportdata2(glm.poisson0) # the file is created but with no data in it.
Can anyone give me some hints on...