Learn R Programming

RWsearch

Installation

RWsearch stands for « Search in R packages, task views, CRAN and in the Web ». The package is available on CRAN (CRAN/package=RWsearch) and can be installed via:

install.packages("RWsearch")

If you find RWsearch useful and wish to use it everyday (as I do), then modify your R/etc/Rprofile.site file to launch RWsearch at every R start-up. Install also pacman as the two packages share the same syntax and complement each other. For instance:

local({r <- getOption("repos")
       r["CRAN"] <- "https://cloud.r-project.org"
       options(repos=r)
       old <- getOption("defaultPackages")
       options(defaultPackages = c(old, "pacman", "RWsearch"))
      })

Introduction

RWsearch is a management tool that serves several purposes:

  1. Provide a simple non-standard evaluation instruction to read and evaluate non-standard content, mainly character vectors.
  2. Download the files that list all available packages, archived packages, check_results and task views available on CRAN at a given date and rearrange them in convenient formats. The downloaded files are:
    • crandb_down() => crandb.rda (4.9 Mo),
    • archivedb_down() => CRAN-archive.html (3.3 Mo),
    • checkdb_down() => check_results.rds (7.6 Mo),
    • tvdb_down() => tvdb.rda (31 ko).
  3. List the packages that has been added, updated and removed from CRAN between two downloads or two dates.
  4. Search for packages that match one or several keywords in any column of the crandb data.frame and by default (with mode or, and, relax) in the Package name, Title, Description, Author and Maintainer columns (can be selected individually).
  5. Display the results as a list or as a table in the console or in the browser and save them as txt, md, html, tex or pdf files.
  6. In one instruction, download in one directory the whole documentation and the tar.gz files related to one or several packages. This is the perfect tool to read the documentation off-line and study the source code of a package.
  7. Plot the graph of the package dependencies in an html page in your browser (one example is the image behind me in the video below).
  8. List the parent and children dependencies of one or several packages, either the first level or the full list (termed recursive).
  9. Use this information to reinstall or install packages and their dependencies in the right order, from the lowest number to the largest number of dependencies, and avoid mic-mac (very useful).
  10. Check the CRAN check_results for one or several package and their (first level or recursive) dependencies.
  11. Explore the packages that have been sent to the archives. Download the source code of the latest version or a specific one. Get their last CRAN check_result and the reason why they have been archived.
  12. Provide tools for task view maintenance: Detect the packages recently added to or updated in CRAN, check if they match some keywords, check if they are already recorded in a given task views.
  13. Use some bookmarks to various websites and search engines. Keywords can be typed directly in the R console and are sent to the search engine, then displayed in your browser. The list of the search engines is expected to grow (with your help).

Compare to other packages (packagefinder, websearchr) or web services (RDocumentation, rdrr) with similar objectives, the search options of RWsearch are more sophisticated and allow for a finer search. RWsearch also addresses a much larger number of web search engines. Non-standard evaluation (or evaluation of non-standard content) makes it user friendly.

Read the vignettes

5 vignettes are currently available (for the above topics):

1. Introduction (1, 2, 3, 4)
2. Print and download the documentation (5, 6)
3. Packages versions and dependencies + install packages (7, 8, 9)
4. Manage the task views (12, 5)
5. Bookmarks and web search engines (13)

RWsearch was presented at useR! 2019 in Toulouse, France

Copy Link

Version

Install

install.packages('RWsearch')

Monthly Downloads

394

Version

5.2.0

License

GPL-2

Maintainer

Patrice Kiener

Last Published

October 12th, 2024

Functions in RWsearch (5.2.0)

p_deps

Dependencies and Reverse Dependencies of Packages
funmaintext

Modify the Main Text and the Markdown Header in p_text Function
h_R

Open a Web Page in the Browser
p_deadline

Packages Flagged by CRAN With a Deadline
h_direct

Open a Web Page in the your browser
h_ttp

Open a Web Page in the Browser
p_check

Return CRAN Package Check Results
p_archive

Read Packages in CRAN archive
p_display

Display Package Information in HTML Pages
h_engine

Explore the Web with Various Search Engines
p_unload_all

Unload all non-base and non-recommended packages from the namespace
p_inst

A simple wrapper around install.packages()
p_table2pdf

Package Information in Console and PDF Files
p_inun

List of Installed, Uninstalled and Non-Existing Packages
p_text2pdf

Download Package Documentation in Text Files
p_html

HTML Help Page, PDF Manual and Vignettes
p_graph

Network and Graphs of Package Dependencies
p_down

Download the Package Documentation in One Directory or in Several Subdirectories
p_vers

Package Version and Number of Dependencies
s_crandb

Search Packages by Keywords in data.frame crandb
tvdb

Task Views (tvdb.rda)
s_sos

Search Packages and Functions on R-Project Help pages and RDocumentation
s_crandb_tvdb

Search For Recent Packages In crandb And In Task View
s_hs

Search Packages and Functions in Installed Packages
zcrandb

File zcrandb.rda: A Subset of crandb Dataset
ztvdb

File ztvdb.rda: A Subset of tvdb Dataset
s_tvdb

Search Packages in Task Views
f_pdf

PDF Pages of Functions
binarydb

CRAN Matrix Of Available Binary Packages (archivedb.rda)
crandb

CRAN Packages (crandb.rda)
checkdb

CRAN checks file (check_results.rds)
e_check

Check Results of Packages Identified by their Email Address
f_args

Names and Arguments of Functions
cnsc

Combine Standard and Non-Standard Content
cranmirrors_down

CRAN archive (CRAN-archive.html + archivedb)
archivedb

CRAN archive (CRAN-archive.html + archivedb)
RWsearch-package

Package RWsearch