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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:40:16+00:00 2026-05-16T10:40:16+00:00

Sometimes it would be useful to name variables like no programmer should name his

  • 0

Sometimes it would be useful to name variables like no programmer should name his or her variables. Of course there’s some good reason for conventions and limitations on stoopid variable names, but still I’d be nice. Particularly in a language like R that is used frequently to create graphs and some labels with the graphs. Thus, some labels contain variable names.

Is there a way to use something like a+b as a variable name in R? Or is there something like a display name? For example in faceting with ggplot2 such an option would be great.

p_big + facet_grid(x ~ y,scales="free") +labs(x="",y="")

# with x containing a+b, d&c 

thx for any ideas in advance!

  • 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-16T10:40:16+00:00Added an answer on May 16, 2026 at 10:40 am

    You can use backticks:

    R> `a + b` <- 3
    R> `a + b`
    [1] 3
    
    tmp <- data.frame(1:10, rnorm(10))
    names(tmp) <- c("a+b", "c&d")
    ggplot(tmp, aes(`a+b`, `c&d`)) + geom_point()
    

    See also ?Quotes.

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

Sidebar

Related Questions

In my program, I'm grep-ing via NSTask. For some reason, sometimes I would get
Sometimes i would like to search for text containing a new line character and
We are sometimes getting an OutOfMemoryError in production and I would like to be
When working with char buffers in C, sometimes it would be useful and more
Sometimes I would like to quickly see the IL representation of my code snippets
Sometimes I need a useful utility function, like List::Util::max in the middle of a
Sometimes it's useful to derive my entities from a base class like this: public
Sometimes I would like to test an intermediate value in a method. But the
I was recently working on a windows program that would sometimes become unresponsive when
Sometimes when I'm writing XLANG/s code in an expression shape, it would be more

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.