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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:23:03+00:00 2026-06-05T07:23:03+00:00

is there a way to test whether two objects are identical in the R

  • 0

is there a way to test whether two objects are identical in the R language?

For clarity: I do not mean identical in the sense of the identical function,
which compares objects based on certain properties like numerical values or logical values etc.

I am really interested in object identity, which for example could be tested using the is operator in the Python language.

  • 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-05T07:23:04+00:00Added an answer on June 5, 2026 at 7:23 am

    UPDATE: A more robust and faster implementation of address(x) (not using .Internal(inspect(x))) was added to data.table v1.8.9. From NEWS :

    New function address() returns the address in RAM of its argument. Sometimes useful in determining whether a value has been copied or not by R, programatically.


    There’s probably a neater way but this seems to work.

    address = function(x) substring(capture.output(.Internal(inspect(x)))[1],2,17)
    x = 1
    y = 1
    z = x
    identical(x,y)
    # [1] TRUE
    identical(x,z)
    # [1] TRUE
    address(x)==address(y)
    # [1] FALSE
    address(x)==address(z)
    # [1] TRUE
    

    You could modify it to work on 32bit by changing 17 to 9.

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

Sidebar

Related Questions

Is there a good way to test whether I am logging into a text
Given two integers a and b , is there an efficient way to test
Is there a way to test whether correct pages are being passed for printing
Is there a way to test whether an array contains a specified element? e.g.,
Is there a way to programmatically test whether ssh can authenticate using a public
Is there a concise way to test whether some number X is within the
Is there a way to test whether a variable holds a lambda ? The
Is there a way to test whether a given device is specifically on the
Is there any way to test my website in all mobile devices. I have
Is there a way to test if T inherits/implements a class/interface? private void MyGenericClass<T>

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.