[Basta-users] Error with DataCheck
Aaron Reedy
amr3mb at virginia.edu
Wed Feb 13 22:42:10 CET 2019
I just resubmitted now that I am registered on the mailing list.
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.
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.
I first constructed my Capture History, Birth/Death Matrix, and Covariate
Matrix (sex data for each individual).
Then I merged the matrices with:
inputMat <- merge(birthDeath, Y, by.x = "ID", by.y = "ID")
inputMat <- merge(inputMat, covMat, by.x = "ID", by.y = "ID")
Things seem to work OK there. I view inputMat and everything looks as it
should.
Then when I run DataCheck with:
newData <- DataCheck(inputMat, studyStart = 4, studyEnd = 46, autofix =
rep(1, 7), silent = FALSE)
I get the following error:
Error in rowSums(Y) : 'x' must be numeric
Can someone help me work on this error?
Thanks for having a look at this.
On Wed, Feb 13, 2019 at 4:39 PM Aaron Reedy <amr3mb at virginia.edu> wrote:
> 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.
>
> 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.
>
> I first constructed my Capture History, Birth/Death Matrix, and Covariate
> Matrix (sex data for each individual).
>
> Then I merged the matrices with:
> inputMat <- merge(birthDeath, Y, by.x = "ID", by.y = "ID")
> inputMat <- merge(inputMat, covMat, by.x = "ID", by.y = "ID")
>
> Things seem to work OK there. I view inputMat and everything looks as it
> should.
>
> Then when I run DataCheck with:
> newData <- DataCheck(inputMat, studyStart = 4, studyEnd = 46, autofix =
> rep(1, 7), silent = FALSE)
>
> I get the following error:
> Error in rowSums(Y) : 'x' must be numeric
>
> Can someone help me work on this error?
>
> Thanks for having a look at this.
>
> Aaron
>
> --
> Aaron M. Reedy
>
> NSF Postdoctoral Research Fellow in Biology
>
> http://www.aaronmreedy.com/
> http://www.evolutioned.org/
>
>
--
Aaron M. Reedy
NSF Postdoctoral Research Fellow in Biology
http://www.aaronmreedy.com/
http://www.evolutioned.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/basta-users/attachments/20190213/e457af75/attachment.html>
More information about the Basta-users
mailing list