Description
Set of R functions for the development of R functions, written according to the safer project specifications.
Content
Function | Description |
---|---|
close() | Close only specific graphic windows (devices). |
empty_graph() | Display an empty plot with a text in the middle of the window (for instance to specify that no plot can be drawn). |
inter_ticks() | Verify that object names in the environment defined by the pos argument are identical or not to object names in the above environments (following R Scope). This can be used to verify that names used for objects inside a function or in the working environment do not override names of objects already present in the above R environments, following the R scope. |
open() | Open a pdf or screen (GUI) graphic window and return initial graphic parameters. |
post_plot() | Redesign axis. If x.side = 0, y.side = 0, the function just adds text at topright of the graph and reset par() for next graphics and provides outputs. Provide also positions for legend or additional text on the graph. Use prior_plot() before this function for initial inactivation of the axis drawings. |
prior_plot() | Very convenient to erase the axes for post plot axis redrawing using post_plot(). Reinitialize and set the graphic parameters before plotting. CANNOT be used if no graphic device already opened. |
scale() | Attempt to select nice scale numbers when setting n ticks on a lim axis range. |
width() | Rescale the width of a window to open depending on the number of categories of qualitative variable to plot on the x-axis. Can be used for height, considering that it is as if it was a width. |
Read vignette("saferGraph")
for more details.
Installation
saferGraph can be currently be installed from GitHub:
install.packages("remotes")
remotes::install_github("https://github.com/safer-r/saferGraph") # or open R as admin and remotes::install_github("https://github.com/safer-r/saferGraph", lib = "C:/Program Files/R/R-4.3.1/library")
Older versions can be installed like this:
v <- "v1.0" # desired tag version
remotes::install_github(paste0("https://github.com/safer-r/saferGraph/tree/", v))
Licence
This package can be redistributed and/or modified under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchandability or fitness for a particular purpose. See the GNU General Public License for more details at https://www.gnu.org/licenses or in the Licence.txt attached file.
Citation
If you are using functions of saferGraph, please cite:
Wang H, Han Y, Serizay J, Millot GA (2023). The R saferGraph package. https://github.com/safer-r/saferGraph/.
Credits
Haiding Wang, Bioinformatics and Biostatistics Hub, Institut Pasteur, Paris, France
Yushi Han, Bioinformatics and Biostatistics Hub, Institut Pasteur, Paris, France
Jacques Serizai, Spatial Regulation of Genomes team, Institut Pasteur, Paris, France
Gael A. Millot, Bioinformatics and Biostatistics Hub, Institut Pasteur, Paris, France