Permalink
Browse files

tweaks to messages

git-svn-id: https://svn.r-project.org/R/trunk@60841 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information...
ripley
ripley committed Sep 30, 2012
1 parent 9afe61d commit 4570c4cabbb21fac014b26fdb2a27389fb197e94
Showing with 4,868 additions and 3,855 deletions.
  1. +3 −3 share/R/examples-header.R
  2. +4 −4 share/R/nspackloader.R
  3. +1 −1 src/library/base/R/LAPACK.R
  4. +4 −2 src/library/base/R/RNG.R
  5. +1 −2 src/library/base/R/as.R
  6. +4 −3 src/library/base/R/attach.R
  7. +1 −1 src/library/base/R/attr.R
  8. +1 −1 src/library/base/R/connections.R
  9. +1 −1 src/library/base/R/cut.R
  10. +15 −13 src/library/base/R/dataframe.R
  11. +6 −6 src/library/base/R/dates.R
  12. +4 −4 src/library/base/R/datetime.R
  13. +1 −1 src/library/base/R/det.R
  14. +1 −1 src/library/base/R/diag.R
  15. +4 −4 src/library/base/R/eigen.R
  16. +2 −2 src/library/base/R/factor.R
  17. +1 −1 src/library/base/R/formals.R
  18. +1 −1 src/library/base/R/frametools.R
  19. +7 −7 src/library/base/R/library.R
  20. +5 −3 src/library/base/R/load.R
  21. +1 −1 src/library/base/R/mapply.R
  22. +4 −4 src/library/base/R/matrix.R
  23. +2 −2 src/library/base/R/methodsSupport.R
  24. +5 −5 src/library/base/R/namespace.R
  25. +2 −2 src/library/base/R/octhex.R
  26. +2 −2 src/library/base/R/sort.R
  27. +3 −2 src/library/base/R/svd.R
  28. +4 −9 src/library/base/R/table.R
  29. +2 −2 src/library/base/R/taskCallback.R
  30. +3 −3 src/library/base/R/version.R
  31. +60 −108 src/library/base/po/R-base.pot
  32. +148 −121 src/library/base/po/R-da.po
  33. +177 −118 src/library/base/po/R-de.po
  34. +177 −117 src/library/base/po/R-fr.po
  35. +143 −120 src/library/base/po/R-it.po
  36. +176 −117 src/library/base/po/R-ja.po
  37. +176 −117 src/library/base/po/R-ko.po
  38. +177 −117 src/library/base/po/R-nn.po
  39. +176 −117 src/library/base/po/R-pl.po
  40. +168 −119 src/library/base/po/R-pt_BR.po
  41. +176 −117 src/library/base/po/R-ru.po
  42. +64 −113 src/library/base/po/R-tr.po
  43. +172 −117 src/library/base/po/R-zh_CN.po
  44. +1 −1 src/library/compiler/R/cmp.R
  45. +1 −1 src/library/compiler/noweb/compiler.nw
  46. +2 −2 src/library/compiler/po/R-compiler.pot
  47. +3 −2 src/library/compiler/po/R-da.po
  48. +3 −2 src/library/compiler/po/R-de.po
  49. +3 −2 src/library/compiler/po/R-fr.po
  50. +3 −2 src/library/compiler/po/R-ja.po
  51. +3 −2 src/library/compiler/po/R-ko.po
  52. +3 −2 src/library/compiler/po/R-pl.po
  53. +3 −2 src/library/compiler/po/R-pt_BR.po
  54. +3 −2 src/library/compiler/po/R-ru.po
  55. +3 −2 src/library/compiler/po/R-zh_CN.po
  56. +6 −6 src/library/grDevices/R/convertColor.R
  57. +1 −1 src/library/grDevices/R/device.R
  58. +5 −4 src/library/grDevices/R/postscript.R
  59. +1 −1 src/library/grDevices/R/prettyDate.R
  60. +25 −17 src/library/grDevices/po/R-da.po
  61. +24 −16 src/library/grDevices/po/R-de.po
  62. +11 −16 src/library/grDevices/po/R-en_GB.po
  63. +24 −16 src/library/grDevices/po/R-fr.po
  64. +10 −16 src/library/grDevices/po/R-grDevices.pot
  65. +21 −17 src/library/grDevices/po/R-it.po
  66. +25 −17 src/library/grDevices/po/R-ja.po
  67. +21 −17 src/library/grDevices/po/R-ko.po
  68. +25 −17 src/library/grDevices/po/R-pl.po
  69. +22 −17 src/library/grDevices/po/R-pt_BR.po
  70. +24 −16 src/library/grDevices/po/R-ru.po
  71. +24 −16 src/library/grDevices/po/R-zh_CN.po
  72. +2 −2 src/library/graphics/R/coplot.R
  73. +1 −1 src/library/graphics/R/hist.R
  74. +1 −1 src/library/graphics/R/image.R
  75. +1 −1 src/library/graphics/R/layout.R
  76. +3 −5 src/library/graphics/R/legend.R
  77. +1 −1 src/library/graphics/R/stars.R
  78. +3 −3 src/library/graphics/R/units.R
  79. +12 −11 src/library/graphics/po/R-da.po
  80. +18 −10 src/library/graphics/po/R-de.po
  81. +18 −10 src/library/graphics/po/R-fr.po
  82. +10 −10 src/library/graphics/po/R-graphics.pot
  83. +18 −10 src/library/graphics/po/R-it.po
  84. +18 −10 src/library/graphics/po/R-ja.po
  85. +18 −10 src/library/graphics/po/R-ko.po
  86. +18 −10 src/library/graphics/po/R-pl.po
  87. +18 −10 src/library/graphics/po/R-pt_BR.po
  88. +18 −10 src/library/graphics/po/R-ru.po
  89. +18 −10 src/library/graphics/po/R-zh_CN.po
  90. +1 −1 src/library/parallel/R/clusterApply.R
  91. +1 −1 src/library/parallel/R/snow.R
  92. +4 −5 src/library/parallel/R/snowSOCK.R
  93. +1 −2 src/library/parallel/R/unix/mcfork.R
  94. +17 −10 src/library/parallel/po/R-da.po
  95. +20 −10 src/library/parallel/po/R-de.po
  96. +20 −10 src/library/parallel/po/R-fr.po
  97. +17 −10 src/library/parallel/po/R-ko.po
  98. +12 −10 src/library/parallel/po/R-parallel.pot
  99. +21 −10 src/library/parallel/po/R-pl.po
  100. +19 −10 src/library/parallel/po/R-ru.po
  101. +18 −10 src/library/parallel/po/R-zh_CN.po
  102. +4 −4 src/library/stats/R/HoltWinters.R
  103. +2 −2 src/library/stats/R/StructTS.R
  104. +9 −12 src/library/stats/R/ar.R
  105. +4 −2 src/library/stats/R/bandwidths.R
  106. +1 −1 src/library/stats/R/cor.test.R
  107. +1 −1 src/library/stats/R/cutree.R
  108. +1 −1 src/library/stats/R/dendrogram.R
  109. +1 −1 src/library/stats/R/distn.R
  110. +7 −7 src/library/stats/R/family.R
  111. +2 −2 src/library/stats/R/filter.R
  112. +2 −2 src/library/stats/R/friedman.test.R
  113. +1 −1 src/library/stats/R/ftable.R
  114. +3 −2 src/library/stats/R/glm.R
  115. +2 −2 src/library/stats/R/ks.test.R
  116. +6 −5 src/library/stats/R/lm.R
  117. +1 −1 src/library/stats/R/logLik.R
  118. +2 −2 src/library/stats/R/manova.R
  119. +1 −1 src/library/stats/R/models.R
  120. +2 −2 src/library/stats/R/nlminb.R
  121. +3 −3 src/library/stats/R/nls.R
  122. +1 −1 src/library/stats/R/pairwise.R
  123. +1 −1 src/library/stats/R/plot.lm.R
  124. +1 −1 src/library/stats/R/poisson.test.R
  125. +2 −2 src/library/stats/R/power.R
  126. +1 −1 src/library/stats/R/power.anova.test.R
  127. +1 −1 src/library/stats/R/princomp.R
  128. +1 −1 src/library/stats/R/proj.R
  129. +3 −3 src/library/stats/R/reshape.R
  130. +1 −1 src/library/stats/R/smooth.R
  131. +3 −3 src/library/stats/R/smspline.R
  132. +1 −1 src/library/stats/R/ts.R
  133. +4 −4 src/library/stats/R/wilcox.test.R
  134. +58 −82 src/library/stats/po/R-da.po
  135. +129 −86 src/library/stats/po/R-de.po
  136. +130 −86 src/library/stats/po/R-fr.po
  137. +109 −88 src/library/stats/po/R-it.po
  138. +128 −85 src/library/stats/po/R-ja.po
  139. +110 −89 src/library/stats/po/R-ko.po
  140. +130 −87 src/library/stats/po/R-pl.po
  141. +114 −89 src/library/stats/po/R-pt_BR.po
  142. +130 −86 src/library/stats/po/R-ru.po
  143. +49 −79 src/library/stats/po/R-stats.pot
  144. +110 −91 src/library/stats/po/R-tr.po
  145. +127 −84 src/library/stats/po/R-zh_CN.po
  146. +2 −2 src/library/tools/po/R-da.po
  147. +2 −2 src/library/tools/po/R-de.po
  148. +2 −2 src/library/tools/po/R-fr.po
  149. +2 −2 src/library/tools/po/R-it.po
  150. +2 −2 src/library/tools/po/R-ja.po
  151. +2 −2 src/library/tools/po/R-ko.po
  152. +2 −2 src/library/tools/po/R-pl.po
  153. +2 −2 src/library/tools/po/R-pt_BR.po
  154. +2 −2 src/library/tools/po/R-ru.po
  155. +2 −2 src/library/tools/po/R-tools.pot
  156. +2 −2 src/library/tools/po/R-tr.po
  157. +2 −2 src/library/tools/po/R-zh_CN.po
  158. BIN src/library/translations/inst/da/LC_MESSAGES/R-base.mo
  159. BIN src/library/translations/inst/da/LC_MESSAGES/R-compiler.mo
  160. BIN src/library/translations/inst/da/LC_MESSAGES/R-grDevices.mo
  161. BIN src/library/translations/inst/da/LC_MESSAGES/R-graphics.mo
  162. BIN src/library/translations/inst/da/LC_MESSAGES/R-parallel.mo
  163. BIN src/library/translations/inst/da/LC_MESSAGES/R-stats.mo
  164. BIN src/library/translations/inst/da/LC_MESSAGES/R-tools.mo
  165. BIN src/library/translations/inst/da/LC_MESSAGES/R-utils.mo
  166. BIN src/library/translations/inst/de/LC_MESSAGES/R-base.mo
  167. BIN src/library/translations/inst/de/LC_MESSAGES/R-compiler.mo
  168. BIN src/library/translations/inst/de/LC_MESSAGES/R-grDevices.mo
  169. BIN src/library/translations/inst/de/LC_MESSAGES/R-graphics.mo
  170. BIN src/library/translations/inst/de/LC_MESSAGES/R-parallel.mo
  171. BIN src/library/translations/inst/de/LC_MESSAGES/R-stats.mo
  172. BIN src/library/translations/inst/de/LC_MESSAGES/R-tools.mo
  173. BIN src/library/translations/inst/de/LC_MESSAGES/R-utils.mo
  174. BIN src/library/translations/inst/en@quot/LC_MESSAGES/R-base.mo
  175. BIN src/library/translations/inst/en@quot/LC_MESSAGES/R-compiler.mo
  176. BIN src/library/translations/inst/en@quot/LC_MESSAGES/R-grDevices.mo
  177. BIN src/library/translations/inst/en@quot/LC_MESSAGES/R-graphics.mo
  178. BIN src/library/translations/inst/en@quot/LC_MESSAGES/R-parallel.mo
  179. BIN src/library/translations/inst/en@quot/LC_MESSAGES/R-stats.mo
  180. BIN src/library/translations/inst/en@quot/LC_MESSAGES/R-tools.mo
  181. BIN src/library/translations/inst/en@quot/LC_MESSAGES/R-utils.mo
  182. BIN src/library/translations/inst/en_GB/LC_MESSAGES/R-grDevices.mo
  183. BIN src/library/translations/inst/fr/LC_MESSAGES/R-base.mo
  184. BIN src/library/translations/inst/fr/LC_MESSAGES/R-compiler.mo
  185. BIN src/library/translations/inst/fr/LC_MESSAGES/R-grDevices.mo
  186. BIN src/library/translations/inst/fr/LC_MESSAGES/R-graphics.mo
  187. BIN src/library/translations/inst/fr/LC_MESSAGES/R-parallel.mo
  188. BIN src/library/translations/inst/fr/LC_MESSAGES/R-stats.mo
  189. BIN src/library/translations/inst/fr/LC_MESSAGES/R-tools.mo
  190. BIN src/library/translations/inst/fr/LC_MESSAGES/R-utils.mo
  191. BIN src/library/translations/inst/it/LC_MESSAGES/R-base.mo
  192. BIN src/library/translations/inst/it/LC_MESSAGES/R-grDevices.mo
  193. BIN src/library/translations/inst/it/LC_MESSAGES/R-graphics.mo
  194. BIN src/library/translations/inst/it/LC_MESSAGES/R-stats.mo
  195. BIN src/library/translations/inst/it/LC_MESSAGES/R-tools.mo
  196. BIN src/library/translations/inst/ja/LC_MESSAGES/R-base.mo
  197. BIN src/library/translations/inst/ja/LC_MESSAGES/R-compiler.mo
  198. BIN src/library/translations/inst/ja/LC_MESSAGES/R-grDevices.mo
  199. BIN src/library/translations/inst/ja/LC_MESSAGES/R-graphics.mo
  200. BIN src/library/translations/inst/ja/LC_MESSAGES/R-stats.mo
  201. BIN src/library/translations/inst/ja/LC_MESSAGES/R-tools.mo
  202. BIN src/library/translations/inst/ja/LC_MESSAGES/R-utils.mo
  203. BIN src/library/translations/inst/ko/LC_MESSAGES/R-base.mo
  204. BIN src/library/translations/inst/ko/LC_MESSAGES/R-compiler.mo
  205. BIN src/library/translations/inst/ko/LC_MESSAGES/R-grDevices.mo
  206. BIN src/library/translations/inst/ko/LC_MESSAGES/R-graphics.mo
  207. BIN src/library/translations/inst/ko/LC_MESSAGES/R-parallel.mo
  208. BIN src/library/translations/inst/ko/LC_MESSAGES/R-stats.mo
  209. BIN src/library/translations/inst/ko/LC_MESSAGES/R-tools.mo
  210. BIN src/library/translations/inst/ko/LC_MESSAGES/R-utils.mo
  211. BIN src/library/translations/inst/nn/LC_MESSAGES/R-base.mo
  212. BIN src/library/translations/inst/pl/LC_MESSAGES/R-base.mo
  213. BIN src/library/translations/inst/pl/LC_MESSAGES/R-compiler.mo
  214. BIN src/library/translations/inst/pl/LC_MESSAGES/R-grDevices.mo
  215. BIN src/library/translations/inst/pl/LC_MESSAGES/R-graphics.mo
  216. BIN src/library/translations/inst/pl/LC_MESSAGES/R-parallel.mo
  217. BIN src/library/translations/inst/pl/LC_MESSAGES/R-stats.mo
  218. BIN src/library/translations/inst/pl/LC_MESSAGES/R-tools.mo
  219. BIN src/library/translations/inst/pl/LC_MESSAGES/R-utils.mo
  220. BIN src/library/translations/inst/pt_BR/LC_MESSAGES/R-base.mo
  221. BIN src/library/translations/inst/pt_BR/LC_MESSAGES/R-compiler.mo
  222. BIN src/library/translations/inst/pt_BR/LC_MESSAGES/R-grDevices.mo
  223. BIN src/library/translations/inst/pt_BR/LC_MESSAGES/R-graphics.mo
  224. BIN src/library/translations/inst/pt_BR/LC_MESSAGES/R-stats.mo
  225. BIN src/library/translations/inst/pt_BR/LC_MESSAGES/R-tools.mo
  226. BIN src/library/translations/inst/pt_BR/LC_MESSAGES/R-utils.mo
  227. BIN src/library/translations/inst/ru/LC_MESSAGES/R-base.mo
  228. BIN src/library/translations/inst/ru/LC_MESSAGES/R-compiler.mo
  229. BIN src/library/translations/inst/ru/LC_MESSAGES/R-grDevices.mo
  230. BIN src/library/translations/inst/ru/LC_MESSAGES/R-graphics.mo
  231. BIN src/library/translations/inst/ru/LC_MESSAGES/R-parallel.mo
  232. BIN src/library/translations/inst/ru/LC_MESSAGES/R-stats.mo
  233. BIN src/library/translations/inst/ru/LC_MESSAGES/R-tools.mo
  234. BIN src/library/translations/inst/ru/LC_MESSAGES/R-utils.mo
  235. BIN src/library/translations/inst/tr/LC_MESSAGES/R-base.mo
  236. BIN src/library/translations/inst/tr/LC_MESSAGES/R-stats.mo
  237. BIN src/library/translations/inst/tr/LC_MESSAGES/R-tools.mo
  238. BIN src/library/translations/inst/tr/LC_MESSAGES/R-utils.mo
  239. BIN src/library/translations/inst/zh_CN/LC_MESSAGES/R-base.mo
  240. BIN src/library/translations/inst/zh_CN/LC_MESSAGES/R-compiler.mo
  241. BIN src/library/translations/inst/zh_CN/LC_MESSAGES/R-grDevices.mo
  242. BIN src/library/translations/inst/zh_CN/LC_MESSAGES/R-graphics.mo
  243. BIN src/library/translations/inst/zh_CN/LC_MESSAGES/R-parallel.mo
  244. BIN src/library/translations/inst/zh_CN/LC_MESSAGES/R-stats.mo
  245. BIN src/library/translations/inst/zh_CN/LC_MESSAGES/R-tools.mo
  246. BIN src/library/translations/inst/zh_CN/LC_MESSAGES/R-utils.mo
  247. +2 −2 src/library/utils/R/RSiteSearch.R
  248. +2 −2 src/library/utils/R/Sweave.R
  249. +22 −22 src/library/utils/R/aspell.R
  250. +1 −1 src/library/utils/R/bug.report.R
  251. +2 −2 src/library/utils/R/citation.R
  252. +2 −4 src/library/utils/R/combn.R
  253. +2 −5 src/library/utils/R/completion.R
  254. +1 −1 src/library/utils/R/de.R
  255. +3 −1 src/library/utils/R/edit.R
  256. +4 −2 src/library/utils/R/format.R
  257. +7 −7 src/library/utils/R/help.search.R
  258. +1 −1 src/library/utils/R/linkhtml.R
  259. +1 −1 src/library/utils/R/package.skeleton.R
  260. +1 −1 src/library/utils/R/packages.R
  261. +1 −1 src/library/utils/R/progressBar.R
  262. +1 −1 src/library/utils/R/relist.R
  263. +2 −2 src/library/utils/R/roman.R
  264. +1 −1 src/library/utils/R/rtags.R
  265. +1 −1 src/library/utils/R/write.table.R
  266. +41 −55 src/library/utils/po/R-da.po
  267. +74 −54 src/library/utils/po/R-de.po
  268. +75 −54 src/library/utils/po/R-fr.po
  269. +74 −54 src/library/utils/po/R-ja.po
  270. +74 −54 src/library/utils/po/R-ko.po
  271. +74 −54 src/library/utils/po/R-pl.po
  272. +26 −52 src/library/utils/po/R-pt_BR.po
  273. +73 −53 src/library/utils/po/R-ru.po
  274. +25 −52 src/library/utils/po/R-tr.po
  275. +24 −51 src/library/utils/po/R-utils.pot
  276. +73 −54 src/library/utils/po/R-zh_CN.po
  277. +3 −3 tests/Examples/datasets-Ex.Rout.save
  278. +3 −3 tests/Examples/graphics-Ex.Rout.save
  279. +6 −6 tests/Examples/grid-Ex.Rout.save
  280. +5 −5 tests/Examples/stats-Ex.Rout.save
  281. +2 −2 tests/R-intro.Rout.save
  282. +4 −4 tests/reg-tests-2.Rout.save
