Displaying 20 results from an estimated 5000 matches similar to: "R numeric string problem"
2004 Aug 24
2
how to set the number format to pure numeric?
Hello,
I want to export a numeric matrix in pure numeric format, i.e. I want
0.0001 to appear as "0.0001". But it seems the default setting for
write.table is scientific notation, i.e. it will appear as "1e-04". how to
set the number format to pure numeric? Thank you very much for your help.
cheers,
lichi shi
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
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
2004 Jan 01
4
force fixed format
Hello,
A small problem I can't solve
> p <- 0.0001
> p
[1] 1e-04
How can I force the printout of p to 0.0001?
I have tried 'format', 'round', 'signif', 'print' in different combinations without success.
Fredrik Lundgren
2010 Aug 10
1
axis labels defaulting to scientific notation
The labels on the x-axis are defaulting to scientific notation no matter
how small cex.axis is. How can I override scientific notation to get the
labels to print out as specified? Here is the code (UNIT here is
0.0105):
plot(xm,yv,log="xy",ylim=c(0.1,20)/UNIT,xlim=c(0.004,20)*UNIT,xaxt="n",t
ype="n")
axis(1,
2010 Feb 02
2
Suppressing scientific notation on plot axis tick labels
Is there a better alternative to
x = c(1e7, 2e7)
x.lb = c(0,1e7,2e7)
s.lb = format(x.lb, scientific = FALSE, big.mark = ",")
barplot(x, yaxt = "n", ylab = "")
axis(side = 2, at = x.lb, labels = s.lb)
(I am sure there is a better alternative to line 2 :)).
Thank you.
--
View this message in context:
2009 Nov 11
1
thousands separator in console output?
Hello, I'm beginning with R and I'm wondering if there's any way to display
large values (e.g. 161651654167) using my system's thousands separator or
scientific notation.
Thanks!
[[alternative HTML version deleted]]
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)
2005 Sep 21
2
controlling usage of digits & scientific notation in R plots; postscript margins
Dear R users:
I assigned students to make some graphs and I'm having trouble answering
some questions that they have. We are all working on R 2.1 on Fedora
Core Linux 4 systems.
1. In the plot, the axis is not labeled by "numbers", but rather
scientific notation like "-2e+08" or such. We realize that means
-200,000,000. We want to beautify the plot. We would rather
2010 Jul 18
3
R graphic help
Dear All,
I've done some searching, but to no avail --
I'm plotting x-y data via the "plot" command, and the "log=x" command.
The graphed x values are in scientific notation (1e-02 1e-01 1e+00 etc).
Might you have some idea on how I can get the plot to uses the x values
(0.01 0.10 1.0 10.0 etc) instead? A related Q - where might a good place to
search for such
2010 Jun 24
1
how to change the format of numeric variable
Hi,
The format problem is really annoying. How to get rid of it?
x
[1] 1e+06
And also when I do barplot,
x=rnorm(100,mean=1000)
barplot(table(cut(x,breaks=c(0,50,100,150,200,250,300,350,400,450,500,1000,2000,5000,10000))))
The data will show as scientific format, when it is larger than 999 (1e+03,
5e+3).
I would like all the data in the digit format (1000, 5000).
Does any function works
2019 Mar 21
3
prettyNum digits=0 not compatible with scientific notation
R developers,
Seems I get a bad result ("%#4.0-1e" in particular) when trying to use prettyNum digits=0 with scientific notation. I tried on both my Linux box and on an online R evaluator and saw the same problem, so it's not limited to my box at least. I see the problem in both R 3.5.3 and R 3.3.2.
options(scipen=-100)
prettyNum(1, digits=0)
[1] "%#4.0-1e"
prettyNum(2,
2006 Apr 28
1
displaying numbers not in scientific notation
Sorry for asking such a simple question, but I couldn't find the
answer through a search...
How can I get R to show me the values of estimates *not* in scientific notation?
When I use summary() after using lm() I am getting numbers like
4.485107e-01, when what I want to see is 0.4485....
Thanks,
Brian
2009 Feb 23
2
1.095e+09 for integers
I've had a very long file written out by R with write.table, with
fields of time values, converted from POSIXlt as.numeric. Among 2.5
million values, very few had 6 trailing zeroes, and those were output
in scientific notation as in the subject. Is this the default
behavior for long integers, and how can it be turned off (with all
digits for any integer field in write.table)? This
2011 May 12
2
How to extract information from the following dataset?
Hi all,
I have never worked with this kind of data before, so Please help me out
with it.
I have the following data set, in a csv file, looks like the following:
Jan 27, 2010 16:01:24,000 125 - - -
Jan 27, 2010 16:06:24,000 125 - - -
Jan 27, 2010 16:11:24,000 176 - - -
Jan 27, 2010 16:16:25,000 159 - - -
Jan 27, 2010 16:21:25,000 142 - - -
Jan 27, 2010 16:26:24,000 142 - - -
Jan 27, 2010
2007 Sep 26
3
Scientific Notation
Dear List:
Below is how I specify an axis:
axis(2, at=c(0.00005, 0.0005))
R displays the numbers in scientific notation. What
argument/parameter should I use to tell R to display the numbers as
specified rather than in scientific notation?
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major
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
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
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=".")
>