Calling positional parameter does not work.
the most possible solution is "del r.x"

>>> import rpy
>>> def a(b=0):
...  f = open("c:/temp/easy.R","w")
...  f.write("sigma <- " + str(b))
...  f.close()
...
>>> def k():
...  t = "c:/temp/easy.R"
...  rpy.r.source(t)
...  v = rpy.r.sigma
...  del rpy.r.sigma
...  return v
...
>>> a()
>>> k()
0.0
>>> a(6)
>>> k()
6.0
>>>

regards,
volkan kepoglu


On 5/5/08, Thomas Juntunen <[EMAIL PROTECTED]> wrote:
>
> On Tue, 29 Apr 2008 10:51:42 +0300, volkan kepoglu wrote:
>
> >>>> def a(b=0):
> > ... f = open("c:/temp/easy.R", "w")
> > ... f.write ("sigma <- " + str(b))
> > ... f.close()
>
> You defined function a() with a named parameter, b, that has a default of
> 0
>
> >>>> a(5) # "sigma <- 5"
>
> You called a() with a positional parameter. Try:  a(b=5)
>
>
>
> HTH,
> Thomas Juntunen
>
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to