-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor adjustments #32
Minor adjustments #32
Conversation
Merge branch 'MinorAdjustments' of https://github.com/martin-gmx/PopED into MinorAdjustments # Conflicts: # tests/testthat/examples_fcn_doc/examples_RS_opt.R
Added some further refactoring to simplify the code - to later be able to add speedup and other methods for faster derivative calculations. |
R/get_cv.R
Outdated
@@ -142,7 +146,7 @@ get_rse <- function (fim, poped.db, | |||
params_rse <- returnArgs[[2]] | |||
parnam <- get_parnam(poped.db) | |||
ret <- params_rse[,,drop=T] | |||
if(use_percent) ret[params!=0]=ret[params!=0]*100 | |||
if(use_percent) ret[params!=0]=round(ret[params!=0]*100) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that rounding results from this function can be dangerous. I would rather round results when printing. I'll make some changes here.
R/get_cv.R
Outdated
if (i %in% c('bpop','d')) { | ||
if (eval(parse(text=paste("dim(",i,")[2]>1")))) | ||
(eval(parse(text=paste(i, "<-",i,"[,2]")))) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't do the right thing and should be removed. I will do this
Thanks Martin! I have removed the rounding for get_rse ... so if you want to have to output rounded when printing I suggest we add a method with print.rse |
Hi Andy,
Some more refactoring done to clean up some more.
Should work without problems...
Cheers
Martin