Skip to content

usethis does not recognize R projects created with Positron "Create R Project" #2125

Open
@CorradoLanera

Description

@CorradoLanera

usethis does not recognize R projects created using Positron's "Create R Project" feature.

For example, when I try to run:

usethis::edit_r_environ("project")

I get the following error (in a folder created via Positron → New Project → R Project):

Error in `proj_set()`:
✖ Path C:/path/to/my/positron-project/ does not
  appear to be inside a project or package.
ℹ Read more in the help for `usethis::proj_get()`.

Notes:

  • I don't know whether this is a bug/feature to implement in Positron (the way the project is created) or in usethis (project detection logic), so I'm opening the issue here for further investigation.

Steps to reproduce:

  1. Open Positron, create a new R project.
  2. In the project directory, open R and run usethis::edit_r_environ("project").

Expected behavior:
usethis should recognize the directory as a valid R project and allow, e.g., editing of the project .Renviron.

Actual behavior:
usethis reports that the directory is not a project or package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions