How to get unsaved script tabs

后端 未结 6 2192
渐次进展
渐次进展 2020-12-13 19:32

I would like to know, if it is possible to get unsaved script tabs in R studio. I accidentally open and switch to new project, then my unsaved scripts disappeared. Can anyo

6条回答
  •  忘掉有多难
    2020-12-13 20:00

    RStudio Projects can be confusing at first. In simplest terms, the RStudio project does two things:

    1. open to a working directory that can operate across different users and computers (e.g., no starting with setwd() and generating conflicts with different local paths)
    2. create a workspace in RStudio with R files, data, etc.

    What's not obvious is that the default setting in RStudio is to create scripts in "Project: (None)".

    So, if you haven't set up any projects previously, to restore your missing scripts you need to return to "Project: (None)" which contains all the open work unaffiliated with any RStudio project.

    To do this, go to the upper right hand corner of your RStudio window and do the following:

    1. Find the small pull-down menu next to the word Project.
    2. Click on the the small triangle to get the Project pull-down menu and select "Close Project".
    3. Once the new project is closed, your old tabs should reappear. The pull-down menu should also now say: "Project: (None)" (again, this assumes you hadn't set up a project for your prior work).

提交回复
热议问题