Skip to main content
Taylor & Francis Group Logo
Advanced Search

Click here to search books using title name,author name and keywords.

  • Login
  • Hi, User  
    • Your Account
    • Logout
Advanced Search

Click here to search books using title name,author name and keywords.

Breadcrumbs Section. Click here to navigate to respective pages.

Chapter

Calling C

Chapter

Calling C

DOI link for Calling C

Calling C book

Calling C

DOI link for Calling C

Calling C book

ByDavid E. Hiebeler
BookR and MATLAB®

Click here to navigate to parent product.

Edition 1st Edition
First Published 2015
Imprint Chapman and Hall/CRC
Pages 22
eBook ISBN 9781315373379

ABSTRACT

Both R and MATLAB can perform vectorized computations, where iteration over the elements of a vector or matrix is performed implicitly, i.e., internally. This is much more efficient than writing explicit “for” loops, which run very slowly due to both platforms being interpreted (rather than compiled) languages. The C functions in this chapter call a random-number generator. The details of such calls are generally very specific to the operating system and/or C compiler people are using. The advantage of using the C library's random number generator is that, other than the interface function that people call from R, their C code will be more portable in the sense that they can use it as part of a stand-alone C program. There are two other ways of calling C code from R:.Call and.External. They require more complex C code to handle function arguments, set up return values, and handle memory management.

T&F logoTaylor & Francis Group logo
  • Policies
    • Privacy Policy
    • Terms & Conditions
    • Cookie Policy
    • Privacy Policy
    • Terms & Conditions
    • Cookie Policy
  • Journals
    • Taylor & Francis Online
    • CogentOA
    • Taylor & Francis Online
    • CogentOA
  • Corporate
    • Taylor & Francis Group
    • Taylor & Francis Group
    • Taylor & Francis Group
    • Taylor & Francis Group
  • Help & Contact
    • Students/Researchers
    • Librarians/Institutions
    • Students/Researchers
    • Librarians/Institutions
  • Connect with us

Connect with us

Registered in England & Wales No. 3099067
5 Howick Place | London | SW1P 1WG © 2021 Informa UK Limited