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 6919409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:59:10+00:00 2026-05-27T09:59:10+00:00

I would like to get the title of a base function (e.g.: rnorm )

  • 0

I would like to get the title of a base function (e.g.: rnorm) in one of my scripts. That is included in the documentation, but I have no idea how to “grab” it.

I mean the line given in the RD files as \title{} or the top line in documentation.

Is there any simple way to do this without calling Rd_db function from tools and parse all RD files — as having a very big overhead for this simple stuff? Other thing: I tried with parse_Rd too, but:

  • I do not know which Rd file holds my function,
  • I have no Rd files on my system (just rdb, rdx and rds).

So a function to parse the (offline) documentation would be the best 🙂


POC demo:

> get.title("rnorm")
[1] "The Normal Distribution"
  • 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-05-27T09:59:10+00:00Added an answer on May 27, 2026 at 9:59 am

    If you look at the code for help, you see that the function index.search seems to be what is pulling in the location of the help files, and that the default for the associated find.packages() function is NULL. Turns out tha tthere is neither a help fo that function nor is exposed, so I tested the usual suspects for which package it was in (base, tools, utils), and ended up with “utils:

    utils:::index.search("+", find.package())
    #[1] "/Library/Frameworks/R.framework/Resources/library/base/help/Arithmetic"
    

    So:

     ghelp <- utils:::index.search("+", find.package())
     gsub("^.+/", "", ghelp)
    #[1] "Arithmetic"
    ghelp <- utils:::index.search("rnorm", find.package())
    gsub("^.+/", "", ghelp)
    #[1] "Normal"
    

    What you are asking for is \title{Title}, but here I have shown you how to find the specific Rd file to parse and is sounds as though you already know how to do that.

    EDIT: @Hadley has provided a method for getting all of the help text, once you know the package name, so applying that to the index.search() value above:

    target <- gsub("^.+/library/(.+)/help.+$", "\\1", utils:::index.search("rnorm", 
                                                                      find.package()))
    doc.txt <- pkg_topic(target, "rnorm")  # assuming both of Hadley's functions are here
    print(doc.txt[[1]][[1]][1])
    #[1] "The Normal Distribution"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My question is already specified in the title: I would like to get rid
So I have a nested div structure and I would like to get the
I have a problem. I would like to get only 300 rows from table
I have three tables: user, friend_recommendation, and movie. I would like to get the
Would like to get a list of advantages and disadvantages of using Stored Procedures.
I would like to get data from from different webpages such as addresses of
I would like to get up-to-date information on Google's index of a website, and
I would like to get the path to the execution directory of a Windows
I would like to get the absolute position of an element in relation to
I would like to get a list of the wireless networks available. Ideally this

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.