Created
June 16, 2015 13:42
-
-
Save AndrewLJackson/946b2ae0eebd78af24a3 to your computer and use it in GitHub Desktop.
reported bug by Leonardo Saravia @larysar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require(plyr) | |
| require(siar) | |
| t1 <- data.frame(SizeClass=c("Meiofauna","Smaller Macrofauna","Bigger Macrofauna"), | |
| num=rpois(3,10), | |
| md13C=rnorm(3,-10,10), | |
| sd13C=rlnorm(3,1,1), | |
| md15N=rnorm(3,5,5) , | |
| sd15N=rlnorm(3,1,1)) | |
| t1 | |
| hh <- function(x) { | |
| with(x,data.frame(SizeClass=SizeClass, | |
| # d13C=rnorm(num,md13C,sd13C),d15N=rlnorm(num,log(md15N),log(sd15N))) | |
| d13C=rnorm(num,md13C,sd13C),d15N=rnorm(num,md15N,sd15N))) | |
| } | |
| t2 <- ddply(t1, .(SizeClass), hh) | |
| t3 <- with(t2,siber.hull.metrics(d13C,d15N,SizeClass,R=10^4)) | |
| # --------------------------------------------------------- | |
| # Andrew Jackson - 16/6/2015 | |
| # try long-handed | |
| t4 <- siber.hull.metrics(t2$d13C, t2$d15N, t2$SizeClass, R = 10^4) | |
| summary(t3) | |
| summary(t4) | |
| # --------------------------------------------------------- | |
| # | |
| # Error: not a matrix | |
| # |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment