Displaying 20 results from an estimated 700 matches similar to: "Suppressing Scientific Notation"
2015 Jun 13
2
Lack of protection bug in current R release candidate
The current R release candidate has a lack of protect bug (of very
long standing) with respect to the R_print.na_string and
R_print.na_string_noquote fields of the static R_print structure
declared in Print.h. This shows up very occassionally as incorrect
output from the following lines in reg-tests-2.R:
x <- c("a", NA, "b")
factor(x)
factor(x, exclude="")
2003 Jan 29
1
printing reals from C with digits
Hi,
I want to print real numbers in C code with different values for
digits. How to do that?
As I have understood, what I should do is to call
StringFromReal()
which calls FormatReal(), that one suggests the parameters (width,
decimal places and exponential form). FormatReal() includes
eps = pow(10.0, -(double)R_print.digits);
So I guess I have to change the value of R_print.digits.
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=".")
>
2017 Nov 09
1
formatting raw vectors with names
I think there?s a bug concerning the formatting of raw vectors with names:
> structure(as.raw(1:3), .Names = c("a", "bbbb", "c"))
a bbbb c
01 02 03
> structure(1:3, .Names = c("a", "bbbb", "c"))
a bbbb c
1 2 3
The problem is that EncodeRaw does not honor the requested width, in fact it doesn?t even get the
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
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
2002 Aug 13
2
Misalignment of <NA> in rownames (PR#1905)
An NA in the rownames of a matrix (or dataframe) causes misalignment when the
matrix is printed:
R> x <- matrix(1:12, 3,4, dimnames=list(letters[1:3], LETTERS[1:4]))
R> rownames(x)[2] <- NA
R> x
A B C D
a 1 4 7 10
<NA> 2 5 8 11
c 3 6 9 12
The bug is in function Rstrlen, in src/main/printutils.c. MatrixRowLabel and
MatrixColumnLabel (same file) rely on Rstrlen
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
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 =
1999 Oct 13
1
formatReal()-bug (or Is there anybody out there w/o IEEE754?)
On a system with IEEE_754 undefined, I run into an bug, when the value
of an element of the first argument (e.g., x[0]) of formatReal() is NA:
1. (format.c:235) if (!R_FINITE ..) gives nanflag=1 (!naflag remains 0)
2. (format.c:272..288) *m gets an value of -2147483643 (from the format
fiddling, should not matter to us)
3. (format.c:289) because naflag is zero, m does not
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)
2015 Jun 15
0
Lack of protection bug in current R release candidate
>>>>> Radford Neal <radford at cs.toronto.edu>
>>>>> on Sat, 13 Jun 2015 17:24:04 -0400 writes:
> The current R release candidate has a lack of protect bug
> (of very long standing)
[ but not really reported, right ? ]
> with respect to the
> R_print.na_string and R_print.na_string_noquote fields of
> the static
2009 Feb 07
3
Output results to a single postscript document
Hello R users,
I have been trying to output all my results (text, plots, etc) into the same
postscript file as
one document, but have been unable to...Can anyone help me improve my code
below so that I can
accomplish this? Currently I have to output them separately then piece them
back together into
one document..
Thanks in Advance for any help!
options (scipen=999, digits=7)
2009 Aug 12
2
R numeric string problem
Hi,
I have a text (.dat) file, in which each row contains several long numeric
strings. One of the strings is 38 digits long, for example:
03200801200801172008011720092904008901
When I read in the data file, this string shows up as 3.200801e+36. To get
rid of the scientific notation, I used "options(scipen=999)." When I did
this, the scientific notation went away, but the numeric
2003 Feb 02
1
printing reals from C with digits -- once more
Thank for Brian D. Ripley for the answer to my previous question.
My aim is to print single values from different real vectors with
different digits option. This is quite a possible with Rprintf() but
that one supprots printing format as C does, not in R native way
(setting digits=7 or printing with "%12.7f" are two quite different
things). So I would like to find something more
2012 Dec 26
2
Problem with large/small numbers in knitr
I have problems with very large numbers using knitr. In the following, my a
and b are extremely small and ssrr and ssru are extremely large. Knitr
delivers error messages. Scaling ssrr and ssru by 1000 resolved the problem:
ssrr <-ssrr/1000 ; ssru<-ssru/1000
Any clue as to how I might resolve the problem?
BTW, the same program does run in another computer. I am wondering whether
my
2010 Sep 27
1
scientific vs. fixed notation in xyplot()
Hi I am using xyplot() to plot on the log scale by using scale=list(log=T)
argument. For example:
xyplot(1:10~1:10, scales=list(log=T))
But the axis labels are printed as scientific notation (10^0.0, etc), instead of
fixed notation. How can I change that to fixed notation?
options(scipen=4) doesn't work on xyplot()
Thanks
John
2006 Jun 15
1
cat, print and documentation disagree (PR#8988)
Full_Name: Paul Bailey
Version: 2.3.1
OS: OS X (10.4.6)
Submission from: (NULL) (128.135.133.123)
according to cat's help file, "'cat' converts numeric/complex vectors in the
same way as 'print' (and not in the same way as 'as.character' which is used by
the S equivalent), so 'options' '"digits"' and '"scipen"' are
2003 Nov 23
1
options(width= ) in rw1081
Hola!
I just downloaded and installed the factory-fresh
rw1081. Windows XP.
In my Rprofile file in the \etc subdirectory I put
(among others)
options(continue=" ")
options(width=65)
options(scipen=5)
options(show.signif.stars=FALSE)
R is honoring all of this on startup, exept
the width=65 option, which does'nt have any effect. I tried
other values for width also (70, 90) ,