id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,merged,author,reviewer,upstream,work_issues,branch,commit,dependencies,stopgaps
3839,Element access for RElement,SimonKing,SimonKing,"On [http://groups.google.com/group/sage-support/browse_thread/thread/4868d601510e9642?hl=en], Alexandr Batalshikov pointed out that
{{{
> v = c(3,5,9,1)
> v[c(2,3)]
[1] 5 9
}}}
works in R, but the corresponding statement in Sage does not:
{{{
sage: v = r.c(3,5,9,1)
sage: n = r.c(2,3)
sage: v[n]
[1] 3
}}}
I believe this is a defect. With the attached patch, the following works:
{{{
sage: v = r.c(3,5,9,1)
sage: n = r.c(2,3)
sage: v[n]
[1] 5 9
sage: v[-2]
[1] 3 9 1
sage: v['c(2,3)']
[1] 5 9
sage: v[2,4,3]
[1] 5 1 9
sage: v[2]
[1] 5
}}}
",defect,closed,major,sage-duplicate/invalid/wontfix,interfaces,duplicate,"r interface, element access",,,,,,,,,,