---Chris Burke wrote:
> Sherlock, Ric wrote:
> > I have been investigating interfacing J and R using Rserve.
> > <http://www.jsoftware.com/jwiki/Interfaces/R/Rserve>
> > 
> > I am interested in how best to go about working with the 
> Attribute lists
> > returned by the interface. For example how would I best 
> > 
> > Obviously one answer is to use R to get the bits I want.
> > Rget 'head(cars$dist)'  and Rget 'levels(x)
> > But I'm interested in how to work with these structures and 
> symbols in
> > J.
> 
> I would prefer to work with the attribute lists from within 
> J, since at 
> least it should be more efficient to get everything in one go, rather 
> than go back and forth down the R attribute list.

Agreed.
 
> We need a dyadic verb, say Rgetattr, where x is a list of 
> attributes and 
> y the result of Rget. The result is the attributes, e.g.
> 
>     'names' Rgetattr Rget 'sapply(head(cars), list)'
> +-----+----+
> |speed|dist|
> +-----+----+
> 
> A second verb Rgetattrs could then define all attributes as global 
> variables. We could then associate a locale with an R variable.
> 

Sounds sensible.
 
> Do you know of an exact definition of attributes?

Yes that seems to be the key. I'm not currently aware of the definition,
and I will need to sort out the problems I seem to be having with the
structures before can start working it out.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to