ropensci / RNeXML

Compare f98ebc9 ... +1 ... 24f26fa

Showing 3 of 12 files from the diff.

@@ -4,15 +4,15 @@
Loading
4 4
#' class name is namespaced with a package name.
5 5
#'
6 6
#' If the provided class name is not already namespaced (see
7 -
#' [methods::packageSlot()]), it will be namespaced with this package. This
7 +
#' `methods::packageSlot()`), it will be namespaced with this package. This
8 8
#' mechanism is used by `new()` to disambiguate if the class name clashes
9 9
#' with a class defined in another package.
10 10
#' @note This may not completely eliminate messages on standard error about
11 11
#'   classes with the same name having been found in different packages. If
12 12
#'   they appear, they will most likely have come from the call to the
13 -
#'   [methods::initialize()] generic that `new()` issues at the end.
13 +
#'   `methods::initialize()` generic that `new()` issues at the end.
14 14
#' @param Class the name of the S4 class to be instantiated
15 -
#' @param ... additional parameters for [methods::new()]
15 +
#' @param ... additional parameters for `methods::new()`
16 16
#' @importFrom methods new className packageSlot
17 17
New <- function(Class, ...) {
18 18
  if (is.null(packageSlot(Class))) Class <- className(Class, "RNeXML")

@@ -1,8 +1,8 @@
Loading
1 1
#' Read NeXML files into various R formats
2 2
#' 
3 -
#' @param x Path to the file to be read in. Or an \code{\link[XML]{XMLInternalDocument-class}} 
4 -
#' or \code{\link[XML]{XMLInternalNode-class}} 
5 -
#' @param ... Further arguments passed on to \code{\link[XML]{xmlParse}}
3 +
#' @param x Path to the file to be read in. An `XML::XMLDocument-class`
4 +
#' or \code{\link[XML]{XMLNode-class}} 
5 +
#' @param ... Further arguments passed on to \code{\link[XML]{xmlTreeParse}}
6 6
#' @import XML
7 7
#' @import httr
8 8
#' @aliases nexml_read read.nexml 

@@ -3,9 +3,9 @@
Loading
3 3
#' Finds the method that callNextMethod() should chain to
4 4
#'
5 5
#' Attempts to find the "next" method in the inheritance chain. This would
6 -
#' (ideally) be the method that [methods::callNextMethod()] would chain to,
7 -
#' as a result of the method [methods::addNextMethod()] would find (and return
8 -
#' in the `nextMethod` slot of the [MethodWithNext][methods::MethodWithNext-class]
6 +
#' (ideally) be the method that `methods::callNextMethod()` would chain to,
7 +
#' as a result of the method `methods::addNextMethod()` would find (and return
8 +
#' in the `nextMethod` slot of the `MethodWithNext`
9 9
#' object). Hence, in theory one shouldn't ever need this, but unfortunately
10 10
#' `addNextMethod()` is broken (and errors out) if one of the classes in the
11 11
#' signature name-clashes with an S4 class defined in another package that is
@@ -16,18 +16,18 @@
Loading
16 16
#' the signature that are defined in the package of the generic method from
17 17
#' which this function was invoked (directly or indirectly). If there are
18 18
#' no such parameters in the signature, or if there is more than one,
19 -
#' finding the next method is handed off to [methods::addNextMethod()].
19 +
#' finding the next method is handed off to `methods::addNextMethod()`.
20 20
#' @note In theory a class name clash between packages shouldn't be a problem
21 -
#'   because class names can be namespaced, and the [MethodDefinition][methods::MethodDefinition-class]
21 +
#'   because class names can be namespaced, and the `MethodDefinition`
22 22
#'   object passed to `addNextMethod()` has all the necessary namespace
23 23
#'   information. Hopefully, at some point this gets fixed in R, and then we
24 24
#'   don't need this anymore.
25 -
#' @param method [MethodDefinition][methods::MethodDefinition-class]), the method for which to find
25 +
#' @param method `MethodDefinition`, the method for which to find
26 26
#'   the next method
27 -
#' @param f [standardGeneric][methods::standardGeneric-class], the standard generic for which to find
27 +
#' @param f `standardGeneric`, the standard generic for which to find
28 28
#'   the next method. By default this will be obtained from `method`.
29 29
#' @param envir the environment in which to find the method
30 -
#' @return a [MethodDefinition][methods::MethodDefinition-class] object that is the next method in the
30 +
#' @return a `MethodDefinition` object that is the next method in the
31 31
#'   chain by inheritance
32 32
#' @importFrom methods getClassDef selectMethod addNextMethod
33 33
#' @importFrom utils packageName
@@ -74,17 +74,17 @@
Loading
74 74
#' Saves the next method in the method meta data
75 75
#'
76 76
#' Promotes the given method definition to an instance of
77 -
#' [MethodWithNext][methods::MethodWithNext-class], thereby recording the next
77 +
#' `MethodWithNext`, thereby recording the next
78 78
#' method in the `nextMethod` slot.
79 79
#' @note `MethodWithNext` objects are normally returned by
80 -
#'   [methods::addNextMethod()], but a constructor function for the class
80 +
#'   `methods::addNextMethod()`, but a constructor function for the class
81 81
#'   seems missing (or is undocumented?). This provides one.
82 -
#' @param method the [MethodDefinition][methods::MethodDefinition-class] object to promote
83 -
#' @param nextMethod the [MethodDefinition][methods::MethodDefinition-class]
82 +
#' @param method the `MethodDefinition` object to promote
83 +
#' @param nextMethod the `MethodDefinition`
84 84
#'   object to record as the next method
85 85
#' @param .cache whether to cache the promoted method definition object
86 -
#'   (using [methods::cacheMethod()])
87 -
#' @return an instance of [MethodWithNext][methods::MethodWithNext-class],
86 +
#'   (using `methods::cacheMethod()`)
87 +
#' @return an instance of `MethodWithNext`,
88 88
#'   which has the next method in the `nextMethod` slot
89 89
#' @importFrom methods getGeneric cacheMethod
90 90
#' @importClassesFrom methods MethodWithNext
@@ -108,9 +108,9 @@
Loading
108 108
#' Creates a label for a signature mirroring the result of `.sigLabel()`
109 109
#' in the `methods` package, which unfortunately does not export the function.
110 110
#' This is needed, for example, for the `excluded` slot in the
111 -
#' [MethodWithNext][methods::MethodWithNext-class] class.
111 +
#' `MethodWithNext` class.
112 112
#' @param signature the signature for which to create a label, as a vector
113 -
#'   or list of strings, or as an instance of [signature][methods::signature-class].
113 +
#'   or list of strings, or as an instance of `signature`.
114 114
#' @return a character string
115 115
.sigLabel <- function(signature) {
116 116
  if (is(signature, "signature")) signature <- signature@.Data
@@ -121,13 +121,13 @@
Loading
121 121
#'
122 122
#' If the calling environment does not have the next method to be invoked
123 123
#' in the inheritance chain cached yet, this will find the next method
124 -
#' (using [findNextMethod()]), and cache it in the calling environment such
125 -
#' that a subsequent call to [methods::callNextMethod()] will find and use
124 +
#' (using `findNextMethod()`, and cache it in the calling environment such
125 +
#' that a subsequent call to `methods::callNextMethod()` will find and use
126 126
#' it.
127 127
#'
128 128
#' As per the description, what this function does would normally already
129 -
#' be done by invoking [methods::callNextMethod()], so in theory this should
130 -
#' be entirely redundant at best. However, [methods::addNextMethod()], which
129 +
#' be done by invoking `methods::callNextMethod()`, so in theory this should
130 +
#' be entirely redundant at best. However, `methods::addNextMethod()`, which
131 131
#' is invoked by `callNextMethod()` if a next method isn't cached yet, is
132 132
#' broken (errors out) if one of the classes in the signature name-clashes
133 133
#' with a class defined in another package. Calling this function prior to
@@ -162,15 +162,15 @@
Loading
162 162
#' Calls the given generic with the given arguments, using the method
163 163
#' whose signature matches the arguments.
164 164
#'
165 -
#' Uses [methods::selectMethod()] to find the matching method. In theory,
165 +
#' Uses `methods::selectMethod()` to find the matching method. In theory,
166 166
#' this is at best wholly redundant with what standard S4 generics already
167 167
#' do by themselves. However, the generics dispatch for S4 seems (at least
168 168
#' currently) broken at least if the first argument in the signature is
169 169
#' a class that name-clashes with a class defined in another package. In
170 170
#' that case, whether the standard dispatch works correctly or not can depend
171 -
#' on [search order][base::search()], and can change within a session
171 +
#' on `search()` order, and can change within a session
172 172
#' depending on the order in which packages are loaded.
173 -
#' @param f the generic, as a character string or a [standardGeneric][methods::standardGeneric-class]
173 +
#' @param f the generic, as a character string or a `standardGeneric`
174 174
#'   object
175 175
#' @param ... the arguments (named and/or unnamed) with which to call the
176 176
#'   matching method

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
R 88.2%
Project Totals (38 files) 88.2%
Loading