Title: | Managing Packages Removal and Installation |
---|---|
Description: | Allows the user to manage easily R packages removal and installation. It offers many functions to display installed packages according to specific dates and removes them if needed. The user is always prompted when running the removal functions in order to confirm the required action. It also provides functions that will install 'Github' starred R packages whether available on 'CRAN' or not. |
Authors: | Mohamed El Fodil Ihaddaden |
Maintainer: | Mohamed El Fodil Ihaddaden <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.1 |
Built: | 2024-11-19 05:41:10 UTC |
Source: | https://github.com/feddelegrand7/batata |
Display the most starred R Github Repositories
display_most_starred(n = 10)
display_most_starred(n = 10)
n |
the number of most starred Github R repositories to fetch. Defaults to 10. |
a character vector of the most starred R repositories
Display User's Github Starred Repositories
display_starred(github_user, n = 5, onlyR = FALSE)
display_starred(github_user, n = 5, onlyR = FALSE)
github_user |
the Github user name to look for |
n |
the number of the last starred repositories. Defaults to 5 in which case it will return the last 5 starred repositories. Note that if the 'onlyR' parameter is set to TRUE, you might get a lower number of starred repos due to filtering R from all the other languages. |
onlyR |
Logical, whether to fetch only R repositories, Default to FALSE |
A character vector of starred Github repositories
Remove all the installed R packages from a specified library
fresh_start(lib = .libPaths())
fresh_start(lib = .libPaths())
lib |
a character vector giving the library directories. Defaults to the first element in .libPaths() |
called for the side effect of removing all installed packages
## Not run: # DANGER: THE FUNCTION REMOVES ALL THE PACKAGES fresh_start() ## End(Not run)
## Not run: # DANGER: THE FUNCTION REMOVES ALL THE PACKAGES fresh_start() ## End(Not run)
Install the most starred CRAN packages
install_most_starred(n = 10)
install_most_starred(n = 10)
n |
the most starred starred CRAN packages. Defaults to 10. in this case the function will look at the 10 most starred R repo and install them if available on CRAN. |
called for the side effect of installing most starred CRAN packages
installs the Github starred packages from CRAN
install_starred_cran(github_user, n = 5)
install_starred_cran(github_user, n = 5)
github_user |
the Github user name to look for |
n |
the last 'n' starred repositories. Defaults to 5, in which case it will look for the last 5 starred repositories, filter the R repos and install them |
called for the side effect of installing the Github starred packages that are available on CRAN
installs the Github starred repositories from Github and not from CRAN.
install_starred_github(github_user, n = 5, upgrade = "never")
install_starred_github(github_user, n = 5, upgrade = "never")
github_user |
the Github user name to look for |
n |
the last 'n' starred repositories. Defaults to 5, in which case it will look for the last 5 starred repositories, filter the R repos and install them |
upgrade |
whether to upgrade out of date packages. You can choose from 'always' or 'never'. Defaults to 'never'. For more info, see <install_github()> from the 'remote' package. |
called for the side effect of installing the Github starred repositories
Displaying the latest installed R packages
latest_packages(n = 1, lib = .libPaths())
latest_packages(n = 1, lib = .libPaths())
n |
the number of the last installed packages to display. Default to n = 1, will return the last installed package |
lib |
a character vector giving the library directories. Defaults to the first element in .libPaths() |
a data frame
## Not run: # Displaying the last 10 installed packages latest_packages(10) ## End(Not run)
## Not run: # Displaying the last 10 installed packages latest_packages(10) ## End(Not run)
Remove the n latest installed R packages
rm_latest_packages(n = 1, lib = .libPaths())
rm_latest_packages(n = 1, lib = .libPaths())
n |
the last number of installed packages to remove. Default to 1 for the last installed package |
lib |
a character vector giving the library directories. Defaults to the first element in .libPaths() |
called for the side effect of removing the n latest installed packages
## Not run: # Removing the last 10 installed packages rm_latest_packages(n = 10) ## End(Not run)
## Not run: # Removing the last 10 installed packages rm_latest_packages(n = 10) ## End(Not run)
removes installed packages according to a specific date
rm_since_packages(date, position, lib = .libPaths())
rm_since_packages(date, position, lib = .libPaths())
date |
the date of interest in yyyy-mm-dd format |
position |
takes three arguments "at", "before" or "after". "at" displays the packages installed at the chosen date, "before" before that date and "after" after that date) |
lib |
a character vector giving the library directories. Defaults to the first element in .libPaths() |
a character vector
## Not run: # Displaying the packages installed today today_packages() ## End(Not run)
## Not run: # Displaying the packages installed today today_packages() ## End(Not run)
Remove the packages installed in the current day
rm_today_packages(lib = .libPaths())
rm_today_packages(lib = .libPaths())
lib |
a character vector giving the library directories. Defaults to the first element in .libPaths() |
called for the side effect of removing the today installed packages
## Not run: # Removing the packages installed today rm_today_packages() ## End(Not run)
## Not run: # Removing the packages installed today rm_today_packages() ## End(Not run)
Remove the packages installed yesterday
rm_yesterday_packages(lib = .libPaths())
rm_yesterday_packages(lib = .libPaths())
lib |
a character vector giving the library directories. Defaults to the first element in .libPaths() |
called for the side effect of removing the yesterday installed packages
## Not run: # Removing the packages installed yesterday rm_yesterday_packages() ## End(Not run)
## Not run: # Removing the packages installed yesterday rm_yesterday_packages() ## End(Not run)
Displays installed packages according to a specific date
since_packages(date, position, lib = .libPaths())
since_packages(date, position, lib = .libPaths())
date |
the date of interest in yyyy-mm-dd format |
position |
takes three arguments "at", "before" or "after". "at" displays the packages installed at the chosen date, "before" before that date and "after" after that date) |
lib |
a character vector giving the library directories. Defaults to the first element in .libPaths() |
a character vector
## Not run: # Displaying the packages installed today since_packages(date = Sys.Date(), position = "at") ## End(Not run)
## Not run: # Displaying the packages installed today since_packages(date = Sys.Date(), position = "at") ## End(Not run)
Displays the packages installed in the current day
today_packages(lib = .libPaths())
today_packages(lib = .libPaths())
lib |
a character vector giving the library directories. Defaults to the first element in .libPaths() |
a character vector
## Not run: # Displaying the packages installed today today_packages() ## End(Not run)
## Not run: # Displaying the packages installed today today_packages() ## End(Not run)
Displays the packages installed yesterday
yesterday_packages(lib = .libPaths())
yesterday_packages(lib = .libPaths())
lib |
a character vector giving the library directories. Defaults to the first element in .libPaths() |
a character vector
## Not run: # Displaying the packages installed yesterday yesterday_packages() ## End(Not run)
## Not run: # Displaying the packages installed yesterday yesterday_packages() ## End(Not run)