Displaying 20 results from an estimated 800 matches similar to: "bug with OutDec option and deferred_string altrep object"
2018 Oct 09
0
bug with OutDec option and deferred_string altrep object
Thanks for the report. The approach you outlines below should work --
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
2018 Nov 15
2
STRING_IS_SORTED claims as.character(1:100) is sorted
If I have loaded the C code:
SEXP altrep_STRING_IS_SORTED(SEXP x)
{
return ScalarInteger(STRING_IS_SORTED(x));
}
and defined the function:
issort <- function(x) .Call("altrep_STRING_IS_SORTED",x)
I am seeing the following results in R 3.5.1/Linux:
> issort(LETTERS)
[1] NA
> issort(as.character(1:100)) ## should return NA
[1] 1
>
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
> options(OutDec=x)
Error in options(OutDec = x) : invalid value for
2009 Mar 19
0
Using unicode character for 'middle dot' in options(OutDec)
When drawing a graph, I'd like the unicode character 'middle dot'
(or something else similar to \cdot in latex) to be used when writing
numbers. Something like the following works for me:
x <- 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
2003 May 02
2
Suppressing Scientific Notation
R gurus,
Every so often(*) someone asks how to suppress scientific notation in
printing, so I thought I'd give it a shot, but I need some help.
The formatting decision is made(**) on line 286 of src/main/format.c :
if (mF <= *m) { /* IFF it needs less space : "F" (Fixpoint) format */
where mF is the number of characters for "normal" printing and *m is the number
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
2010 Feb 02
1
[R] Suppressing scientific notation on plot axis tick labels (PR#14202)
On 02/02/2010 6:20 AM, Dimitri Shvorob wrote:
> Ruben Roa has kindly suggested using 'scipen' option - cf.
>
>> fixed notation will be preferred unless it is more than ???scipen??? digits
>> wider.
>
> However,
>
> options(scipen = 50)
> x = c(1e7, 2e7)
> barplot(x)
>
> still does not produce the desired result.
This is strange. I see what
2018 Oct 08
4
R_ext/Altrep.h should be more C++-friendly
I am not able to #include "R_ext/Altrep.h" from a C++ file. I think
it needs two changes:
1. add the same __cplusplus check as most of the other header files:
#ifdef __cplusplus
extern "C" {
#endif
...
#ifdef __cplusplus
}
#endif
2. change the line
R_new_altrep(R_altrep_class_t class, SEXP data1, SEXP data2);
to
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
While working on the printing code, my colleague Zbyn?k ?lajchrt noticed that complex matrixes are sometimes misaligned:
> { matrix(1i,2,13) }
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
[1,] 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i
[2,] 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i
(the values in the last four columns
2009 May 23
2
as.numeric(levels(factor(x))) may be a decreasing sequence
Function factor() in the current development version (2009-05-22)
guarantees that levels are different character strings. However, they
may represent the same decimal number. The following example is derived
from a posting by Stavros Macrakis in thread "Match .3 in a sequence"
in March
nums <- 0.3 + 2e-16 * c(-2,-1,1,2)
f <- factor(nums)
levels(f)
# [1]
2015 Jul 14
4
Conservar el nombre de la variable entre varias funciones: ejemplos de resultados
Hola Carlos:
Te adjunto un ejemplo de aplicación: las funciones (he borrado los path de las funciones y las ordenes "source()" que las carga ) y un ejemplo para ejecutarlas para las opciones que tengo implementadas con la tabla de datos birthwt del paquete"MASS":
- Descriptiva de todas las variables de una tabla.
- Análisis univariado de todas las variables de una tabla
2004 Jul 12
3
Segfault with options() (PR#7078)
This is completely undocumented use of options, but it does cause a
segfault with r-patched and r-devel on Linux:
options(list('digits', 'scipen'))
Strangely enough,
options(list('digits'))
and
options(list(digits = 10, scipen = 2))
work as might be expected.
Deepayan
2019 Mar 22
2
prettyNum digits=0 not compatible with scientific notation
FWIW, it doesn't seem to be happening on Mac OS:
> format(2^30, digits=0)
[1] "1.e+09"
> prettyNum(12345.6, digits=0)
[1] "1.e+04"
A glibc misfeature?
-pd
> On 22 Mar 2019, at 10:10 , Martin Maechler <maechler at stat.math.ethz.ch> wrote:
>
> Thank you, Robert for raising this here !
>
>>>>>> Robert McGehee
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
2015 Jun 16
4
Bugzilla activity?
Hi!
I was wondering whether anybody was looking at the bugs on Bugzilla. I'm
asking because I've seen bugs tackled on the mailing list quite quickly,
but two fully 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
2011 Nov 15
2
Controlling the precision of the digits printed
Has anyone come across the right combinations to print a limited number of
digits? My trial and error approach is taking too much time. Here is what I
have tried:
> op <- options()
> a <- c(1e-10,1,2,3,.5,.25)
> names(a) <- c("A", "B", "C", "D", "E", "F")
> # default
> a
A B C D
2009 Aug 19
1
Fw: Hist & kernel density estimates
For the hist estimate
>par(mex=1.3)
>dens<-density(q)
>options(scipen=4)
> ylim<-range(dens$y)
> h<-hist(q,breaks="scott",freq=FALSE,probability=TRUE,
+? right=FALSE,xlim=c(9000,16000),ylim=ylim,main="Histogram of q(scott)")
> lines(dens)
>box()
?
For the kernel estimate>options(scipen=4)
> d <- density(q, bw =
2018 Oct 22
1
v3 serialization of compact_intseq altrep should write modified data
Experimenting with altrep objects and v3 serialization, I discovered a
possible bug. Calling DATAPTR on a compact_intseq object returns a
pointer to the expanded integer sequence in memory. If you modify
this data, the object values appear to be changed. However, if the
compact_intseq object is then serialized (with version=3), only the
original integer sequence info is written.
For example,
2009 Dec 15
1
Supressing Scientific Notation
I'm trying to display my deciles without scientific notation, but have not found an option that will allow me to do so. According to web searches, the options(scipen=999) should remove scientific notation, but it seems not too. Does this option work with quantcut function? Is there any other option that can be used? I am using verison 2.10.0.
library(gtools)
library(gdata)