1

I have a set of helper functions that open groups of related source files. This works great, except for one issue: I would like to open the files in a new window.

Here's basic code:

..open.source.files <- function(Group = "OUT_CONFIG"){
       
        if(Group == "OUT_CONFIG" | Group == "YAML")
        {
            rstudioapi::navigateToFile('_output.yml')
            rstudioapi::navigateToFile('_bookdown.yml')
        }
    
        if(Group == "OUT_CONFIG" | Group == "LATEX")
        {
            rstudioapi::navigateToFile('./tex/packages.tex')
            rstudioapi::navigateToFile('./tex/docClass.cls')
            rstudioapi::navigateToFile('./tex/dissertation_template.cls')
        }
    }
}

How can I get these files to open to a new window, instead of just having them all open in the main window.

Rstudio allows for a "new window" using the GUI in the taskbar by clicking on the taskbar button to launch new window:

I would like to be able to do the same using code.

Would love to know if anyone has an tips.

Thank you!

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.