Just wondering if there's an R package which does tricks similar to what TK!Solver does. TK!Solver, for those not lucky enough to have found it, basically allows one to define a bunch of equations, assign values to an arbitrary subset of the variables, from which it calculates (either directly when possible or back-solving when not) the values of the other variable(s). thanks Carl
Check out the Ryacas package. There is a vignette with some examples. On Sun, Feb 8, 2009 at 3:11 PM, Carl Witthoft <carl at witthoft.com> wrote:> Just wondering if there's an R package which does tricks similar to what > TK!Solver does. > > TK!Solver, for those not lucky enough to have found it, basically allows one > to define a bunch of equations, assign values to an arbitrary subset of the > variables, from which it calculates (either directly when possible or > back-solving when not) the values of the other variable(s). > > > thanks > Carl > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Carl: I don't know if this is helpful or not, but have you seen the functions backsolve and forwardsolve for solving triangular systems?> -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of Carl Witthoft > Sent: Sunday, February 08, 2009 3:12 PM > To: r-help at r-project.org > Subject: [R] general inverse solver? > > Just wondering if there's an R package which does tricks > similar to what TK!Solver does. > > TK!Solver, for those not lucky enough to have found it, > basically allows one to define a bunch of equations, assign > values to an arbitrary subset of the variables, from which it > calculates (either directly when possible or back-solving > when not) the values of the other variable(s). > > > thanks > Carl > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Gabor G a ecrit: Check out the Ryacas package. There is a vignette with some examples. ---- Which led me to the manuals for yacas itself. I'm guessing there may be a way to use yacas' "AND" construct to combine a few equations and then hope the Newton Solver can work with that, but it's not clear that will work. TK!Solver is nice because you aren't limited to linear equations, nor to equations which "fit" into a matrix structure, and because it's legal to have more than one unknown to be back-solved (assuming the problem is not under- or over-defined, of course).