Dear Eric,
I do not want to spoil you but you might have already noticed I adore your package, although I focus mostly on running fastsimcoal with help of strataG. I think I found a minor problem with .fscWriteEst function. When there are no complex parameters to estimate the the function fscWrite returns an error: Error in `$<-.data.frame`(`*tmp*`, "name", value = " = ") : replacement has 1 row, data has 0
The thing is that in .fscWriteEst in line:
cmplx.df$name <- paste0(cmplx.df$name, " = ", cmplx.df$value)
there are empty characters for both cmplx.df$name and cmplx.df$value, so paste returns only =.
The solution that worked for me was to put a condition if(nrow(cmplx.df) != 0) on the two subsequent lines.
I would make a push request with that fix but I rarely use git and forgot how to do that...
My simulations do not converge anyway (perhaps due to at least a few complex params) so I do not even know if the fix does make any sense.
Cheers
Maciek
Thanks for the catch on this bug. I've changed the code to test for an empty cmplx.df at this location and pushed a new version.
Let me know if this works.
Dear Eric, I do not want to spoil you but you might have already noticed I adore your package, although I focus mostly on running fastsimcoal with help of strataG. I think I found a minor problem with
.fscWriteEst
function. When there are no complex parameters to estimate the the functionfscWrite
returns an error:Error in `$<-.data.frame`(`*tmp*`, "name", value = " = ") : replacement has 1 row, data has 0
The thing is that in .fscWriteEst in line:cmplx.df$name <- paste0(cmplx.df$name, " = ", cmplx.df$value)
there are empty characters for bothcmplx.df$name
andcmplx.df$value
, sopaste
returns only=
. The solution that worked for me was to put a conditionif(nrow(cmplx.df) != 0)
on the two subsequent lines. I would make a push request with that fix but I rarely use git and forgot how to do that... My simulations do not converge anyway (perhaps due to at least a few complex params) so I do not even know if the fix does make any sense. Cheers Maciek