Dear R People: How are you? I would like to look at the underlying C code from the program C_ARIMA_Like in the stats package. However, since that is a base package, I'm not entirely sure how to access this. When I used the .C(C_ARIMA_Like....) it says that the C_ARIMA_Like cannot be found. This is on Windows 7, R version 3.0.2. Thank you for any help! Sincerely, Erin -- Erin Hodgess Associate Professor Department of Mathematical and Statistics University of Houston - Downtown mailto: erinm.hodgess@gmail.com [[alternative HTML version deleted]]
On May 29, 2014, at 7:12 PM, Erin Hodgess <erinm.hodgess at gmail.com> wrote:> Dear R People: > > How are you? > > I would like to look at the underlying C code from the program C_ARIMA_Like > in the stats package. > > However, since that is a base package, I'm not entirely sure how to access > this. > > When I used the .C(C_ARIMA_Like....) > > it says that the C_ARIMA_Like cannot be found. > > This is on Windows 7, R version 3.0.2. > > Thank you for any help! > Sincerely, > ErinHi Erin, If you are working from a binary install of R, you won't able to see the sources for C or FORTRAN based functions. If it is a base package in the '../library' tree like 'stats', in the source tarball from CRAN or in the R SVN repo, there will be a 'src' directory for the package where relevant C and/or FORTRAN code will be contained. As an example for arima.c, in the SVN repo for the 3.0 branch tree: https://svn.r-project.org/R/branches/R-3-0-branch/src/library/stats/src/arima.c For R-Devel, it will be in 'trunk': https://svn.r-project.org/R/trunk/src/library/stats/src/arima.c Scroll down or search in the arima.c source for the function name "ARIMA_Like". If you know something about SVN repo trees, the path will make sense. Other common C and/or FORTRAN code that is not part of the base packages may be in the ../src/main directory: https://svn.r-project.org/R/branches/R-3-0-branch/src/main/ and there is a file 'names.c' that can be helpful in locating specific C functions and their associated declared C names. For Recommended packages, there is also a separate SVN repo at: https://svn.r-project.org/R-packages/ but it may be easier to download the tarball for each package from CRAN. Regards, Marc Schwartz
You need to download the R source code to view source code of compiled
functions, whether they are C or Fortran or any other compiled language. Are you
familiar with compiled languages?
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live
Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
On May 29, 2014 5:12:20 PM PDT, Erin Hodgess <erinm.hodgess at gmail.com>
wrote:>Dear R People:
>
>How are you?
>
>I would like to look at the underlying C code from the program
>C_ARIMA_Like
>in the stats package.
>
>However, since that is a base package, I'm not entirely sure how to
>access
>this.
>
>When I used the .C(C_ARIMA_Like....)
>
>it says that the C_ARIMA_Like cannot be found.
>
>This is on Windows 7, R version 3.0.2.
>
>Thank you for any help!
>Sincerely,
>Erin