create_proj() used rstudioapi::isAvailable()
to detect RStudio — but Positron also implements this API, which
caused check_is_project() to fail when create_proj() was called
from a working directory that was not inside an existing project. The
function now switches the working directory consistently across all
IDEs. Thanks to @eribul for the detailed bug report (#1).New setwd_to_proj parameter (default TRUE) to set the working
directory to the new project after creation, so you can continue
working inside it immediately. Set to FALSE for script-driven
workflows where you want to stay in your current working directory
— for example, when creating multiple projects in sequence.
New use_rproj parameter (default TRUE) to optionally skip
.Rproj file creation for users working exclusively in Positron,
VSCode, or other non-RStudio IDEs.
create_proj() now displays a confirmation message at the end
indicating whether the working directory was changed or a new IDE
session was opened, so the current state is always transparent.
When open_proj = TRUE, the new IDE session gets the project and
the current session keeps its original working directory. Previously,
both sessions could end up in the new project.
Initial CRAN release.
use_pipe now defaults to FALSE. The native pipe operator |> (available
since R 4.1.0) is recommended instead of the magrittr pipe %>%."travis", "circle", and "appveyor" have been removed. Only
"gh-actions" (GitHub Actions) is supported.copyright_holder parameter (matching usethis >= 2.0).use_renv and use_targets now default to TRUE — projects are
workflow-oriented by default.open_proj now defaults to FALSE — open the .Rproj file manually after
creation to avoid RStudio session conflicts.orcid parameter for including the author's ORCID iD in CITATION.cff.data-raw/ for documenting data
provenance (source, license, download date, DOI).ci = "gh-actions".use_git parameter to initialize a local git repository without creating
a GitHub repo.use_renv = TRUE (default) initializes renv with lockfile and .Rprofile
bootstrap for dependency management (using snapshot.type = "explicit").use_targets = TRUE (default) adds a _targets.R pipeline template for
reproducible workflow management.use_docker parameter to add a Dockerfile template for reproducible
computational environments.match.arg() for add_license and ci parameters."my_project") are now
accepted — the R package name is auto-sanitized (e.g. my.project in
DESCRIPTION). New helper sanitize_pkg_name()._targets.R template with tar_source(), numbered steps matching
the official targets manual, and format = "file" example.create_package() from triggering RStudio's "switch project?"
dialog by deferring .Rproj file creation.use_git() interactive prompts (commit confirmation, session
restart) via rlang_interactive = FALSE.restart = FALSE to renv::init() to prevent RStudio session
restart during project creation.setwd handling: setwd = FALSE in RStudio (avoids project
switch dialog), setwd = TRUE outside RStudio (required for usethis
functions under R CMD check).create_package() failures in terminal/Rscript
sessions are caught with tryCatch and fall back to manual package
structure creation.renv::init() to prevent
rstudioapi and other packages from becoming unavailable.@param add_license documentation.@param ci incorrectly documented as "Logical" (is Character).github, private.repo).@details referencing old parameter name github.Maintainer field (already specified via Authors@R).LazyData: true (package contains no data)./blob/master/ to /blob/main/.use_apl2_license() replaced with
use_apache_license(), name parameter replaced with copyright_holder.switch() instead of repeated if statements.on.exit().create_proj() function.