search for: ngettext

Displaying 20 results from an estimated 44 matches for "ngettext".

Did you mean: gettext
2013 Apr 25
1
lsfit: Error in formatting error message
...hen calling lsfit with more observations than variables, which seems to come from an error in the formatting of the error message (note that this was not happening in 2.15.3): > nobs <- 5; nvar <- 6; lsfit(matrix(runif(nobs*nvar), ncol=nvar), runif(nobs), intercept=FALSE) Error in sprintf(ngettext(nry, "%d response", "%d responses"), ", ", ngettext(ncx, : invalid format '%d'; use format %s for character objects > traceback() 3: sprintf(ngettext(nry, "%d response", "%d responses"), ", ", ngettext(ncx, "but o...
2009 Apr 07
1
typo in R-ints.texi's description of P_ macro
I think there are some missing words in "R Internals"'s description of the P_ macro. It currently has "A macro as a wrapper for ngettext", which I think ought to be something like "The macro P_ may be used as a wrapper for ngettext". The following patch also makes the 2 alternate definitions of P_ have the same argument names, StringS and StringP. Expanding the S and P to Singular and Plural, would be more descripti...
2015 Dec 14
0
[patch] Fix automatic domain in ngettext(), Bug 14605
A short overview of the problem: Automatic domain in ngettext() does not work when used inside a package. How to test: 1. Download the small test package "minimal_1.0-0.tar.gz" attached to the bug report. 2. As the package contains Finnish translations, start R with Finnish language settings. Prepending "LANGUAGE=fi " to the command line...
2014 Jun 29
0
[patch] Fix n arg in mclapply call to ngettext
Regarding the following code, warning(sprintf(ngettext(has.errors, "scheduled core %s encountered error in user code, all values of the job will be affected", "scheduled cores %s encountered errors in user code, all values of the jobs will be affected"), paste(has.errors, collapse = ", ")), domain = NA)...
2006 Mar 30
0
request to add "..." to cat(ngettext in "warnings" function
...n mind I have been working on directing informative, warning, and error messages to outputs as I require. I would like to suggest a change to the "warnings" function; that the passed arguments be enabled to all instances of "cat" in the function, specifically that the "cat(ngettext" have the ellipsis added to the call so that users may be able to call warnings as "warnings(file=stderr())" and the function will write all text to the stderr stream. As it is written today, the text "Warning message:" is written to the console output no matter what. Sin...
2014 Sep 10
1
install.packages misleads about package availability?
...=========================================================== --- src/library/utils/R/packages2.R (revision 66562) +++ src/library/utils/R/packages2.R (working copy) @@ -46,12 +46,12 @@ p0 <- unique(pkgs) miss <- !p0 %in% row.names(available) if(sum(miss)) { - warning(sprintf(ngettext(sum(miss), - "package %s is not available (for %s)", - "packages %s are not available (for %s)"), - paste(sQuote(p0[miss]), collapse=", "), - sub(" *\\(.*","", R.version.string)), - domain = NA, call. = FALSE) + txt...
2014 Dec 01
2
[PATCH v2] fish: show synopsis if command syntax is wrong
...if argc_minimum = argc_maximum then ( pr " if (argc != %d) {\n" argc_minimum; - if argc_minimum = 0 then ( - pr " fprintf (stderr, _(\"%%s should have no parameters\\n\"), cmd);\n"; - ) else ( - pr " fprintf (stderr, ngettext(\"%%s should have %%d parameter\\n\",\n"; - pr " \"%%s should have %%d parameters\\n\",\n"; - pr " %d),\n" - argc_minimum; - pr " cmd...
2013 Nov 04
1
ggplot2: Add '+' operator for aes (uneval) objects
...instance to combine the result of aes and aes_string in functions. Any flaws with the following proposition: `+.uneval` <- function(e1, e2) { dup <- names(e1) %in% names(e2) if (any(dup)) { duplist <- paste(sQuote(names(e1)[dup]), collapse = ", ") msg <- sprintf(ngettext(length(dup), "element %s occurs in both summands - second one gets precedence", "elements %s occur in both summands - second one gets precedence"), duplist) warning(msg, domain = NA) } res <- c(e1[!dup], e2) c...
2013 Dec 05
0
[PATCH 3/3] fish: improve the command error messages
..._(\"%%s should have %%d parameter(s)\\n\"), cmd, %d);\n" - argc_minimum; + if argc_minimum = 0 then ( + pr " fprintf (stderr, _(\"%%s should have no parameters\\n\"), cmd);\n"; + ) else ( + pr " fprintf (stderr, ngettext(\"%%s should have %%d parameter\\n\",\n"; + pr " \"%%s should have %%d parameters\\n\",\n"; + pr " %d),\n" + argc_minimum; + pr " cmd...
2013 Dec 05
6
[PATCH 0/3] Small improvements to i18n extraction/handling
Hi, here there are few patches to improve the extraction of translatable messages, and the usage of messages with plural forms. Pino Toscano (3): po: fix broken message extraction po: fix dependencies for libguestfs.pot extraction fish: improve the command error messages generator/fish.ml | 20 ++++++++++++++++---- po/Makefile.am | 24 +++++++----------------- 2 files changed, 23
2011 Nov 03
1
Select columns of a data.frame by name OR index in a function
...ing like the following: -------------8<------------- f <- function(datf, cols) { nc <- seq_along(datf) cn <- colnames(datf) colOK <- (cols %in% nc) | (cols %in% cn) if (!all(colOK)) { badc <- paste(sQuote(cols[!colOK]), collapse = ", ") msg <- sprintf(ngettext(sum(!colOK), "%s is not a valid column selector", "%s are not valid column selectors"), badc) stop(msg) } which((nc %in% cols) | (cn %in% cols)) # with this set of indices I would work in the rest...
2018 Jul 30
2
Code Optimization: print.data.frame + as.data.frame(head(x, n = options("max.print")))
...data.table), and we accidentally print it, the R Session does not "collapse", forcing us to press ESC or kill the RSession. function (x, ..., digits = NULL, quote = FALSE, right = TRUE, row.names = TRUE) { n <- length(row.names(x)) if (length(x) == 0L) { cat(sprintf(ngettext(n, "data frame with 0 columns and %d row", "data frame with 0 columns and %d rows"), n), "\n", sep = "") } else if (n == 0L) { print.default(names(x), quote = FALSE) cat(gettext("<0 rows> (or 0-length ro...
2009 Aug 21
1
R compilation problem on 64 bit SunOS (PR#13898)
...unix/system.c -o system.o In file included from /usr/include/locale.h:50, from ../../../../src/R-2.9.1/src/unix/system.c:36: /usr/include/libintl.h:62: error: expected identifier or '(' before 'unsigned' The contents of /usr/include/libintl.h, line62: extern char *ngettext(const char *, const char *, unsigned long int); The same error happens to several other files (datetime.c, main.c, platform.c util.c), all of which with the exception of the last one have not even changed since 2.9.0. I compiled 2.9.0. in a parallel tree, copied the corresponding .o files over, an...
2014 Dec 02
1
Re: [PATCH v2] fish: show synopsis if command syntax is wrong
...ximum then ( > pr " if (argc != %d) {\n" argc_minimum; > - if argc_minimum = 0 then ( > - pr " fprintf (stderr, _(\"%%s should have no parameters\\n\"), cmd);\n"; > - ) else ( > - pr " fprintf (stderr, ngettext(\"%%s should have %%d parameter\\n\",\n"; > - pr " \"%%s should have %%d parameters\\n\",\n"; > - pr " %d),\n" > - argc_minimum; > - pr "...
2014 Nov 28
2
[PATCH] fish: show synopsis if command syntax is wrong
...if argc_minimum = argc_maximum then ( pr " if (argc != %d) {\n" argc_minimum; - if argc_minimum = 0 then ( - pr " fprintf (stderr, _(\"%%s should have no parameters\\n\"), cmd);\n"; - ) else ( - pr " fprintf (stderr, ngettext(\"%%s should have %%d parameter\\n\",\n"; - pr " \"%%s should have %%d parameters\\n\",\n"; - pr " %d),\n" - argc_minimum; - pr " cmd...
2006 Jan 15
15
Gettext and Rails ?
Hello, I''m trying to use ruby-gettext 1.1.1 (installed with gem) with rails and here is all I get : undefined method `init_gettext'' for ApplicationController:Class Here is my source : require ''gettext/rails'' class ApplicationController < ActionController::Base init_gettext "test" end As a Nuby, I don''t really know what to do.
2005 Mar 21
1
Buglet in install.packages warning message
...ntended warning message: dependencies 'foo', 'bar' are not available + seth Index: packages2.R =================================================================== --- packages2.R (revision 33678) +++ packages2.R (working copy) @@ -125,7 +125,7 @@ cat(sprintf(ngettext(sum(miss), "dependency %s is not available", "dependencies %s are not available"), - paste(sQuote(p1[miss]), sep=", ")), "\n\n", sep ="") +...
2018 Mar 12
3
Bug report: override stopifnot() ?
Hello, On Mon, Mar 12, 2018 at 09:30:59AM -0700, William Dunlap wrote: > Why don't you use > stopifnot( all(m1 == m2) ) > ? good question. Even though I use aseert np.all(m1 == m2) when working with NumPy, I got accustomed to the "handy shortcut" that I can omit all() with R vectors and matrices. Then I got trapped with the thing I reported. On a second thought,
2017 Aug 23
2
strange nlme augpred behaviour
...") > fit2<-nlme(fit) > plot(augPred(fit2, level=0:1)) > augPred works as a charm. When I compare fit1 and fit2 they are equal > all.equal(fit1, fit2) [1] TRUE > Does anybody know where I should try to search for problems? Best regards Petr > traceback() 6: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), N, nrows), domain = NA) 5: `[[<-.data.frame`(`*tmp*`, nm, value = c(1L, 1L, 1L, 1L, 5L, 5L, 5L, 5L, 9L, 9L, 9L, 9L, 4L, 4L, 4L, 4L, 8L, 8L, 8L, 8L, 12L, 12L, 12L, 12L, 3L, 3L, 3L,...
2010 Feb 16
3
error : unused argument(s) when boxplot
Dear all, I am a total beginner in R, so sorry if this is the wrong place. I am using R 2.10.1 on a Mac (Mac OS 10.6.2). I have this small dataset : growth sugar 75 C 72 C 73 C 61 F 67 F 64 F 62 S 63 S I have no problem reading the table, or getting the summary, but if I try boxplot(growth~sugar, ylab="growth", xlab="sugar", data=Dataset), I have the following error :