Accessing C source files

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Accessing C source files

R help mailing list-2
Hi all,On looking at the source code for the integrate function, I find that it has the following call:
wk <- .External(C_call_dqagi, ff, rho = environment(),             as.double(bound), inf, as.double(abs.tol), as.double(rel.tol),             limit = limit)How do I access the source code for C_call_dqagi? From other references ("Writing R-extensions section 6.9), I find a reference to Rdqagi when discussing the integrate function. I would like to know if C_call_dqagi and Rdqagi are the same.How do I access the source code for either of these functions? From the article titled "R help desk Acessing the sources" by Uwe Ligges in Rnews_2006-4, I gather that the C files can be found in the folder $R_HOME/src/main/. But when I look at the equivalent folder in R 3.6.1, I find that the main sub-folder is missing in src (the only sub-folder found there is library). I do not find any C file in the src subfolder 
Where do I find the C source files? How do I get to look at them? I have a lot of follow-up questions on interfacing with the C files, but I would like to first know where I can find them. At least on how I can access them.Thanks,Ravi Sutradhara


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Accessing C source files

Jeff Newmiller
Seems like you are looking in the wrong place. Did you download the source code? [1]

[1] https://cran.r-project.org/

On August 5, 2019 6:18:14 AM PDT, ravi via R-help <[hidden email]> wrote:

>Hi all,On looking at the source code for the integrate function, I find
>that it has the following call:
>wk <- .External(C_call_dqagi, ff, rho = environment(),            
>as.double(bound), inf, as.double(abs.tol), as.double(rel.tol),        
>    limit = limit)How do I access the source code for C_call_dqagi?
>From other references ("Writing R-extensions section 6.9), I find a
>reference to Rdqagi when discussing the integrate function. I would
>like to know if C_call_dqagi and Rdqagi are the same.How do I access
>the source code for either of these functions? From the article titled
>"R help desk Acessing the sources" by Uwe Ligges in Rnews_2006-4, I
>gather that the C files can be found in the folder $R_HOME/src/main/.
>But when I look at the equivalent folder in R 3.6.1, I find that the
>main sub-folder is missing in src (the only sub-folder found there is
>library). I do not find any C file in the src subfolder 
>Where do I find the C source files? How do I get to look at them? I
>have a lot of follow-up questions on interfacing with the C files, but
>I would like to first know where I can find them. At least on how I can
>access them.Thanks,Ravi Sutradhara
>
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>[hidden email] mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

--
Sent from my phone. Please excuse my brevity.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Accessing C source files

R help mailing list-2
 Hi Jeff,Thanks for your quick answer. But I don't understand. I have installed R from the installer (I think that it is called the binary). Do you mean that I will have to do it via the source? Will I see the source code only then? Are there any other methods? In any case, it would be helpful if you can explain what you mean by "downloading the source code".Thanks,Ravi
    On Monday, 5 August 2019, 15:32:00 CEST, Jeff Newmiller <[hidden email]> wrote:  
 
 Seems like you are looking in the wrong place. Did you download the source code? [1]

[1] https://cran.r-project.org/

On August 5, 2019 6:18:14 AM PDT, ravi via R-help <[hidden email]> wrote:

>Hi all,On looking at the source code for the integrate function, I find
>that it has the following call:
>wk <- .External(C_call_dqagi, ff, rho = environment(),            
>as.double(bound), inf, as.double(abs.tol), as.double(rel.tol),        
>    limit = limit)How do I access the source code for C_call_dqagi?
>From other references ("Writing R-extensions section 6.9), I find a
>reference to Rdqagi when discussing the integrate function. I would
>like to know if C_call_dqagi and Rdqagi are the same.How do I access
>the source code for either of these functions? From the article titled
>"R help desk Acessing the sources" by Uwe Ligges in Rnews_2006-4, I
>gather that the C files can be found in the folder $R_HOME/src/main/.
>But when I look at the equivalent folder in R 3.6.1, I find that the
>main sub-folder is missing in src (the only sub-folder found there is
>library). I do not find any C file in the src subfolder 
>Where do I find the C source files? How do I get to look at them? I
>have a lot of follow-up questions on interfacing with the C files, but
>I would like to first know where I can find them. At least on how I can
>access them.Thanks,Ravi Sutradhara
>
>
>    [[alternative HTML version deleted]]
>
>______________________________________________
>[hidden email] mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

--
Sent from my phone. Please excuse my brevity.  
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Accessing C source files

R help mailing list-2
In reply to this post by Jeff Newmiller
 Hi Jeff,Thanks for your quick answer. But I don't understand. I have installed R from the installer (I think that it is called the binary). Do you mean that I will have to do it via the source? Will I see the source code only then? Are there any other methods? In any case, it would be helpful if you can explain what you mean by "downloading the source code".Thanks,Ravi
    On Monday, 5 August 2019, 15:32:00 CEST, Jeff Newmiller <[hidden email]> wrote:  
 
 Seems like you are looking in the wrong place. Did you download the source code? [1]

[1] https://cran.r-project.org/

On August 5, 2019 6:18:14 AM PDT, ravi via R-help <[hidden email]> wrote:

>Hi all,On looking at the source code for the integrate function, I find
>that it has the following call:
>wk <- .External(C_call_dqagi, ff, rho = environment(),            
>as.double(bound), inf, as.double(abs.tol), as.double(rel.tol),        
>    limit = limit)How do I access the source code for C_call_dqagi?
>From other references ("Writing R-extensions section 6.9), I find a
>reference to Rdqagi when discussing the integrate function. I would
>like to know if C_call_dqagi and Rdqagi are the same.How do I access
>the source code for either of these functions? From the article titled
>"R help desk Acessing the sources" by Uwe Ligges in Rnews_2006-4, I
>gather that the C files can be found in the folder $R_HOME/src/main/.
>But when I look at the equivalent folder in R 3.6.1, I find that the
>main sub-folder is missing in src (the only sub-folder found there is
>library). I do not find any C file in the src subfolder 
>Where do I find the C source files? How do I get to look at them? I
>have a lot of follow-up questions on interfacing with the C files, but
>I would like to first know where I can find them. At least on how I can
>access them.Thanks,Ravi Sutradhara
>
>
>    [[alternative HTML version deleted]]
>
>______________________________________________
>[hidden email] mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

--
Sent from my phone. Please excuse my brevity.  
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Accessing C source files

Duncan Murdoch-2
In reply to this post by R help mailing list-2
On 05/08/2019 9:43 a.m., ravi via R-help wrote:
>   Hi Jeff,Thanks for your quick answer. But I don't understand. I have installed R from the installer (I think that it is called the binary). Do you mean that I will have to do it via the source? Will I see the source code only then? Are there any other methods? In any case, it would be helpful if you can explain what you mean by "downloading the source code".Thanks,Ravi

You can see each file online if you don't want to download it all.  The
current development code is in https://svn.r-project.org/R/trunk,
individual versions are in subdirectories of
https://svn.r-project.org/R/tags .  Pick one of these, and then follow
links to src etc. within it.

Duncan Murdoch

>      On Monday, 5 August 2019, 15:32:00 CEST, Jeff Newmiller <[hidden email]> wrote:
>  
>   Seems like you are looking in the wrong place. Did you download the source code? [1]
>
> [1] https://cran.r-project.org/
>
> On August 5, 2019 6:18:14 AM PDT, ravi via R-help <[hidden email]> wrote:
>> Hi all,On looking at the source code for the integrate function, I find
>> that it has the following call:
>> wk <- .External(C_call_dqagi, ff, rho = environment(),
>> as.double(bound), inf, as.double(abs.tol), as.double(rel.tol),
>>      limit = limit)How do I access the source code for C_call_dqagi?
>>From other references ("Writing R-extensions section 6.9), I find a
>> reference to Rdqagi when discussing the integrate function. I would
>> like to know if C_call_dqagi and Rdqagi are the same.How do I access
>> the source code for either of these functions? From the article titled
>> "R help desk Acessing the sources" by Uwe Ligges in Rnews_2006-4, I
>> gather that the C files can be found in the folder $R_HOME/src/main/.
>> But when I look at the equivalent folder in R 3.6.1, I find that the
>> main sub-folder is missing in src (the only sub-folder found there is
>> library). I do not find any C file in the src subfolder
>> Where do I find the C source files? How do I get to look at them? I
>> have a lot of follow-up questions on interfacing with the C files, but
>> I would like to first know where I can find them. At least on how I can
>> access them.Thanks,Ravi Sutradhara
>>
>>
>>      [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Accessing C source files

Peter Dalgaard-2
In reply to this post by Jeff Newmiller
Also, Uwe's "Accessing the sources": https://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf, p.43.

It's a bit old, but I don't think massively out of date, except possibly with respect to name mangling like thee C_ prefix.

-pd

> On 5 Aug 2019, at 15:31 , Jeff Newmiller <[hidden email]> wrote:
>
> Seems like you are looking in the wrong place. Did you download the source code? [1]
>
> [1] https://cran.r-project.org/
>
> On August 5, 2019 6:18:14 AM PDT, ravi via R-help <[hidden email]> wrote:
>> Hi all,On looking at the source code for the integrate function, I find
>> that it has the following call:
>> wk <- .External(C_call_dqagi, ff, rho = environment(),            
>> as.double(bound), inf, as.double(abs.tol), as.double(rel.tol),        
>>     limit = limit)How do I access the source code for C_call_dqagi?
>> From other references ("Writing R-extensions section 6.9), I find a
>> reference to Rdqagi when discussing the integrate function. I would
>> like to know if C_call_dqagi and Rdqagi are the same.How do I access
>> the source code for either of these functions? From the article titled
>> "R help desk Acessing the sources" by Uwe Ligges in Rnews_2006-4, I
>> gather that the C files can be found in the folder $R_HOME/src/main/.
>> But when I look at the equivalent folder in R 3.6.1, I find that the
>> main sub-folder is missing in src (the only sub-folder found there is
>> library). I do not find any C file in the src subfolder
>> Where do I find the C source files? How do I get to look at them? I
>> have a lot of follow-up questions on interfacing with the C files, but
>> I would like to first know where I can find them. At least on how I can
>> access them.Thanks,Ravi Sutradhara
>>
>>
>> [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> --
> Sent from my phone. Please excuse my brevity.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: [hidden email]  Priv: [hidden email]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Accessing C source files

Jeff Newmiller
In reply to this post by R help mailing list-2
You cannot see C source code unless you download the source code tar.gz file and extract files from it. I gave you the URL. However, you are going to have to do some self-study to make sense of it... this is not the right place to learn/teach about how to download files or how C software works.

On August 5, 2019 6:43:59 AM PDT, ravi <[hidden email]> wrote:

>Hi Jeff,Thanks for your quick answer. But I don't understand. I have
>installed R from the installer (I think that it is called the binary).
>Do you mean that I will have to do it via the source? Will I see the
>source code only then? Are there any other methods? In any case, it
>would be helpful if you can explain what you mean by "downloading the
>source code".Thanks,Ravi
>On Monday, 5 August 2019, 15:32:00 CEST, Jeff Newmiller
><[hidden email]> wrote:  
>
>Seems like you are looking in the wrong place. Did you download the
>source code? [1]
>
>[1] https://cran.r-project.org/
>
>On August 5, 2019 6:18:14 AM PDT, ravi via R-help
><[hidden email]> wrote:
>>Hi all,On looking at the source code for the integrate function, I
>find
>>that it has the following call:
>>wk <- .External(C_call_dqagi, ff, rho = environment(),            
>>as.double(bound), inf, as.double(abs.tol), as.double(rel.tol),        
>>    limit = limit)How do I access the source code for C_call_dqagi?
>>From other references ("Writing R-extensions section 6.9), I find a
>>reference to Rdqagi when discussing the integrate function. I would
>>like to know if C_call_dqagi and Rdqagi are the same.How do I access
>>the source code for either of these functions? From the article titled
>>"R help desk Acessing the sources" by Uwe Ligges in Rnews_2006-4, I
>>gather that the C files can be found in the folder $R_HOME/src/main/.
>>But when I look at the equivalent folder in R 3.6.1, I find that the
>>main sub-folder is missing in src (the only sub-folder found there is
>>library). I do not find any C file in the src subfolder 
>>Where do I find the C source files? How do I get to look at them? I
>>have a lot of follow-up questions on interfacing with the C files, but
>>I would like to first know where I can find them. At least on how I
>can
>>access them.Thanks,Ravi Sutradhara
>>
>>
>>    [[alternative HTML version deleted]]
>>
>>______________________________________________
>>[hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>https://stat.ethz.ch/mailman/listinfo/r-help
>>PLEASE do read the posting guide
>>http://www.R-project.org/posting-guide.html
>>and provide commented, minimal, self-contained, reproducible code.

--
Sent from my phone. Please excuse my brevity.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.