@@ -197,16 +197,35 @@ if (packageVersion("plyr") <= package_version("1.7.1")) {
197
197
}
198
198
199
199
200
- # Give a deprecation error, warning, or messsage, depending on version number.
201
- #
202
- # @param version The _last_ version of ggplot2 where this function was good
203
- # (in other words, the last version where it was not deprecated).
204
- # @param message The message to print
200
+ # ' Give a deprecation error, warning, or messsage, depending on version number.
201
+ # '
202
+ # ' Version numbers have the format <major>.<minor>.<subminor>, like 0.9.2.
203
+ # ' This function compares the current version number of ggplot2 against the
204
+ # ' specified \code{version}, which is the most recent version before the
205
+ # ' function (or other object) was deprecated.
206
+ # '
207
+ # ' \code{gg_dep} will give an error, warning, or message, depending on the
208
+ # ' difference between the current ggplot2 version and the specified
209
+ # ' \code{version}.
210
+ # '
211
+ # ' If the current major number is greater than \code{version}'s major number,
212
+ # ' or if the current minor number is more than 1 greater than \code{version}'s
213
+ # ' minor number, give an error.
214
+ # '
215
+ # ' If the current minor number differs from \code{version}'s minor number by
216
+ # ' one, give a warning.
217
+ # '
218
+ # ' If the current subminor number differs from \code{version}'s subminor
219
+ # ' number, print a message.
220
+ # '
221
+ # ' @param version The last version of ggplot2 where this function was good
222
+ # ' (in other words, the last version where it was not deprecated).
223
+ # ' @param message The message to print.
224
+ # ' @export
205
225
gg_dep <- function (version , msg ) {
206
226
v <- as.package_version(version )
207
227
cv <- packageVersion(" ggplot2" )
208
228
209
- # Version number is major.minor.subminor, like 0.9.2
210
229
# If current major number is greater than last-good major number, or if
211
230
# current minor number is more than 1 greater than last-good minor number,
212
231
# give error.
0 commit comments