coercing unmarkedFitColExt

50 views
Skip to first unread message

Kyle Van den Bosch

unread,
Feb 26, 2016, 11:00:55 AM2/26/16
to unmarked
Hello All,

Not sure if this is an unmarked question or just a R question, but I figure this group could answer both.

I want to write a colext results to a csv. I can identify the information with this:  models@fits[ms@Full$delta=='0']

I tried using as() to coerce it to a data.frame, but to no avail. A closer look shows that the output class is unmarkedFitColExt.

showMethods(coerce) doesn't present any available coercion methods. How can I make this output "writable" 

Thank you
Kyle 

Mazerolle, Marc J.

unread,
Feb 26, 2016, 11:15:28 AM2/26/16
to unma...@googlegroups.com
Hi Kyle,

if you want to save the entire results (the entire object), you can use save(your.object, file = "your.filename"). To import the results back into R during a later session, just use load(file = "your.filename"). Otherwise, if you really want a data.frame, you will have to extract only the portion of the results of interest to you and convert them to a data.frame.

Best,

Marc

--
____________________________________
Marc J. Mazerolle
Département des sciences du bois et de la forêt
2405 rue de la Terrasse
Université Laval
Québec, Québec G1V 0A6, Canada
Tel: (418) 656-2131 ext. 7120
Email: marc.ma...@uqat.ca

De : unma...@googlegroups.com [unma...@googlegroups.com] de la part de Kyle Van den Bosch [findno...@gmail.com]
Envoyé : vendredi 26 février 2016 11:00
À : unmarked
Objet : [unmarked] coercing unmarkedFitColExt

--
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.
For more options, visit https://groups.google.com/d/optout.

Dan Linden

unread,
Feb 26, 2016, 11:27:11 AM2/26/16
to unmarked
Alternatively, assuming that "ms" is a modSel object, you can write this object (or subsets of it) to csv directly:

write.csv(ms@Full,file="ms.csv")
write.csv(ms@Full[ms@Full$delta==0,],file="ms_d0.csv")

Richard Chandler

unread,
Feb 26, 2016, 11:39:07 AM2/26/16
to Unmarked package
There are some other options shown at the bottom of the help page for modSel():

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

--
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.
For more options, visit https://groups.google.com/d/optout.



--
Richard Chandler
Assistant Professor
Warnell School of Forestry and Natural Resources
University of Georgia

Kyle Van den Bosch

unread,
Feb 26, 2016, 3:31:21 PM2/26/16
to unmarked
Thank you for your quick and extremely helpful suggestions. All of them worked great! Enjoy the weekend!
Reply all
Reply to author
Forward
0 new messages