Hi Troy,
I think that your problem is poorly scaled. You have variables that vary
over several orders of magnitude. This means that any small changes (due to
subtle differences between R versions) could cause a big difference in the
convergence behavior of the algorithms. So, you are asking for
Try this:
Myfunc2 <- function(rootM,Abund,Loss,OtherM) {
# I have scaled the function
(Loss/Abund - (rootM/(rootM+OtherM)*
(1-exp(-(rootM+OtherM)^2
}
nlm(myfunc2
,0.001,print.level=0,fscale=0, gradtol=1E-10, stepmax = 100.0
,Loss=FixedRemovals
,Abund=AbStageInitial
,OtherM=
In python, one can do this
mydict = dict([(keyfun(x), valfun(x)) for x in mylist])
to create a dictionary with whatever keys and values we want from an
input list of arbitrary size. In R, I want to similarly create a list
with names/values that are generated by some keyfun and valfun
(assuming th
Hi,
On 13.10.2010, at 21:26, Steve Kim wrote:
> mydict = dict([(keyfun(x), valfun(x)) for x in mylist])
>
> to create a dictionary with whatever keys and values we want from an
> input list of arbitrary size. In R, I want to similarly create a list
> with names/values that are generated by some k
This question probably belongs on R-help instead of R-devel.
What works best for you will depend on how big 'mylist' is.
An article discussing some possibilities can be found at:
http://opendatagroup.com/2009/07/26/hash-package-for-r/
Hope this helps,
--Erik
Steve Kim wrote:
In python, one ca
Thanks heaps Ravi,
I will have to take the modified function to my modeller/statistician and get
him to check it out as I am only a general programmer and do not understand the
significance of your suggested changes. Your changes do look to produce
consistent results though and as John Nash po
Since now many browsers support (ECMA/Java-)scripted SVG, I am wondering
whether there are already any examples of inserting R code into SVG
documents (or a Javascript canvas?) either directly, or perhaps more
likely through a JavaScript layer, to dynamically generate graphics or
make them in
The scaling change that I did is extremely simple. I just divided the
objective function by `Abund' (actually, Abund^2). Dividing a function by a
constant (positive) factor does not change the optimum (minimum), so this is
perfectly legal.
Ravi.
_