s-news
[Top] [All Lists]

RE: [S] looping

To: "S-news (E-mail)" <S-news@wubios.wustl.edu>
Subject: RE: [S] looping
From: Vadim Ogranovich <vograno@arbitrade.com>
Date: Tue, 29 Feb 2000 13:19:59 -0600
Sender: owner-s-news@wubios.wustl.edu
For an example of how to write lapply()-like functions (and why not to do
this) you might wish to look at John Chambers "Programming With Data",
Appendix A.

                -----Original Message-----
                From:   Prof Brian Ripley [mailto:ripley@stats.ox.ac.uk]
                Sent:   Tuesday, February 29, 2000 8:05 AM
                To:     s-news@wubios.wustl.edu;
coffman@hsrdaxil2.mc.duke.edu
                Subject:        Re: [S] looping



                > Date: Tue, 29 Feb 2000 10:48:50 -0500 (EST)
                > From: cynthia coffman <coffman@hsrdaxil2.mc.duke.edu>
                > 
                > Hi!  I am running some simulations using S-plus and was
wondering if anyone 
                had 
                > used "C code" to perform the outer looping for a
simulation then invoked
                > Splus to do the meat of the simulation,  basically all I
want to pass the
                > S-plus code is the index to my datasets,,,but from what I
read about invoking 
                > S-plus functions from C..I am not sure it would help with
efficiency.  Thanks.

                Generally it would using .Call in S-PLUS 5.1, but not call_S
in 3.x/4.x.

                Are you using lapply to do the outer looping?  That already
does something
                very similar to what you are suggesting.


                -- 
                Brian D. Ripley,                  ripley@stats.ox.ac.uk
                Professor of Applied Statistics,
http://www.stats.ox.ac.uk/~ripley/
                University of Oxford,             Tel:  +44 1865 272861
(self)
                1 South Parks Road,                     +44 1865 272860
(secr)
                Oxford OX1 3TG, UK                Fax:  +44 1865 272595

        
-----------------------------------------------------------------------
                This message was distributed by s-news@wubios.wustl.edu.  To
unsubscribe
                send e-mail to s-news-request@wubios.wustl.edu with the BODY
of the
                message:  unsubscribe s-news
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>