Calling the base R function View
within a package results in the following note when running devtools::check()
Following the advice to import the function View
from utils breaks the functionality at least on Posit Workbench as utils::View generally results in an error in this environment.
utils::View(data.frame(a=1))
throws
Error in .External2(C_dataviewer, x, title) : unable to start data viewer
In addition: Warning message:
In utils::View(data.frame(a = 1)) : unable to open display
However, View(data.frame(a=1))
works as expected, opening a new tab within the IDE.
Typing ?View
redirects to the View
function of utils
, suggesting there is only this one function called View
in base R.
View
and utils::View
apparently are two different functions, which is probably part of the problem.
I would suggest, this inconsistent reference should be resolved or at least the note in devtools::check()
removed.
(Unfortunately, I was only allowed to upload one screenshot).