# [SciPy-user] Curve fitting and LaTeX output

David Lonie loniedavid@gmail....
Thu Aug 28 08:03:03 CDT 2008

I've thought of doing this, but I need to use these scripts in windows
sometimes and I've always had trouble getting rpy working there. Maybe
things have gotten better lately and it's time for another try.

Dave

On Thu, Aug 28, 2008 at 3:49 AM, Anand Patil
<anand.prabhakar.patil@gmail.com> wrote:
> You can also use rpy, http://rpy.sourceforge.net/, to get the R table as a
> string straight from Python. Here's a very rough, non-working schematic of
> how it would go:
> from rpy import r
> mystring = r.lm_fit(blablabla)
> f = file('table.tex','w')
> f.write(mystring)
> Anand
>
>
> On Thu, Aug 28, 2008 at 3:09 AM, David Lonie <loniedavid@gmail.com> wrote:
>>
>> I'm using the scipy package to analyze data from my research. I'm
>> running into a couple problems I'd like some help with. 2 questions:
>>
>> 1) Curve fitting -- I have found linregress for linear functions,
>> polyfit for polynomial fits, and a description of using lstsq to fit
>> data that linearly depends on x. Is there a way to fit a curve of the
>> form, for example, y = a + b^x? I don't mind a RTFM response to this,
>> just please let me know which FM to R, because I can't find anything
>> :)
>>
>> 2) LaTeX output -- I remember using R for stats before, but I'd like
>> to avoid going back to it if possible. IIRC it had the ability to
>> output latex tables, etc. that could be inserted into a document via
>> \input{} (I think). Is there a python module that provides a similar
>> output interface?
>>
>>
>> Dave
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user@scipy.org
>> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>