Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9031405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:43:28+00:00 2026-06-16T07:43:28+00:00

Neither of these show the source code of pnorm function, stats:::pnorm getAnywhere(pnorm) How can

  • 0

Neither of these show the source code of pnorm function,

stats:::pnorm
getAnywhere(pnorm)  

How can i see the source code of pnorm?

sum
 (..., na.rm = FALSE)  .Primitive("sum")
.Primitive("sum")
function (..., na.rm = FALSE)  .Primitive("sum")
methods(sum)
no methods were found

and, how can I see source code of the sum function?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T07:43:29+00:00Added an answer on June 16, 2026 at 7:43 am

    The R source code of pnorm is:

    function (q, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE) 
    .Call(C_pnorm, q, mean, sd, lower.tail, log.p)
    

    So, technically speaking, typing "pnorm" does show you the source code. However, more usefully: The guts of pnorm are coded in C, so the advice in the previous question view source code in R is only peripherally useful (most of it concentrates on functions hidden in namespaces etc.).

    Uwe Ligges’s article in R news, Accessing the Sources (p. 43), is a good general reference. From that document:

    When looking at R source code, sometimes calls
    to one of the following functions show up: .C(),
    .Call(), .Fortran(), .External(), or .Internal()
    and .Primitive(). These functions are calling entry points in compiled code such as shared objects,
    static libraries or dynamic link libraries. Therefore,
    it is necessary to look into the sources of the compiled code, if complete understanding of the code is
    required.
    …
    The first step is to look up the
    entry point in file ‘$R HOME/src/main/names.c’, if
    the calling R function is either .Primitive() or
    .Internal(). This is done in the following example for the code implementing the ‘simple’ R function
    sum().

    (Emphasis added because the precise function you asked about (sum) is covered in Ligges’s article.)

    Depending on how seriously you want to dig into the code, it may be worth downloading and
    unpacking the source code as Ligges suggests (for example, then you can use command-line tools
    such as grep to search through the source code). For more casual inspection, you can view
    the sources online via the R Subversion server or Winston Chang’s github mirror or the R-svn github mirror (links here are specifically to src/nmath/pnorm.c). (Guessing the right place to look, src/nmath/pnorm.c, takes some familiarity with the structure of the R source code.)

    mean and sum are both implemented in summary.c.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm aware of YAML and plugins like rails-settings, but neither of these is useful
<div id=table> <input type=checkbox class=db2applforce kon value=15010 title=to be forced> Neither of these work.
It opens neither a tab nor a window: the code for a Google Gadget
I've seen similar questions asked here and here . Neither of these answered my
I m trying to run the code given here - http://code.google.com/p/android-honeycomb-fragment-tutorial/source/browse/#svn%2Ftrunk%253Fstate%253Dclosed on a 7
I have a function which is passed two structures by reference. These structures are
It's neither 0x nor 0 ; what is it? Is there?
Are tail calls optimised in Frege. I know that there is TCO neither in
Neither is instantiable. What are the differences, and in what situations might you use
I've a normal Java class (neither a JSP nor a Servlet) that performs some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.