@@ -41,17 +41,17 @@ assign("cleanEx",
set.seed(1)
options(warn = 1)
.CheckExEnv <- as.environment("CheckExEnv")
- delayedAssign("T", stop("T used instead of TRUE"),
+ delayedAssign("T", stop("T used instead of TRUE", domain = NA),
assign.env = .CheckExEnv)
- delayedAssign("F", stop("F used instead of FALSE"),
+ delayedAssign("F", stop("F used instead of FALSE", domain = NA),
assign.env = .CheckExEnv)
sch <- search()
newitems <- sch[! sch %in% .oldSearch]
if(length(newitems)) tools:::detachPackages(newitems)
missitems <- .oldSearch[! .oldSearch %in% sch]
if(length(missitems))
warning("items ", paste(missitems, collapse=", "),
- " have been removed from the search path")
+ " have been removed from the search path", domain = NA)
},
pos = "CheckExEnv")
assign("ptime", proc.time(), pos = "CheckExEnv")
View
@@ -18,10 +18,10 @@
local({
info <- loadingNamespaceInfo()
- ns <- .getNamespace(as.name(info$pkgname))
+ pkg <- info$pkgname
+ ns <- .getNamespace(as.name(pkg))
if (is.null(ns))
- stop("cannot find namespace environment");
- barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
- dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
+ stop("cannot find namespace environment for ", pkg, domain = NA);
+ dbbase <- file.path(info$libname, pkg, "R", pkg)
lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
})
@@ -24,7 +24,7 @@ La.svd <- function(x, nu = min(n, p), nv = min(n, p))
x <- as.matrix(x)
n <- nrow(x)
p <- ncol(x)
- if(!n || !p) stop("0 extent dimensions")
+ if(!n || !p) stop("a dimension is zero")
if(is.complex(x)) {
if(nu == 0L) {
View
@@ -47,7 +47,8 @@ RNGkind <- function(kind = NULL, normal.kind = NULL)
stop(gettextf("'%s' is not a valid choice", normal.kind),
domain = NA)
if (normal.kind == 0L)
- warning("Buggy version of Kinderman-Ramage generator used")
+ warning("buggy version of Kinderman-Ramage generator used",
+ domain = NA)
if(normal.kind == length(n.kinds) - 1L) normal.kind <- -1L
}
r <- 1L + .Internal(RNGkind(i.knd, normal.kind))
@@ -80,7 +81,8 @@ set.seed <- function(seed, kind = NULL, normal.kind = NULL)
stop(gettextf("'%s' is not a valid choice", normal.kind),
domain = NA)
if (normal.kind == 0L)
- stop("Buggy version of Kinderman-Ramage generator is not allowed")
+ stop("buggy version of Kinderman-Ramage generator is not allowed",
+ domain = NA)
if(normal.kind == length(n.kinds) - 1L) normal.kind <- -1L
}
.Internal(set.seed(seed, i.knd, normal.kind))
View
@@ -78,5 +78,4 @@ as.symbol <- function(x) .Internal(as.vector(x, "symbol"))
as.name <- as.symbol
## would work too: as.name <- function(x) .Internal(as.vector(x, "name"))
-## as.call <- function(x) stop("type call cannot be assigned")
-as.qr <- function(x) stop("you cannot be serious")
+as.qr <- function(x) stop("you cannot be serious", domain = NA)
@@ -163,9 +163,10 @@ detach <- function(name, pos = 2, unload = FALSE, character.only = FALSE,
if(unload) {
tryCatch(unloadNamespace(pkgname),
error = function(e)
- warning(sQuote(pkgname),
- " namespace cannot be unloaded:\n ",
- conditionMessage(e), call. = FALSE))
+ warning(gettextf("%s namespace cannot be unloaded:\n ",
+ sQuote(pkgname)),
+ conditionMessage(e),
+ call. = FALSE, domain = NA))
}
} else {
if(.isMethodsDispatchOn() && methods:::.hasS4MetaData(env))
@@ -19,7 +19,7 @@
`mostattributes<-` <- function(obj, value)
{
if(length(value)) {
- if(!is.list(value)) stop("RHS must be list")
+ if(!is.list(value)) stop("'value' must be a list")
if(h.nam <- !is.na(inam <- match("names", names(value)))) {
n1 <- value[[inam]]; value <- value[-inam] }
if(h.dim <- !is.na(idin <- match("dim", names(value)))) {
@@ -262,7 +262,7 @@ socketSelect <- function(socklist, write = FALSE, timeout = NULL) {
if (is.null(timeout))
timeout <- -1
else if (timeout < 0)
- stop("supplied timeout must be NULL or a non-negative number")
+ stop("'timeout' must be NULL or a non-negative number")
if (length(write) < length(socklist))
write <- rep(write, length.out = length(socklist))
.Internal(sockSelect(socklist, write, timeout))
View
@@ -54,7 +54,7 @@ cut.default <-
} else if (is.logical(labels) && !labels)
codes.only <- TRUE
else if (length(labels) != nb - 1L)
- stop("labels/breaks length conflict")
+ stop("lengths of 'breaks' and 'labels' differ")
code <- .bincode(x, breaks, right, include.lowest)
if(codes.only) code
else factor(code, seq_along(labels), labels, ordered = ordered_result)
@@ -138,7 +138,7 @@ as.data.frame <- function(x, row.names = NULL, optional = FALSE, ...)
}
as.data.frame.default <- function(x, ...)
- stop(gettextf("cannot coerce class \"%s\" into a data.frame",
+ stop(gettextf("cannot coerce class \"%s\" to a data.frame",
deparse(class(x))),
domain = NA)
@@ -379,9 +379,9 @@ data.frame <-
else function(current, new, i) {
if(is.null(current)) {
if(anyDuplicated(new)) {
- warning("some row.names duplicated: ",
- paste(which(duplicated(new)), collapse=","),
- " --> row.names NOT used")
+ warning(gettextf("some row.names duplicated: %s --> row.names NOT used",
+ paste(which(duplicated(new)), collapse=",")),
+ domain = NA)
current
} else new
} else current
@@ -398,9 +398,10 @@ data.frame <-
if(any(is.na(row.names)))
stop("row names contain missing values")
if(anyDuplicated(row.names))
- stop("duplicate row.names: ",
- paste(unique(row.names[duplicated(row.names)]),
- collapse = ", "))
+ stop(gettextf("duplicate row.names: %s",
+ paste(unique(row.names[duplicated(row.names)]),
+ collapse = ", ")),
+ domain = NA)
} else row.names <- integer()
return(structure(list(), names = character(),
row.names = row.names,
@@ -495,7 +496,7 @@ data.frame <-
row.names <- match(row.names, vnames, 0L)
if(length(row.names) != 1L ||
row.names < 1L || row.names > length(vnames))
- stop("row.names should specify one of the variables")
+ stop("'row.names' should specify one of the variables")
i <- row.names
row.names <- value[[i]]
value <- value[ - i]
@@ -513,9 +514,10 @@ data.frame <-
if(any(is.na(row.names)))
stop("row names contain missing values")
if(anyDuplicated(row.names))
- stop("duplicate row.names: ",
- paste(unique(row.names[duplicated(row.names)]),
- collapse = ", "))
+ stop(gettextf("duplicate row.names: %s",
+ paste(unique(row.names[duplicated(row.names)]),
+ collapse = ", ")),
+ domain = NA)
}
attr(value, "row.names") <- row.names
attr(value, "class") <- "data.frame"
@@ -537,7 +539,7 @@ data.frame <-
warning("named arguments other than 'drop' are discouraged")
if(Narg < 3L) { # list-like indexing or matrix indexing
- if(!mdrop) warning("drop argument will be ignored")
+ if(!mdrop) warning("'drop' argument will be ignored")
if(missing(i)) return(x)
if(is.matrix(i))
return(as.matrix(x)[i]) # desperate measures
@@ -741,7 +743,7 @@ data.frame <-
if(N > 1L && N < nreplace && (nreplace %% N) == 0L)
value <- rep(value, length.out = nreplace)
if(N > 1L && (length(value) != nreplace))
- stop("rhs is the wrong length")
+ stop("'value' is the wrong length")
n <- 0L
nv <- nrow(x)
for(v in seq_len(dim(i)[2L])) {
View
@@ -142,7 +142,7 @@ summary.Date <- function(object, digits = 12, ...)
if (nargs() == 1) return(e1)
# only valid if one of e1 and e2 is a scalar.
if(inherits(e1, "Date") && inherits(e2, "Date"))
- stop("binary + is not defined for Date objects")
+ stop("binary + is not defined for \"Date\" objects")
if (inherits(e1, "difftime")) e1 <- coerceTimeUnit(e1)
if (inherits(e2, "difftime")) e2 <- coerceTimeUnit(e2)
structure(unclass(e1) + unclass(e2), class = "Date")
@@ -155,12 +155,12 @@ summary.Date <- function(object, digits = 12, ...)
secs = x/86400, mins = x/1440, hours = x/24,
days = x, weeks = 7*x)))
if(!inherits(e1, "Date"))
- stop("Can only subtract from Date objects")
- if (nargs() == 1) stop("unary - is not defined for Date objects")
+ stop("can only subtract from \"Date\" objects")
+ if (nargs() == 1) stop("unary - is not defined for \"Date\" objects")
if(inherits(e2, "Date")) return(difftime(e1, e2, units="days"))
if (inherits(e2, "difftime")) e2 <- coerceTimeUnit(e2)
if(!is.null(attr(e2, "class")))
- stop("can only subtract numbers from Date objects")
+ stop("can only subtract numbers from \"Date\" objects")
structure(unclass(as.Date(e1)) - e2, class = "Date")
}
@@ -240,10 +240,10 @@ mean.Date <- function (x, ...)
seq.Date <- function(from, to, by, length.out=NULL, along.with=NULL, ...)
{
if (missing(from)) stop("'from' must be specified")
- if (!inherits(from, "Date")) stop("'from' must be a Date object")
+ if (!inherits(from, "Date")) stop("'from' must be a \"Date\" object")
if(length(as.Date(from)) != 1L) stop("'from' must be of length 1")
if (!missing(to)) {
- if (!inherits(to, "Date")) stop("'to' must be a Date object")
+ if (!inherits(to, "Date")) stop("'to' must be a \"Date\" object")
if (length(as.Date(to)) != 1L) stop("'to' must be of length 1")
}
if (!missing(along.with)) {
@@ -282,12 +282,12 @@ summary.POSIXlt <- function(object, digits = 15, ...)
secs = x, mins = 60*x, hours = 60*60*x,
days = 60*60*24*x, weeks = 60*60*24*7*x))
if(!inherits(e1, "POSIXt"))
- stop("Can only subtract from POSIXt objects")
+ stop("can only subtract from \"POSIXt\" objects")
if (nargs() == 1) stop("unary '-' is not defined for \"POSIXt\" objects")
if(inherits(e2, "POSIXt")) return(difftime(e1, e2))
if (inherits(e2, "difftime")) e2 <- coerceTimeUnit(e2)
if(!is.null(attr(e2, "class")))
- stop("can only subtract numbers from POSIXt objects")
+ stop("can only subtract numbers from \"POSIXt\" objects")
e1 <- as.POSIXct(e1)
.POSIXct(unclass(e1) - e2, attr(e1, "tzone"))
}
@@ -669,12 +669,12 @@ seq.POSIXt <-
function(from, to, by, length.out = NULL, along.with = NULL, ...)
{
if (missing(from)) stop("'from' must be specified")
- if (!inherits(from, "POSIXt")) stop("'from' must be a POSIXt object")
+ if (!inherits(from, "POSIXt")) stop("'from' must be a \"POSIXt\" object")
cfrom <- as.POSIXct(from)
if(length(cfrom) != 1L) stop("'from' must be of length 1")
tz <- attr(cfrom , "tzone")
if (!missing(to)) {
- if (!inherits(to, "POSIXt")) stop("'to' must be a POSIXt object")
+ if (!inherits(to, "POSIXt")) stop("'to' must be a \"POSIXt\" object")
if (length(as.POSIXct(to)) != 1) stop("'to' must be of length 1")
}
if (!missing(along.with)) {
View
@@ -41,7 +41,7 @@ determinant.matrix <- function(x, logarithm = TRUE, ...)
sign = 1L),
class = "det"))
if (is.complex(x))
- stop("determinant not currently defined for complex matrices")
+ stop("'determinant' not currently defined for complex matrices")
## FIXME: should not be so hard to implement; see
## moddet_ge_real() in ../../../modules/lapack/Lapack.c
## the 'sign' would have to be complex z, with |z|=1
@@ -32,7 +32,7 @@ diag <- function(x = 1, nrow, ncol)
return(y)
}
if (is.array(x) && length(dim(x)) != 1L)
- stop("'x' is an array, but not 1D.")
+ stop("'x' is an array, but not one-dimensional.")
if (missing(x)) n <- nrow
else if (length(x) == 1L && nargs() == 1L) {
@@ -83,7 +83,7 @@ eigen <- function(x, symmetric, only.values = FALSE, EISPACK = FALSE)
double(2*n),
ierr = integer(1L))
if (z$ierr)
- stop(gettextf("'ch' returned code %d in 'eigen'", z$ierr),
+ stop(gettextf("'%s' returned code %d in 'eigen'", "ch", z$ierr),
domain = NA)
if(!only.values)
z$vectors <- matrix(complex(real=z$vectors,
@@ -101,7 +101,7 @@ eigen <- function(x, symmetric, only.values = FALSE, EISPACK = FALSE)
dbl.n,
ierr = integer(1L))
if (z$ierr)
- stop(gettextf("'rs' returned code %d in 'eigen'", z$ierr),
+ stop(gettextf("'%s' returned code %d in 'eigen'", "rs", z$ierr),
domain = NA)
}
ord <- sort.list(z$values, decreasing = TRUE)
@@ -125,7 +125,7 @@ eigen <- function(x, symmetric, only.values = FALSE, EISPACK = FALSE)
dbl.n,
ierr = integer(1L))
if (z$ierr)
- stop(gettextf("'cg' returned code %d in 'eigen'", z$ierr),
+ stop(gettextf("'%s' returned code %d in 'eigen'", "cg", z$ierr),
domain = NA)
z$values <- complex(real=z$values,imaginary=z$ivalues)
if(!only.values)
@@ -145,7 +145,7 @@ eigen <- function(x, symmetric, only.values = FALSE, EISPACK = FALSE)
dbl.n,
ierr = integer(1L))
if (z$ierr)
- stop(gettextf("'rg' returned code %d in 'eigen'", z$ierr),
+ stop(gettextf("'%s' returned code %d in 'eigen'", "rg", z$ierr),
domain = NA)
ind <- z$ivalues > 0L
if(any(ind)) {#- have complex (conjugated) values
@@ -38,7 +38,7 @@ factor <- function(x = character(), levels, labels = levels,
nl <- length(labels)
nL <- length(levels)
if(!any(nl == c(1L, nL)))
- stop(gettextf("invalid labels; length %d should be 1 or %d", nl, nL),
+ stop(gettextf("invalid 'labels'; length %d should be 1 or %d", nl, nL),
domain = NA)
levels(f) <- ## nl == nL or 1
if (nl == nL) as.character(labels)
@@ -209,7 +209,7 @@ Ops.factor <- function(e1, e2)
if (is.factor(value)) value <- levels(value)[value]
m <- match(value, lx)
if (any(is.na(m) & !is.na(value)))
- warning("invalid factor level, NAs generated")
+ warning("invalid factor level, NA generated")
class(x) <- NULL
x[...] <- m
attr(x,"levels") <- lx
@@ -33,7 +33,7 @@ alist <- function (...) as.list(sys.call())[-1L]
`body<-` <- function (fun, envir = environment(fun), value) {
if (is.expression(value)) {
if (length(value) > 1L)
- warning("using the first element of 'value' of type expression")
+ warning("using the first element of 'value' of type \"expression\"")
value <- value[[1L]]
}
as.function(c(as.list(formals(fun)), list(value)), envir)
@@ -23,7 +23,7 @@ subset.data.frame <- function (x, subset, select, drop = FALSE, ...)
else {
e <- substitute(subset)
r <- eval(e, x, parent.frame())
- if(!is.logical(r)) stop("'subset' must evaluate to logical")
+ if(!is.logical(r)) stop("'subset' must be logical")
r <- r & !is.na(r)
}
if(missing(select))
Oops, something went wrong.

0 comments on commit 4570c4c

Please sign in to comment.