I'm working with an environment, and I need the identifier of this environment. The function environmentName()
doesn't work. It returns ""
, so how can I get the identifier of a environment?
Example:
a #this is a environment
<environment: 0xbc6d2bc>
environmentName(a)
""
I need this id "0xbc6d2bc".
Note: I didn't create the environment
On the Windows taskbar, right-click the Windows icon and select System. In the Settings window, under Related Settings, click Advanced system settings. On the Advanced tab, click Environment Variables.
In the Windows Environment In the command window that opens, enter echo %VARIABLE%. Replace VARIABLE with the name of the environment variable. For example, to check if NUKE_DISK_CACHE is set, enter echo %NUKE_DISK_CACHE%. If the variable is set, its value is displayed in the command window.
The environment is a virtual space that is triggered when an interpreter of a programming language is launched. Simply, the environment is a collection of all the objects, variables, and functions. Or, Environment can be assumed as a top-level object that contains the set of names/variables associated with some values.
There might be a function that does this for you, but you can always just capture the output and extract that number yourself:
sub('<environment: (.*)>', '\\1', capture.output(a))
edit: there is a function in data.table
that does this for you:
library(data.table)
address(a)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With