Fellow R-gonauts: I frequently erase/remove all the objects in my current environment so can I re-run scripts to ensure that analyses are complete, error-free, and accurate. However, sometimes when I re-rerun a script I get warning messages (see below for example) regarding some variables (objects) when these variables do not exist in my current environment. These ghost variables had existed at one time, but were subsequently removed by the rm(list=ls()) command or by the broom icon in RStudio. What's happening and how do I exorcise the ghosts? Warning messages: 1: Unknown or uninitialised column: 'K'. 2: Unknown or uninitialised column: 'NDAfit'. 3: Unknown or uninitialised column: 'NDAfit'. 4: Unknown or uninitialised column: 'NDAfit'. 5: Unknown or uninitialised column: 'NDAfit'. 6: Unknown or uninitialised column: 'NDAfit'. 7: Unknown or uninitialised column: 'NDAobs'. Joe Lucke [[alternative HTML version deleted]]
Cease and desist with erasing objects... it fails to address loaded packages and attached data. Rather, restart R. There is an option to do this in RStudio, but with Rgui you have to exit and restart. On February 25, 2019 10:31:46 AM PST, JLucke at ria.buffalo.edu wrote:>Fellow R-gonauts: > >I frequently erase/remove all the objects in my current environment so >can >I re-run scripts to ensure that analyses are complete, error-free, and >accurate. >However, sometimes when I re-rerun a script I get warning messages (see > >below for example) regarding some variables (objects) when these >variables do not exist in my current environment. >These ghost variables had existed at one time, but were subsequently >removed by the rm(list=ls()) command or by the broom icon in RStudio. > >What's happening and how do I exorcise the ghosts? > > >Warning messages: >1: Unknown or uninitialised column: 'K'. >2: Unknown or uninitialised column: 'NDAfit'. >3: Unknown or uninitialised column: 'NDAfit'. >4: Unknown or uninitialised column: 'NDAfit'. >5: Unknown or uninitialised column: 'NDAfit'. >6: Unknown or uninitialised column: 'NDAfit'. >7: Unknown or uninitialised column: 'NDAobs'. > >Joe Lucke > [[alternative HTML version deleted]] > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code.-- Sent from my phone. Please excuse my brevity.
Doesn't that mean that your script is incomplete, that it needs to make those variables? Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Feb 25, 2019 at 10:32 AM <JLucke at ria.buffalo.edu> wrote:> Fellow R-gonauts: > > I frequently erase/remove all the objects in my current environment so can > I re-run scripts to ensure that analyses are complete, error-free, and > accurate. > However, sometimes when I re-rerun a script I get warning messages (see > below for example) regarding some variables (objects) when these > variables do not exist in my current environment. > These ghost variables had existed at one time, but were subsequently > removed by the rm(list=ls()) command or by the broom icon in RStudio. > > What's happening and how do I exorcise the ghosts? > > > Warning messages: > 1: Unknown or uninitialised column: 'K'. > 2: Unknown or uninitialised column: 'NDAfit'. > 3: Unknown or uninitialised column: 'NDAfit'. > 4: Unknown or uninitialised column: 'NDAfit'. > 5: Unknown or uninitialised column: 'NDAfit'. > 6: Unknown or uninitialised column: 'NDAfit'. > 7: Unknown or uninitialised column: 'NDAobs'. > > Joe Lucke > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
The script is complete. When I start, the environment is empty.
The warnings are issued for these "ghost" variables well before they
are
created later in the script.
Somehow previous incarnations are lingering around and being unhappy even
after they were "deleted".
Jeff Newmiller has suggested a solution I have yet to try.
William Dunlap <wdunlap at tibco.com>
02/25/2019 02:30 PM
To
JLucke at ria.buffalo.edu,
cc
r-help mailing list <r-help at r-project.org>
Subject
Re: [R] Ghost variables
Doesn't that mean that your script is incomplete, that it needs to make
those variables?
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Mon, Feb 25, 2019 at 10:32 AM <JLucke at ria.buffalo.edu> wrote:
Fellow R-gonauts:
I frequently erase/remove all the objects in my current environment so can
I re-run scripts to ensure that analyses are complete, error-free, and
accurate.
However, sometimes when I re-rerun a script I get warning messages (see
below for example) regarding some variables (objects) when these
variables do not exist in my current environment.
These ghost variables had existed at one time, but were subsequently
removed by the rm(list=ls()) command or by the broom icon in RStudio.
What's happening and how do I exorcise the ghosts?
Warning messages:
1: Unknown or uninitialised column: 'K'.
2: Unknown or uninitialised column: 'NDAfit'.
3: Unknown or uninitialised column: 'NDAfit'.
4: Unknown or uninitialised column: 'NDAfit'.
5: Unknown or uninitialised column: 'NDAfit'.
6: Unknown or uninitialised column: 'NDAfit'.
7: Unknown or uninitialised column: 'NDAobs'.
Joe Lucke
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]