Changing the name of an existing R package is annoying but common task especially in the early stages of package development. This package (mostly) automates this task.
Changing the name of an existing R package is annoying but common task in the early stages of package development (at least for me). Package
changer tries to automate this task:
Validity and availability of the new package name is checked by using
available from available).
All complete words matching the package name are replaced in all R scripts,
C/C++/Fortran/Stan source codes, markdown files, and typical files in R packages,
i.e. files with extension
.bib, as well as files
Change file names containing the package name. Only checks files with extensions listed above,
as well as files
TRUE (default), old
Rd files are removed.
All files with extensions
/src are removed to force a rebuild of the package.
Name of the package directory is changed.
TRUE (default), the remote url of the git repository is changed to match the new name. Note that
you still need to change the name of the repository in Github/Bitbucket etc manually. For example in Github:
Go to the URL of your Github package, click Settings near the top-right, change the name under Repository name, and click Rename.
TRUE, update documentation and rebuild package.
If the package is already published in CRAN, then you should first consult folks at CRAN whether they will accept the name change.
It is strongly recommended to have a backup backup before proceeding.
You can install the developed version of changer from Github with:
There is just one function in the package: