0

I can see that variable names in R can also be named by starting with ".".

For example, .data, .height, etc.,

But these variables are not getting listed in global variables, and also it is not possible to delete the variable by rm().

For example, rm(.data), rm(.height), etc.,

Where such variables are getting stored exactly? What is the lifecycle of those variables? Is there any use-case?

  • You **can** delete them using `rm()`. I don't know where you heard that you cannot. – duckmayr May 12 '20 at 17:50
  • https://stackoverflow.com/questions/41553480/declare-variable-with-a-dot-at-the-begining-in-r – jyr May 12 '20 at 17:51
  • They can be stored wherever other variables are stored. But, they are "hidden". What does that mean? For example, they will not show up using `ls()` **unless** the `all.names` argument is `TRUE`. For example, consider `.a = 1; ls(); ls(all.names = TRUE); rm(.a); ls(all.names = TRUE)` – duckmayr May 12 '20 at 17:52
  • Does this answer your question? [Declare variable with a dot at the begining in R](https://stackoverflow.com/questions/41553480/declare-variable-with-a-dot-at-the-begining-in-r) – duckmayr May 12 '20 at 17:52

0 Answers0