Hi all: I'm looking for a package that similar to solver in MS. All I need is find a r to satisfy R0=sum( r * Xt ), where t are from 1 to n and Xt are come from another formula. The most package I found were to max or min the obj. function. Is there any package can do it? Thanks. Peter [[alternative HTML version deleted]]
On Sep 10, 2010, at 5:35 PM, Chien-Pang Chin wrote:> Hi all: > > > > I'm looking for a package that similar to solver in MS. All I need > is find a > r to satisfy R0=sum( , where t are from 1 to n and Xt are come from > another formula. > > The most package I found were to max or min the obj. function. Is > there any > package can do it?If you minimize R0 - sum(r * Xt ), you should get your answer. -- David.> > Thanks. > > PeterDavid Winsemius, MD West Hartford, CT
Use BBsolve in the BB package. It'll do darn near anything. Carl
You can also have a look at and try package nleqslv. Berend -- View this message in context: http://r.789695.n4.nabble.com/Solver-in-R-tp2535115p2535813.html Sent from the R help mailing list archive at Nabble.com.
Another idea.>From your formulation it seems that r does not depend on t and Xt so youwouldn't need a solver. You could solve for r explicitly so r <- R0/sum(Xt) /Berend -- View this message in context: http://r.789695.n4.nabble.com/Solver-in-R-tp2535115p2535815.html Sent from the R help mailing list archive at Nabble.com.