<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Dear Aaron,<div class=""><br class=""></div><div class=""> I believe that the error is because the two matrices are read as data.frames and the values in them are not numeric. Maybe you can force Y to be a matrix by typing:</div><div class=""><br class=""></div><div class=""> Y <- as.matrix(Y)</div><div class=""><br class=""></div><div class=""> Let me know if that works.</div><div class=""><br class=""></div><div class=""> Best,</div><div class=""><br class=""></div><div class=""> Fernando<br class=""><div class="">
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">_________________________________<br class=""><br class="">Fernando Colchero<br class="">Associate Professor<br class="">Department of Mathematics and Computer Science<br class="">Interdisciplinary Center on Population Dynamics<br class=""><br class="">Tlf. +45 65 50 23 24<br class=""><a href="mailto:colchero@imada.sdu.dk" class="">Email colchero@imada.sdu.dk</a><br class="">Web www.sdu.dk/staff/colchero<br class="">Pers. web www.colchero.com<br class="">Adr. Campusvej 55, 5230, Odense, Dk<br class=""><br class="">University of Southern Denmark<br class="">_________________________________</div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On 13 Feb 2019, at 22.42, Aaron Reedy <<a href="mailto:amr3mb@virginia.edu" class="">amr3mb@virginia.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div dir="ltr" class=""><div class="">I just resubmitted now that I am registered on the mailing list.</div><div dir="ltr" class=""><br class=""></div><div dir="ltr" class=""><br class=""></div><div dir="ltr" class="">I'm new to BaSTA and am a pretty novice R user. I think my question might be general to R and not specific to BaSTA. Either way, I am hoping the community can point me in the right direction. <div class=""><br class=""></div><div class="">My dataset is 7700 lizards captured over 42 months in a closed island population. There were 4 sampling periods in each year and the sampling was close to 90% of the population captured during each sampling period (7-12 days). The vast majority of animals had lifespans shorter than 12 months. </div><div class=""><br class=""></div><div class="">I first constructed my Capture History, Birth/Death Matrix, and Covariate Matrix (sex data for each individual). </div><div class=""><br class=""></div><div class="">Then I merged the matrices with:</div><div class=""><div class="">inputMat <- merge(birthDeath, Y, by.x = "ID", by.y = "ID")</div><div class="">inputMat <- merge(inputMat, covMat, by.x = "ID", by.y = "ID")</div><div class=""><br class=""></div><div class="">Things seem to work OK there. I view inputMat and everything looks as it should. </div><div class=""><br class=""></div><div class="">Then when I run DataCheck with:</div><div class="">newData <- DataCheck(inputMat, studyStart = 4, studyEnd = 46, autofix = rep(1, 7), silent = FALSE)<br class=""></div><div class=""><br class=""></div><div class="">I get the following error:</div><div class="">Error in rowSums(Y) : 'x' must be numeric<br class=""></div><div class=""><br class=""></div><div class="">Can someone help me work on this error? </div><div class=""><br class=""></div><div class="">Thanks for having a look at this. </div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 13, 2019 at 4:39 PM Aaron Reedy <<a href="mailto:amr3mb@virginia.edu" class="">amr3mb@virginia.edu</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class="">I'm new to BaSTA and am a pretty novice R user. I think my question might be general to R and not specific to BaSTA. Either way, I am hoping the community can point me in the right direction. <div class=""><br class=""></div><div class="">My dataset is 7700 lizards captured over 42 months in a closed island population. There were 4 sampling periods in each year and the sampling was close to 90% of the population captured during each sampling period (7-12 days). The vast majority of animals had lifespans shorter than 12 months. </div><div class=""><br class=""></div><div class="">I first constructed my Capture History, Birth/Death Matrix, and Covariate Matrix (sex data for each individual). </div><div class=""><br class=""></div><div class="">Then I merged the matrices with:</div><div class=""><div class="">inputMat <- merge(birthDeath, Y, by.x = "ID", by.y = "ID")</div><div class="">inputMat <- merge(inputMat, covMat, by.x = "ID", by.y = "ID")</div><div class=""><br class=""></div><div class="">Things seem to work OK there. I view inputMat and everything looks as it should. </div><div class=""><br class=""></div><div class="">Then when I run DataCheck with:</div><div class="">newData <- DataCheck(inputMat, studyStart = 4, studyEnd = 46, autofix = rep(1, 7), silent = FALSE)<br class=""></div><div class=""><br class=""></div><div class="">I get the following error:</div><div class="">Error in rowSums(Y) : 'x' must be numeric<br class=""></div><div class=""><br class=""></div><div class="">Can someone help me work on this error? </div><div class=""><br class=""></div><div class="">Thanks for having a look at this. </div><div class=""><br class=""></div><div class="">Aaron</div><div class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail-m_-546610703345263650gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class="">Aaron M. Reedy<div class=""><br class=""></div><div class="">NSF Postdoctoral Research Fellow in Biology</div><div class=""><br class=""></div><div class=""><a href="http://www.aaronmreedy.com/" style="font-size:12.8px" target="_blank" class="">http://www.aaronmreedy.com/</a></div><div class=""><a href="http://www.evolutioned.org/" target="_blank" class="">http://www.evolutioned.org/</a><br class=""></div><div class=""><br class=""></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class="">Aaron M. Reedy<div class=""><br class=""></div><div class="">NSF Postdoctoral Research Fellow in Biology</div><div class=""><br class=""></div><div class=""><a href="http://www.aaronmreedy.com/" style="font-size:12.8px" target="_blank" class="">http://www.aaronmreedy.com/</a></div><div class=""><a href="http://www.evolutioned.org/" target="_blank" class="">http://www.evolutioned.org/</a><br class=""></div><div class=""><br class=""></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br class="">Basta-users mailing list<br class=""><a href="mailto:Basta-users@lists.r-forge.r-project.org" class="">Basta-users@lists.r-forge.r-project.org</a><br class="">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/basta-users<br class=""></div></blockquote></div><br class=""></div></body></html>