search for: outdec

Displaying 20 results from an estimated 30 matches for "outdec".

2018 Oct 08
2
bug with OutDec option and deferred_string altrep object
While implementing R's new 'altrep' functionality in the TERR engine, I discovered a bug in R's 'deferred_string' altrep object: it is not using the correct value of the 'OutDec' option when it expands a deferred_string. See the following example: R 3.5.1: (same results in R 3.6.0 devel engine built 10/5) > options(scipen=0, OutDec=".") > as.character(123.456) [1] "123.456" > options(scipen=-5, OutDec=",") &g...
2018 Oct 09
0
bug with OutDec option and deferred_string altrep object
...-- I'll look into it. Best, luke On Mon, 8 Oct 2018, Michael Sannella wrote: > While implementing R's new 'altrep' functionality in the TERR engine, > I discovered a bug in R's 'deferred_string' altrep object: it is not > using the correct value of the 'OutDec' option when it expands a > deferred_string.? See the following example: > > R 3.5.1: (same results in R 3.6.0 devel engine built 10/5) > ? ? > options(scipen=0, OutDec=".") > ? ? > as.character(123.456) > ? ? [1] "123.456" > ? ? > options(scip...
2009 Apr 22
1
Clarification for options(OutDec)
The documentation for the OutDec option says that it should be a 'one-character string'; yet, if I try a unicode character, it doesn't seem to work. Are unicode chars not counted as one-character? This is within the mac GUI, but I also see this on linux boxes. > x <- '\u00B7' > nchar(x) [1] 1 > o...
2009 Mar 19
0
Using unicode character for 'middle dot' in options(OutDec)
...lt;- 1:10 y <- runif(length(x)) par(las=1, bty='n') plot(x,y, ylim=c(0,1), yaxt='n') p <- pretty(y) axis(2, at=p, labels=format(p, decimal.mark="\u00B7")) at least on x11() and pdf() devices. Is it intentional that I can't use a unicode char though for options(OutDec)? > options(OutDec='\u00B7') Error in options(OutDec = "*") : invalid value for 'OutDec' [I've replaced the cdot with the * in the error line above, in case it mangles the email into non-ascii.] R version 2.8.1 (2008-12-22) Thanks, Stephen
2013 Mar 15
1
numerics from a factor
A problem has been pointed out by a French user of the survival package and I'm looking for a pointer. > options(OutDec= ",") > fit <- survfit(Surv(1:6 /2) ~ 1) > fit$time [1] NA 1 NA 2 NA 3 A year or two ago some test cases that broke survfit were presented to me. The heart of the problem was numbers that were almost identical, where table(x) and unique(x) gave different counts of distinc...
2009 Sep 15
1
comma as decimal separator in xtable
Hello, How can I make xtable print a comma as decimal separator? Setting the option OutDec isn't enough for xtable: library(xtable) options(OutDec = ",") x <- c(1.1, 1.2, 1.3) y <- c(2.3, 2.2, 2.1) d <- data.frame(x, y) d print(xtable(d)) Thanks! Jakson Aquino
2016 Mar 18
1
formatting of complex matrix
...1 1 1 [2,] 1 1 1 1 1 1 1 1 1 1 1 1 1 The problem seems to be in printarray.c:275 (https://github.com/wch/r-source/blob/trunk/src/main/printarray.c#L275): EncodeComplex(x[i + j * r], wr[j] + R_print.gap, dr[j], er[j], wi[j], di[j], ei[j], OutDec)) ) The width of the real part wr[j] + the width of the imaginary part wi[j] + R_print.gap doesn?t always add up to the width of the column w[j]. As far as we can see, calculating the width of the real part on the fly fixes the problem: EncodeComplex(x[i + j * r], w[j] - wi[j] - 2, dr[j], er[...
2009 May 23
2
as.numeric(levels(factor(x))) may be a decreasing sequence
...; + } + break; + } + } + return s; +} + SEXP attribute_hidden StringFromReal(double x, int *warn) { int w, d, e; formatReal(&x, 1, &w, &d, &e, 0); if (ISNA(x)) return NA_STRING; - else return mkChar(EncodeReal(x, w, d, e, OutDec)); + else return mkChar(elim_trailing(EncodeReal(x, w, d, e, OutDec), OutDec)); } SEXP attribute_hidden StringFromComplex(Rcomplex x, int *warn)
2015 Jun 16
4
Bugzilla activity?
...ly reproducible reports I've filed on Bugzilla haven't triggered any reaction in several weeks (for the older one). FWIW, these are: - Line goes beyond plot region https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16299 - format() does not respect decimal.mark="." when options(OutDec=",") https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16411 Regards
2006 Feb 01
2
Write.table: change points to commas when object contains a row of characters
...lements. I would like to understand, why this has to be so and - of course - find a solution for my matrix object jjmat, that I tried to write out by write.table(jjmat, file="jjmat.txt", row.names=TRUE, col.names=NA,sep="\t",dec=",") I also tried "options(OutDec=",")" , which changes the presentation on the console, but seems to have no influence on write table: jjmat is still written out with points instead of commas. The object looks like this: > jjmat f2a1 f2b1 f5a1 f5b1 f5c1 rowname1 &q...
2012 Aug 08
3
decimal points midline
Hi, does anyone know how to make decimal points midline when plotting? The journal to which we are going to submit a manuscript require this particular formatting, and it gives direction how to do this on PC: hold down ALT key and type 0183 on the number pad Thanks John [[alternative HTML version deleted]]
2012 Aug 14
0
as.numeric and as.character with locale using comma as separator
...39;t happen according to the warning when setting it back manually]. I posted an issue at their github repository, but maybe the behaviour is a bit more of general interest. However, if LC_NUMERIC is changed, as.character () uses the decimal separator that belongs to LC_NUMERIC (and not options ()$OutDec as I supposed). as.double () (= as.numeric ()) doesn't, though. That causes trouble with constructs like as.numeric (as.character (x)) long version: as.character seems to take into account my locale (de_DE) which uses comma as decimal separator: > x <- rnorm (3) > x [1] -0,00423832...
2008 Apr 27
2
R_DEFAULT_DEVICE (PR#11294)
Setting enviroment variable R_DEFAULT_DEVICE causes an error. The patch below fixes this. I guess the same goes for R_INTERACTIVE_DEVICE. --- R-2.7.0/src/library/grDevices/R/zzz.R 2008-04-27 13:49:11.000000000 +0200 +++ R-2.7.0/src/library/grDevices/R/zzz.R.new 2008-04-27 13:59:37.000000000 +0200 @@ -22,7 +22,7 @@ extras <- if(.Platform$OS.type == "windows")
2015 Jun 16
0
Bugzilla activity?
...;ve filed on Bugzilla haven't > triggered any reaction in several weeks (for the older one). > > FWIW, these are: > - Line goes beyond plot region > https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16299 > - format() does not respect decimal.mark="." when options(OutDec=",") > https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16411 > > > Regards > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Joris Meys Statistical consultant...
2015 Jun 17
0
Bugzilla activity?
...ve filed on Bugzilla haven't > triggered any reaction in several weeks (for the older one). > > FWIW, these are: > - Line goes beyond plot region > https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16299 > - format() does not respect decimal.mark="." when options(OutDec=",") > https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16411 Bugzilla bugs are read, but they aren't necessarily dealt with instantly. You can see actions occurring if you do a search for "all" bugs, not just open ones. The reason that your bugs haven't been d...
2023 Jul 06
1
numeric_version doesn't like numeric versions anymore?
Dear R devs, I installed the recent devel R to test a package error when I intercept this warning when loading packages: ``` Warning in .make_numeric_version(x, strict, .standard_regexps()$valid_numeric_version) : invalid non-character version specification 'x' (type: double) ``` After a long debugging, I realize that `numeric_version` in base does not support numerical input x by
2023 Oct 24
1
as.character.Date() strips names in R 4.3.2 beta, bug?
...d tweats/.. etc) is ? ?as.character(<POSIXt>)? now behaves more in line with the methods for atomic vectors such as numbers, and is no longer influenced by ?options()?. Ditto for ?as.character(<Date>)?. The ?as.character()? method gets arguments ?digits? and ?OutDec? with defaults _not_ depending on ?options()?. Use of ?as.character(*, format = .)? now warns. At the time (Sep 2022!) there was quite some traffic on R-devel about this, IIRC. Often it's most convenient for people to use format() instead of as.character() if they want to keep nam...
2023 Oct 24
1
as.character.Date() strips names in R 4.3.2 beta, bug?
In previous versions of R, as.character.Date() retained any names on its input vector. In R 4.3.2 beta, it removes names. Is this change intentional, or a bug? (For what it's worth, I greatly dislike this change, and hope it gets changed back.) $ grep DESCRIPTION /etc/lsb-release DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS" $ R --vanilla R version 4.2.1 Patched (2022-07-09 r82577)
2015 Jul 14
4
Conservar el nombre de la variable entre varias funciones: ejemplos de resultados
...------------- ## DESUNI ##-------------------------------------------------------------- DESUNI = function(XDADES, XDROP=NULL, XVD=NULL, XSPV=NULL # Si és una anàlisi de SPV # Pot tenir el valor TRUE ) { options(digits = 3, OutDec=",", scipen=999) ## No existeix VD: descriptiva if(is.null(XVD)) # No existeix VD: descriptiva { cat("\n*** Descriptiva (no existeix variable dependent)\n") DES(XDADES=XDADES, XDROP=XDROP, XCAMIF=XCAMIF) } ## Existeis VD: anàlisi univariat...
2017 Mar 05
2
Please add me to bugzilla
Please add me to R bugzilla. Thanks, Bradley [[alternative HTML version deleted]]