Date: Thu, 20 Aug 2009 00:34:40 -0700
Reply-To: xlr82sas <xlr82sas@AOL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: xlr82sas <xlr82sas@AOL.COM>
Organization: http://groups.google.com
Subject: Re: Reading and writng java dataobjects in SAS - Better way for
Content-Type: text/plain; charset=ISO-8859-1
On Aug 19, 10:26 am, dynamicpa...@YAHOO.COM (oloolo) wrote:
> definitly, you can
> SAS can pass even 1-dimension array to JAVA, and JAVA is able to pass array
> back to SAS with help of wrapper classes written by you. This opens windows
> to powerful computational routines/packages available in JAVA, such as
> JAMA, etc....As for the performance, I believe it is not on par with PROC
> FCMP user functions, but of course JAVA is much powerful in availability of
> basic routines and a much larger supporting community
>
> anyway, with JAVA objects, and some creativity, you can have powerful
> computational tools at hand and is able to implement complex innovative
> algorithms (not talking about efficiency yet).
>
>
>
> On Tue, 18 Aug 2009 15:49:04 -0700, xlr82sas <xlr82...@AOL.COM> wrote:
> >Hi,
>
> >Can any Java gurus help me?
>
> >If SAS and R can both read and write java 'dataobjects' then can't I
> >communicate with R using
> >java dataobjects. Isn't this almost as good as SAS datasets, and in
> >some cases better.
> >This opens up SAS to send and RECIEVE data from any application that
> >employs java 'dataobjects'.
> >Sending has never been a problem.
>
> > I am completely ignorant of java and java data structures. However
> >when reading the doc in IML Studio, the following code supprised me
>
> >/* SAS code to create a data object */
> >xy = {0 4,
> > 1 6,
> > 2 7,
> > 3 9,
> > 4 10};
> > declare DataObject dobjMatrix;
> > dobjMatrix = DataObject.Create("Matrix", {"XVar" "YVar"}, xy);
>
> >SAS can also read 'dataobjects'
>
> >and the corresponding? code in R
> >to ceate a 'dataobject'.
>
> >I pretty sure R can read and write java 'dataobject's
>
> >Rs <- as.matrix(s) # s is an object, not matrix- Hide quoted text -
>
> - Show quoted text -
Thanks
I have been reading up on Java and will be installing eclipse on my
desktop.
IML Studio has some nice documentation on Java.
I think I can write a simple class/method to pass a numeric array from
SAS to R and back.
|