similar to: how to set the number format to pure numeric?

Displaying 20 results from an estimated 7000 matches similar to: "how to set the number format to pure numeric?"

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
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
2003 Aug 01
2
'format' problem
Dear R experts, format(12345678, digits = 2) gives [1] "1.2e+07" while format(1234567, digits = 2) gives [1] "1234567" but I'd like the last number to be represented as "1.2e+06" string too. Where am I wrong? Thanks, Timur.
2004 Aug 24
0
"how to set the number format to pure numeric?" was SOLVED
Thank you for your kind help. I am done now. regards, lichi
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
2008 Sep 15
1
modifying this barplot
Here is an example barplot that needs some tweaking: library(gplots) ratios <- data.frame(c(0.05,0.10,0.9),c(0.06,0.15,0.76)) rownames(ratios) <- c("T1","T2","T3") colnames(ratios) <- c("A1","A2") ratios <- as.matrix(ratios) myplot <- barplot2(ratios, beside = TRUE,col = c("blue",
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:
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
2009 Aug 12
3
axis scale
Dear All, I'm trying to plot a histogram (with the relative frequencies as the Y axis), But the scale of the y axis is given by 0e+00, 1e-04, 2e-04, 3e-04,......... Now, I have 2 questions 1- Does (1e-04=0.01831563)? 2- If this true,how can i change the given scale to (0.01,0.03,0.05,0.07,0.09)? [[alternative HTML version deleted]]
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
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]]
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,
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
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 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
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
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