Matwey, There are a number of ways to do this, but it depends on what exactly you want. Do you want to execute a call to an actual R function from within C, or do you want to directly call one of R's internal C functions (which may work but is not future-safe unless it is part of the official API).
If its the first, see Martin Morgan's post here: http://stackoverflow.com/questions/7457635/calling-r-function-from-c for more detail about the approach I believe Simon is referring to. As for the second, they are normal C functions, but I believe the consensus is that if they aren't part of the API you are on your own figuring out how they work (the source code is available for this of course). Hope that helps, ~G On Thu, May 9, 2013 at 12:54 PM, Simon Urbanek <simon.urba...@r-project.org>wrote: > > On May 8, 2013, at 2:24 PM, Matwey V. Kornilov wrote: > > > Hi, > > > > I am writing C code for R, but in middle of the routine I want to call > solve(A,b) function. What is the right way to solve linear set inside C > code? Is it ok to just invoke La_solve()? > > > > There is no such thing as La_solve(). You can use dgesv from LAPACK, > though. > However, the subject poses a different question -- you can call R function > from C code by using eval(). > > Cheers, > Simon > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Gabriel Becker Graduate Student Statistics Department University of California, Davis [[alternative HTML version deleted]] ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel