Output from my package


I have an issue with the output of the functions from the package I created!

When I run a function from my package the results are visualized in a new window.

For information, in my code I use function "View" as usual.

There is a specif option to visualize outputs in the script bartool?

The following is the output I would like to have:

Thank you in advance,

Are you running your code in RStudio? This will determine how the output is displayed when calling View().

I created a small test function:

test_view <- function() {
  x <- matrix(1:4, nrow = 2)

When I run test_view() in RStudio, the output opens in a new tab:


When I run test_view() in the Windows RGui, the output opens in a new window: