18 Appendix 3 - R and Python Packages
18.1 R Core Package List
The base packages are part of R and are grouped bt functionality and to some degree of chonology of incorporation into the base distribution. The Packages of base functions are,
Package | Description |
---|---|
base | Base R functions |
compiler | Functions to provide an interface to a byte code compiler for R |
datasets | Base R datasets |
grDevices | R Graphics Devices and Support for Colours and Fonts. Support for base and grid graphics |
graphics | R functions for base graphics |
grid | The Grid Graphics Package. A rewrite of the graphics layout capabilities. |
methods | Formal Methods and Classes. Formally defined methods and classes for R objects and other programming tools. |
parallel | Support for Parallel Computation, including random-number generation. |
splines | Regression Spline Functions and Classes. |
stats | R statistical functions |
stats4 | Statistical Functions using S4 classes. |
tcltk | Interface and language bindings to Tcl/Tk GUI elements. |
tools | Tools for package development, administration and documentation. |
utils | R utility functions |
A list if contained functions in any package can be displayed in R by (eg. for parallel package),
library(help = "parallel") # of substitute any package name for "parallel"
The other list installed with first R install are the recommended packages. These are kind of and appocrapha of functions providing useful capabilities from some books and papers about specialized uses of the R system. These are,
Package | Description |
---|---|
kernsmooth | Functions for kernel smoothing (and density estimation) corresponding to the book: Wand, M.P. and Jones, M.C. (1995) “Kernel Smoothing”. |
MASS | Functions and datasets to support Venables and Ripley, “Modern Applied Statistics with S” (4th edition, 2002). |
Matrix | A rich hierarchy of matrix classes, including triangular, symmetric, and diagonal matrices, both dense and sparse, using ‘LAPACK’ and ‘SuiteSparse’ libraries. |
boot | Functions and datasets for bootstrapping from the book “Bootstrap Methods and Their Application” by A. C. Davison and D. V. Hinkley (1997, CUP), originally written by Angelo Canty for S. |
class | Various functions for classification, including k-nearest neighbour, Learning Vector Quantization and Self-Organizing Maps. |
cluster | Methods for Cluster analysis. Much extended the original from Peter Rousseeuw, Anja Struyf and Mia Hubert, based on Kaufman and Rousseeuw (1990) “Finding Groups in Data”. |
codetools | Code analysis tools for R. |
foreign | Reading and writing data stored by some versions of ‘Epi Info’, ‘Minitab’, ‘S’, ‘SAS’, ‘SPSS’, ‘Stata’, ‘Systat’, ‘Weka’, and for reading and writing some ‘dBase’ files. |
lattice | A powerful and elegant high-level data visualization system inspired by Trellis graphics, with an emphasis on multivariate data. |
mgcv | Multiscale Graph Correlation (MGC) is a framework developed by Shen et al. (2017) <arXiv:1609.05148> that extends global correlation procedures to be multiscale; |
nlme | Linear and Nonlinear Mixed Effects Models.Fit and compare Gaussian linear and nonlinear mixed-effects models. |
nnet | Feed-Forward Neural Networks and Multinomial Log-Linear Models |
rpart | Recursive partitioning for classification, regression and survival trees. An implementation of most of the functionality of the 1984 book by Breiman, Friedman, Olshen and Stone. |
spatial | Functions for kriging and point pattern analysis. |
survival | Contains the core survival analysis routines. |
There are literally thousands of CRAN repository packages accumulated over the years plus many more managed outside of the CRAN repository. Inclusion in CRAN requires a minimum standard process of package structure and documentation.
18.2 Python Standard Library2 List
see also: https://docs.python.org/3.7/library/index.html
18.2.1 Built-in Functions2
abs() | delattr() | hash() | memoryview() | set() |
all() | dict() | help() | min() | setattr() |
any() | dir() | hex() | next() | slice() |
ascii() | divmod() | id() | object() | sorted() |
bin() | enumerate() | input() | oct() | staticmethod() |
bool() | eval() | int() | open() | str() |
breakpoint() | exec() | isinstance() | ord() | sum() |
bytearray() | filter() | issubclass() | pow() | super() |
bytes() | float() | iter() | print() | tuple() |
callable() | format() | len() | property() | type() |
chr() | frozenset() | list() | range() | vars() |
classmethod() | getattr() | locals() | repr() | zip() |
compile() | globals() | map() | reversed() | import() |
complex() | hasattr() | max() | round() |
18.2.2 Built-in Constants
includes Constants added by the site module
False | True | None | NotImplemented | Ellipsis or “…” |
__debug__ |
quit(code=None) | exit(code=None) | copyright | |
credits | license |
18.2.3 Built-in Types
- Truth Value Testing
- Boolean Operations —
and
,or
,not
- Comparisons
== <= >= < > !=
- Numeric Types —
int
,float
,complex
- Iterator Types
- Sequence Types — ‘list’, ‘tuple’, ‘range’
- Text Sequence Type — ‘str’
- Binary Sequence Types — ‘bytes’,
bytearray
,memoryview
- Set Types —
set
,frozenset
- Mapping Types —
dict
- Context Manager
Types
- Other Built-in Types
- Special Attributes
18.2.4 Built-in Exceptions
- Base classes
- Concrete exceptions
- Warnings
- Exception hierarchy
18.2.5 Text Processing Services
string
— Common string operationsre
— Regular expression operationsdifflib
— Helpers for computing deltastextwrap
— Text wrapping and fillingunicodedata
— Unicode Databasestringprep
— Internet String Preparationrlcompleter
— Completion function for GNU readline
18.2.6 Binary Data Services
struct
— Interpret bytes as packed binary data- Functions and Exceptions
- Format Strings
- Classes
- codecs — Codec registry and base classes
- Codec Base Classes
- Encodings and Unicode
- Standard Encodings
- Python Specific Encodings
- Text Encodings
- Binary Transforms
- Text Transforms
encodings.idna
— Internationalized Domain Names in Applicationsencodings.mbcs
— Windows ANSI codepageencodings.utf_8_sig
— UTF-8 codec with BOM signature
18.2.7 Data Types
datetime
— Basic date and time types- Available Types
timedelta
Objectsdate
Objectsdatetime
Objectstime
Objectstzinfo
Objectstimezone
Objectsstrftime()
andstrptime()
Behavior
- Available Types
calendar
— General calendar-related functionscollections
— Container datatypesChainMap
objectsCounter
objectsdeque
objectsdefaultdic
t objectsnamedtuple()
Factory Function for Tuples with Named FieldsOrderedDict
objectsUserDict
objectsUserList
objectsUserString
objects
collections.abc
— Abstract Base Classes for Containersheapq
— Heap queue algorithmbisect
— Array bisection algorithmarray
— Efficient arrays of numeric valuesweakref
— Weak referencestypes
— Dynamic type creation and names for built-in typescopy
— Shallow and deep copy operationspprint
— Data pretty printerreprlib
— Alternate repr() implementationenum
— Support for enumerations
18.2.8 Numerical and Mathematical Modules
numbers
— Numeric abstract base classes- The numeric tower
math
— Mathematical functions- Number-theoretic and representation functions
- Power and logarithmic functions
- Trigonometric functions
- Angular conversion
- Hyperbolic functions
- Special functions
- Constants
cmath
— Mathematical functions for complex numbers- Conversions to and from polar coordinates
- Power and logarithmic functions
- Trigonometric functions
- Hyperbolic functions
- Classification functions
- Constants
decimal
— Decimal fixed point and floating point arithmeticfractions
— Rational numbersrandom
— Generate pseudo-random numbers- Bookkeeping functions
- Functions for integers
- Functions for sequences
- Real-valued distributions
- Alternative Generator
statistics
— Mathematical statistics functions- Averages and measures of central location
- Measures of spread
18.2.9 Functional Programming Modules
itertools
— Functions creating iterators for efficient loopingfunctools
— Higher-order functions and operations, functions that act on or return other functions.operator
— Standard operators as functions, efficient functions corresponding to the intrinsic operators of Python.
18.2.10 File and Directory Access
pathlib
— Object-oriented filesystem pathsos.path
— Common pathname manipulationsfileinput
— Iterate over lines from multiple input streamsstat
— Interpreting stat() resultsfilecmp
— File and Directory Comparisonstempfile
— Generate temporary files and directoriesglob
— Unix style pathname pattern expansionfnmatch
— Unix filename pattern matchinglinecache
— Random access to text linesshutil
— High-level file operationsmacpath
— Mac OS 9 path manipulation functions
18.2.11 Data Persistence
pickle
— Python object serializationcopyreg
— Register pickle support functionsshelve
— Python object persistencemarshal
— Internal Python object serializationdbm
— Interfaces to Unix “databases”sqlite3
— DB-API 2.0 interface for SQLite databases
18.2.12 Data Compression and Archiving
zlib
— Compression compatible with gzipgzip
— Support for gzip filesbz2
— Support for bzip2 compressionlzma
— Compression using the LZMA algorithmzipfile
— Work with ZIP archivestarfile
— Read and write tar archive files
18.2.13 File Formats
csv
— CSV File Reading and Writingconfigparse
— Configuration file parsernetrc
— netrc file processingxdrlib
— Encode and decode XDR dataplistlib
— Generate and parse Mac OS X .plist files
18.2.14 Cryptographic Services
hashlib
— Secure hashes and message digestshmac
— Keyed-Hashing for Message Authenticationsecrets
— Generate secure random numbers for managing secrets
18.2.15 Generic Operating System Services
os
— Miscellaneous operating system interfacesio
— Core tools for working with streamstime
— Time access and conversionsargparse
— Parser for command-line options, arguments and sub-commandsgetopt
— C-style parser for command line optionslogging
— Logging facility for Pythonlogging.config
— Logging configurationlogging.handlers
— Logging handlersgetpass
— Portable password inputcurses
— Terminal handling for character-cell displayscurses.textpad
— Text input widget for curses programscurses.ascii
— Utilities for ASCII characterscurses.panel
— A panel stack extension for cursesplatform
— Access to underlying platform’s identifying dataerrno
— Standard errno system symbolsctypes
— A foreign function library for Python
18.2.16 Concurrent Execution
threading
— Thread-based parallelismmultiprocessing
— Process-based parallelismconcurrent
concurrent.futures
— Launching parallel tasks
subprocess
— Subprocess managementsched
— Event schedulerqueue
— A synchronized queue class_thread
— Low-level threading API_dummy_thread
— Drop-in replacement for the _thread moduledummy_threading
— Drop-in replacement for the threading module
18.2.17 Context Variables
contextvars
- module provides APIs to manage, store, and access context-local state (context variables)asyncio
- support for asynchronous io
18.2.18 Networking and Interprocess Communication
asyncio
— Asynchronous I/O (see associated context services)socket
— Low-level networking interfacessl
— TLS/SSL wrapper for socket objectsselect
— Waiting for I/O completionselectors
— High-level I/O multiplexingasyncore
— Asynchronous socket handler- `asynchat — Asynchronous socket command/response handler
signal
— Set handlers for asynchronous eventsmmap
— Memory-mapped file support
18.2.19 Internet Data Handling
email
— An email and MIME handling packagejson
— JSON encoder and decodermailcap
— Mailcap file handlingmailbox
— Manipulate mailboxes in various formatsmimetypes
— Map filenames to MIME typesbase64
— Base16, Base32, Base64, Base85 Data Encodingsbinhex
— Encode and decode binhex4 filesbinascii
— Convert between binary and ASCIIquopri
— Encode and decode MIME quoted-printable datauu
— Encode and decode uuencode files
18.2.20 Structured Markup Processing Tools
html
— HyperText Markup Language supporthtml.parser
— Simple HTML and XHTML parserhtml.entities
— Definitions of HTML general entities
xml
XML Processing Modulesxml.etree.ElementTree
— The ElementTree XML APIxml.dom
— The Document Object Model APIxml.dom.minidom
— Minimal DOM implementation
xml.dom.pulldom
— Support for building partial DOM treesxml.sax
— Support for SAX2 parsersxml.sax.handler
— Base classes for SAX handlersxml.sax.saxutils
— SAX Utilitiesxml.sax.xmlreader
— Interface for XML parsersxml.parsers.expat
— Fast XML parsing using Expat
18.2.21 Internet Protocols and Support
- `webbrowser — Convenient Web-browser controller
cgi
— Common Gateway Interface supportcgitb
— Traceback manager for CGI scriptswsgiref
— WSGI Utilities and Reference Implementationurllib
— URL handling modulesurllib.request
— Extensible library for opening URLsurllib.response
— Response classes used by urlliburllib.parse
— Parse URLs into componentsurllib.error
— Exception classes raised by urllib.requesturllib.robotparser
— Parser for robots.txt
http
— HTTP moduleshttp.client
— HTTP protocol client
ftplib
— FTP protocol clientpoplib
— POP3 protocol clientimaplib
— IMAP4 protocol clientnntplib
— NNTP protocol clientsmtplib
— SMTP protocol clientsmtpd
— SMTP Servertelnetlib
— Telnet clientuuid
— UUID objects according to RFC 4122socketserver
— A framework for network servershttp.server
— HTTP servershttp.cookie
— HTTP state managementhttp.cookiejar
— Cookie handling for HTTP clientsxmlrpc
— XMLRPC server and client modulesxmlrpc.client
— XML-RPC client accessxmlrpc.server
— Basic XML-RPC servers
ipaddress
— IPv4/IPv6 manipulation library
18.2.22 Multimedia Services
audioop
— Manipulate raw audio dataaifc
— Read and write AIFF and AIFC filessunau
— Read and write Sun AU fileswave
— Read and write WAV fileschunk
— Read IFF chunked datacolorsys
— Conversions between color systemsimghdr
— Determine the type of an imagesndhdr
— Determine type of sound fileossaudiodev
— Access to OSS-compatible audio devices
18.2.23 Internationalization
gettext
— Multilingual internationalization serviceslocale
— Internationalization services
18.2.24 Program Frameworks
turtle
— Turtle graphicscmd
— Support for line-oriented command interpretersshlex
— Simple lexical analysis
18.2.25 Graphical User Interfaces with Tk
tkinter
— Python interface to Tcl/Tktkinter.ttk
— Tk themed widgetstkinter.tix
— Extension widgets for Tktkinter.scrolledtext
— Scrolled Text WidgetIDLE
- Python’s Integrated Development and Learning Environment- Other Graphical User Interface Packages
- PyGObject - Provides introspection bindings for C libraries, incl. GTK+ 3 widget set.
- PyGTK - PyGTK provides bindings for an older version of the library, GTK+ 2.
- PyQt - A sip-wrapped binding to the Qt toolkit.
- PySide - A newer binding to the Qt toolkit, provided by Nokia..
wxPython
- A cross-platform GUI toolkit for Python that is built around wxWidgets C++ toolkit
18.2.26 Development Tools
typing
— Support for type hintspydoc
— Documentation generator and online help systemdoctest
— Test interactive Python examplesunittest
— Unit testing frameworkunittest.mock
— mock object library
2to3
- Automated Python 2 to 3 code translationtest
— Regression tests package for Pythontest.support
— Utilities for the Python test suitetest.support.script_helper
— Utilities for the Python execution tests
18.2.27 Debugging and Profiling
bdb
— Debugger frameworkfaulthandler
— Dump the Python tracebackpdb
— The Python Debugger- The Python Profilers
timeit
— Measure execution time of small code snippetstrace
— Trace or track Python statement executiontracemalloc
— Trace memory allocations
18.2.28 Software Packaging and Distribution
distutils
— Building and installing Python modulesensurepip
— Bootstrapping the pip installervenv
— Creation of virtual environmentszipapp
— Manage executable Python zip archives
18.2.29 Python Runtime Services
sys
— System-specific parameters and functionssysconfig
— Provide access to Python’s configuration informationbuiltins
— Built-in objects__main__
— Top-level script environmentwarnings
— Warning controldataclasses
— Data Classescontextlib
— Utilities for with-statement contextsabc
— Abstract Base Classesatexit
— Exit handlerstraceback
— Print or retrieve a stack traceback__future__
— Future statement definitionsgc
— Garbage Collector interfaceinspect
— Inspect live objectssite
— Site-specific configuration hook
18.2.30 Custom Python Interpreters
code
— Interpreter base classescodeop
— Compile Python code
18.2.31 Importing Modules
zipimport
— Import modules from Zip archivespkgutil
— Package extension utilitymodulefinder
— Find modules used by a scriptrunpy
— Locating and executing Python modulesimportlib
— The implementation of import
18.2.32 Python Language Services
parser
— Access Python parse treesast
— Abstract Syntax Treessymtable
— Access to the compiler’s symbol tablessymbol
— Constants used with Python parse treestoken
— Constants used with Python parse treeskeyword
— Testing for Python keywordstokenize
— Tokenizer for Python sourcetabnanny
— Detection of ambiguous indentationpyclbr
— Python class browser supportpy_compile
— Compile Python source filescompileall
— Byte-compile Python librariesdis
— Disassembler for Python bytecodepickletools
— Tools for pickle developers
18.2.33 Miscellaneous Services
formatter
— Generic output formatting
18.2.34 MS Windows Specific Services
See also the pywin32 extensions. These are available to install via PIP, and provide access to many of the Windows APIs from Python.
msilib
— Read and write Microsoft Installer filesmsvcrt
— Useful routines from the MS VC++ runtimewinreg
— Windows registry accesswinsound
— Sound-playing interface for Windows
See also “Undocumented services”" below.
18.2.35 Unix Specific Services
Module provides interfaces to features that are unique to the Unix operating system, or in some cases to some or many variants of it.
posix
— The most common POSIX system callspwd
— The password databasespwd
— The shadow password databasegrp
— The group databasecrypt
— Function to check Unix passwordstermios
— POSIX style tty controltty
— Terminal control functionspty
— Pseudo-terminal utilitiescntl
— The fcntl and ioctl system callspipes
— Interface to shell pipelinesresource
— Resource usage informationnis
— Interface to Sun’s NIS (Yellow Pages)syslog
— Unix syslog library routines
See also “Undocumented services”" below.
18.2.36 Undocumented Modules
ntpath
— Implementation of os.path on Win32 and Win64 platforms.posixpath
— Implementation of os.path on POSIX.
18.3 Other Package Sources (Third Party)
18.3.1 CRAN R Package Repository
The packages of the CRAN Package repository meet a minimum requirement for package documentation and usability in order to be included the Available CRAN Packages list. There is also a compilation of the packages by topic in the CRAN Task Views.
An external repository developed and managed by bioinformatics genomic oriented users in Bioconnector.
Many high quality packages are available from github repositories, particularly thos maintained by RStudio