s-news
[Top] [All Lists]

Fwd: RE: Summary: Using C subroutine is Splus

To: s-news@lists.biostat.wustl.edu
Subject: Fwd: RE: Summary: Using C subroutine is Splus
From: Jingli Song <jsong@sph.emory.edu>
Date: Fri, 16 Feb 2001 10:07:00 -0500 (EST)
Hi, All:

I am sorry that I misplaced the name David and Don. It was Don MacQueen who 
gave 
me the brief introduction of the commands to invoke C -o as the Splus subject. 
Sorry, Don.

Jingli 
----- Forwarded message from David Homiak <dhomiak@xcaliber.com> -----
Date: Fri, 16 Feb 2001 08:53:50 -0600
From: David Homiak <dhomiak@xcaliber.com>
Reply-To: David Homiak <dhomiak@xcaliber.com>
Subject: RE: [S] Summary: Using C subroutine is Splus
To: 'Jingli Song' <jsong@sph.emory.edu>

Hi,
        It wasn't me that gave you the brief introduction about building a
linkable library under UNIX, so you may want to re-credit the proper
individual. I gave you the links for the S Programming book :-)

Dave Homiak
QR Programming
Stafford Trading, Inc.
230 S. LaSalle Street
Suite 688
Chicago, IL 60604
312-356-4514 Voice
312-786-9176 Fax
dhomiak@xcaliber.com

In God we trust; all others must supply data...

> -----Original Message-----
> From: Jingli Song [SMTP:jsong@sph.emory.edu]
> Sent: Friday, February 16, 2001 8:37 AM
> To:   s-news@lists.biostat.wustl.edu
> Subject:      [S] Summary: Using C subroutine is Splus
>
>
> I got several responses from Liaw, Andy; David Homiak; Shige Song; ROGER
> NGOUENET;Don MacQueen; and Xiaofei Wang. Many thanks to you guys help.
> Following
> is a summary of all the responses:
>
> Original Message:
>
> Hello, S-users:
>
>  I need to call a C subroutine in Splus simulations. As I just know a
> little
>  about C, this is hard to me. Can anyone  give me a simple example of how
> to do
>  this, including if I need to compile the C subroutine first and how to
> pass the
>
>  parameters from the Splus function to the C subroutine.
>
>  Thanks and I appreciate your help,
>
>  Jingli Song
>
>  Dept. of Biostatistics
>  Emory University
>
> Suggestions:
>
> 1.Splus Programmer's guide. (Splus 2000 or splus5 or splus6) can be
> accessed
> online at ' www.insightful.com'.
>
> 2. Modern Applied Statistics with S-plus, (W.N. Venables and B. D.
> Ripley).
> There is an online resource of this book. the website is:
> http://www.stats.ox.ac.uk/pub/MASS3/
>
> 3. S Programming(B. D. Ripley), website:
> http://www.stats.ox.ac.uk/pub/MASS3/Sprog/#OnLine
> there also have availiable scripts file at:
> http://www.stats.ox.ac.uk/pub/MASS3/Sprog/Sprog.zip
>
> 4. go to R website at: www.r-project.org
>
> 5. an brief introduction from David Homiak (with unix system).
>
>    Then hopefully your unix system includes a C compiler. I believe most
> do.
>
>    Here's a rough and partial outline.
>
>    If I recall correctly, compile with the -o option (to get only an
>    object file output, you don't need or want to get an executable file).
>    Put the output file in the same directory as the Splus function that
>    will call the C subroutine. Use the Splus CHAPTER command to make an
>    Splus shared object (should automatically get named S.so) from the C
>    object file. Actually, you may have to run the unix 'make' command
>    after the Splus CHAPTER command. Then, when you start Splus in that
>    directory, the C routine in S.so will be available.
>
>    Then, you have to write an Splus function that calls the C
>    subroutine. I've done this with fortran, but not C so I can't help
>    you with some of the C stuff.
>
> ---------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news

----- End forwarded message -----

<Prev in Thread] Current Thread [Next in Thread>
  • Fwd: RE: Summary: Using C subroutine is Splus, Jingli Song <=