writing s4 output to csv

49 views
Skip to first unread message

Scott Harris

unread,
Feb 3, 2020, 3:35:44 PM2/3/20
to unmarked
Can anyone offer some suggestions or good resources for writing the output of unmarked S4 objects to a csv or txt file? I am trying to output a list of model results (using pcount) and also a list of results from the modSel function. Thanks for any suggestions.

Richard Chandler

unread,
Feb 3, 2020, 3:41:24 PM2/3/20
to unma...@googlegroups.com

Hi Scott,

 

You should convert the results to a data.frame first, and then export the data.frame using write.csv() or a similar function. See the example at the end the help page for modSel():

 

ms <- modSel(fl, nullmod="Null")
ms
 
coef(ms)                            # Estimates only
SE(ms)                              # Standard errors only
(toExport <- as(ms, "data.frame"))  # Everything

 

 

Richard

 

 

--

Richard Chandler

Associate Professor

Wildlife Ecology and Conservation

Warnell School of Forestry and Natural Resources

University of Georgia

http://chandlerlab.uga.edu/

 

From: Scott Harris
Sent: Monday, February 3, 2020 3:35 PM
To: unmarked
Subject: [unmarked] writing s4 output to csv

 

[External Sender]

Can anyone offer some suggestions or good resources for writing the output of unmarked S4 objects to a csv or txt file? I am trying to output a list of model results (using pcount) and also a list of results from the modSel function. Thanks for any suggestions.

--
You received this message because you are subscribed to the Google Groups "unmarked" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/unmarked/952c8b6d-b297-467f-b9f0-39d35801a6e0%40googlegroups.com.

 

Scott Harris

unread,
Feb 10, 2020, 11:20:32 PM2/10/20
to unmarked
Excellent. Thank you!
Scott
Reply all
Reply to author
Forward
0 new messages