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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:09:39+00:00 2026-05-23T17:09:39+00:00

You can set the title of a plot device window with windows(title = The

  • 0

You can set the title of a plot device window with

windows(title = "The title")
#or equivalently
x11(title = "The title")

How you retrieve the title from a plot device window?

names(dev.cur()), attributes(dev.cur()), str(dev.cur()) and unclass(dev.cur()) don’t reveal anything useful.

  • 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-23T17:09:39+00:00Added an answer on May 23, 2026 at 5:09 pm

    It shouldn’t be possible from device properties cause it’s window property.

    Under windows you could try mess with names(getWindowsHandles()) which gives me:

    > names(getWindowsHandles())
    [1] "R Console"
    [2] "The title (ACTIVE)"
    [3] "R Information"
    

    E.g. for active device grep("\\(ACTIVE\\)$", names(getWindowsHandles()), value=TRUE) return the title.


    It was easier than I thought:

    getTitle <- function(dev=dev.cur()) {
        all_pointers <- getWindowsHandles(which="R", minimized=TRUE)
        all_pointers <- sapply(all_pointers, deparse)
        to_find <- deparse(getWindowsHandle(dev))
        if (to_find=="NULL") {
            warning("Device not found")
            NULL
        } else {
            names(all_pointers)[to_find==all_pointers]
        }
    }
    

    Now some tests:

    > getTitle()
    Warning in getTitle() : Device not found
    NULL
    > windows(title="Test window one")
    > getTitle()
    [1] "Test window one (ACTIVE)"
    > getTitle(3)
    Warning in getTitle(3) : Device not found
    NULL
    > windows(title="Test window two")
    > windows(title="Test window three")
    > sapply(dev.list(), getTitle)
                         windows                      windows                      windows 
    "Test window one (inactive)" "Test window two (inactive)" "Test window three (ACTIVE)" 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

if($title =~ s/(\s|^|,|\/|;|\|)$replace(\s|$|,|\/|;|\|)//ig) $title can be a set of titles ranging from President, MD,
Can we set Title for a Menu Item in Android if it has an
How can I set the Title for a UINavigation Bar programmatically?
As title, how can I set a table's column to have the default value
How can I set parent-child relation on same table? Id int, title string, ParentId
How can I set a sub-title of my popOverView ? Description : Here is
Can we set style to title tag in header in html head as the
Why I can't set title with NSString ? - (void)viewDidLoad { NSString *getProvince =
I can get the vim title to display on my window by doing this:
How can I set the title of UIToolBar such that it looks the same

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.