11# R code {#r-code}
22
33Everyone has their own coding style and formats. There are however some best
4- practice guidelines that [ _ Bioconductor_ reviewers] [ reviewer-list ] will look for.
4+ practice guidelines that [ _ Bioconductor_ reviewers] [ reviewer-list ] will look for.
55
66<i class =" fab fa-r-project " ></i > can be a robust, fast and efficient programming
77language but often some coding practices result in less than ideal use of
@@ -31,7 +31,7 @@ Make use of appropriate existing packages (e.g.,
3131` r BiocStyle::Biocpkg("GenomicRanges") ` ) and classes (e.g.,
3232` r BiocStyle::Biocpkg("SummarizedExperiment") ` ,
3333` r BiocStyle::Biocpkg("Biobase") ` ::AnnotatedDataFrame,
34- ` r BiocStyle::Biocpkg("GenomicRanges") ` :; GRanges,
34+ ` r BiocStyle::Biocpkg("GenomicRanges") ` :: GRanges,
3535` r BiocStyle::Biocpkg("Biostrings") ` ::DNAStringSet) to avoid duplication of functionality
3636available in other [ _ Bioconductor_ ] [ ] packages. See
3737also [ Common Bioconductor Methods and Classes] [ bioc-common ] .
@@ -75,7 +75,7 @@ we recommend to use standard file format classes inheriting from
7575### Naming of packages, functions, and classes {#naming-functions}
7676
7777See section on [ package naming] ( #package-name ) . The concepts there should also
78- apply to function names, class names, etc.
78+ apply to function names, class names, etc.
7979
8080Avoid names that:
8181
@@ -111,7 +111,7 @@ separate packages.
111111
112112Remember to ** re-use** [ common _ Bioconductor_ methods and classes] [ bioc-common ]
113113before implementing new representations. This encourages
114- interoperability and simplifies your own package development.
114+ interoperability and simplifies your own package development.
115115
116116#### Class Names {#class-names}
117117
@@ -123,7 +123,7 @@ _Bioconductor_ prefers the use of S4 classes over S3 class. Please use the S4
123123representation for designing new classes. Again, we can not emphasize enough to
124124reuse existing class structure if at all possible. If an existing class
125125structure is not sufficient, it is also encouraged to look at extending or
126- containing an [ existing _ Bioconductor_ class] ( #commonclass ) .
126+ containing an [ existing _ Bioconductor_ class] ( #commonclass ) .
127127
128128If your data requires a new representation or function, carefully
129129design an S4 class or generic so that other package developers with
@@ -168,7 +168,7 @@ installation.
168168
169169
170170### Function development {#function-development}
171-
171+
172172#### Functions Names {#rcode-function-names}
173173
174174Function names should follow the following conventions:
@@ -195,7 +195,7 @@ helper functions.
195195* Nesting functions should be avoiding. It unnecessarily increases the main
196196 function length and makes the main function harder to read. Helper functions
197197 and internal functions should avoid being nested and include at the end of the
198- file or as a seperate file (e.g. internal.R, helpers.R, utils.R)
198+ file or as a seperate file (e.g. internal.R, helpers.R, utils.R)
199199
200200#### Function arguments {#function-arguments}
201201
@@ -233,8 +233,8 @@ already there.
233233
234234All system and package dependencies should be the latest publically available
235235version. All package dependencies must actively be on CRAN or
236- Bioconductor. Bioconductor will not recognize Remotes in Description and will
237- not install a lower version of a package or dependency.
236+ Bioconductor. Bioconductor will not recognize Remotes in DESCRIPTION and will
237+ not install a lower version of a package or dependency.
238238
239239#### Namespaces {#rcode-namespaces}
240240
@@ -387,7 +387,7 @@ from a variable.
387387* ` warning() ` communicates unusual situations handled by your code.
388388* ` stop() ` indicates an error condition.
389389* ` cat() ` or ` print() ` are used only when displaying an object to the user in a ` show ` method.
390-
390+
391391#### Graphic Device
392392
393393Use ` dev.new() ` to start a graphics drive if necessary. Avoid using ` x11() `
@@ -433,7 +433,7 @@ coding practices can be very unfortunate. Here are some suggestions.
433433### Reuse Existing Functionality and Classes
434434
435435Emphasized again for good measure! Reuse existing import/export methods,
436- functionality, and classes whenever possible.
436+ functionality, and classes whenever possible.
437437
438438### Vectorize
439439
0 commit comments