#7681: R pexpect interface seems to keep data around
------------------------+---------------------------------------------------
Reporter: kcrisman | Owner: tbd
Type: defect | Status: new
Priority: major | Milestone: sage-4.3.1
Component: packages | Keywords: pexpect, interface, R
Work_issues: | Author:
Upstream: N/A | Reviewer:
Merged: |
------------------------+---------------------------------------------------
Comment(by schilly):
This interface to R (which is entirely different from the rpy2 python
module) is rather hard to do and still needs work. I think the problem is
that "vector" in R does something differently than you imagine. I.e. an
error happens which isn't shown and the pexpect interface is confused.
{{{
sage: x = r.c(1,2,3)
sage: r.as_vector(x)
[1] 1 2 3
sage: r.is_vector(r.as_vector(x))
[1] TRUE
}}}
works for me.
Here what really happens in R:
{{{
> length(c(1,2,3,4))
[1] 4
> vector(c(1,2,3,4,3))
Error in vector(c(1, 2, 3, 4, 3)) :
vector: cannot make a vector of mode '1'.
> as.vector(c(1,2,3,4,3))
[1] 1 2 3 4 3
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7681#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.