similar to: prettyNum inserts leading commas (PR#1548)

Displaying 20 results from an estimated 2000 matches similar to: "prettyNum inserts leading commas (PR#1548)"

2002 Mar 13
1
Commas in formatC
formatC() is great for formatting numbers! But it would be even better if it could optionally insert commas (or semicolons), e.g. R> formatC(1234567.89, digits=2, format="f", commas=T) [1] "1,234,567.89" Here's a snippet of code that does that, which could more or less just be inserted into at the end of formatC if any R-core guru were so inclined. "r"
2002 Apr 10
5
Funny characters in x11 window title (PR#1451)
In R-1.5.0pre (2002-04-08) on Solaris 2.6, the window that X11() creates has a title like: R Graphics: Device 2 (ACTIVE) o iyeP )( y except the funny characters at the end have umlauts and other accents (i.e. extended ASCII characters), and they may be different each time X11() is invoked. There is no loss of functionality; it just looks a little ugly. I saw this behavior in R-1.3.?, it
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
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,
2002 Aug 15
1
order(1, na.last=NA) fails (PR#1913)
R> order(1, na.last=NA) Error in apply(sapply(z, is.na), 1, any) : dim(X) must have a positive length This bug appears unrelated to PR#1906, and so the fix of 8/15 doesn't help. It comes from the line inside order(): ok <- !apply(sapply(z, is.na), 1, any) where z=list(1) in my example. sapply() returns a single-element vector, not a matrix, making apply() unhappy. This might
2002 Jan 07
1
Is r-announce alive?
I sent a message to <r-announce at stat.math.ethz.ch> last Thursday ("New package: colSums"), and still haven't seen it echoed on r-help or on the web archive (in fact there is no r-announce web archive for 2002). Is something broken? Did I need to use <r-announce at lists.R-project.org> instead? -- -- David Brahm (brahm at alum.mit.edu)
2001 Dec 10
1
Documentation of .Last.lib in library() (PR#1209)
help(library) says: "`.Last.lib' is called when a package is loaded." Probably should be "...is detached." -- David Brahm (brahm@alum.mit.edu) --please do not edit the information below-- Version: platform = sparc-sun-solaris2.6 arch = sparc os = solaris2.6 system = sparc, solaris2.6 status = major = 1 minor = 3.1 year = 2001
2002 Aug 20
1
Running median
I have a Date x Stock (223 x 520) matrix of "trading volume". I can calculate a 5-day (past) average in about 1 second using: R> apply(vol, 1, filter, filter=c(0, rep(1/5,5)), sides=1) I would like to do the same with a 5-day median, e.g.: R> mymed <- function(x, n=5) { R> r <- rep(NA, length(x)) R> for (i in (n+1):length(x)) r[i] <- median(x[i-(1:n)]) R>
2001 Oct 22
1
round() doesn't (PR#1139)
R> round(100000/3, -2) - 33300 [1] -7.275958e-12 I would have hoped for 0. The problem seems to be specifically for negative "digits". This is in 1.3.1 on Solaris 2.6 (full description at bottom). [Apologies for making everyone read this 3 times; my bug.report() burped.] Peter Dalgaard <p.dalgaard@biostat.ku.dk> says the problem is in fround.c, which reads in part:
2001 Dec 10
0
Re: bug.report() sends empty message (PR#1158)
On Oct 22, I sent an empty bug report (#1138) because bug.report() "ate my message". Paul Gilbert opened a new bug report (#1158) for this problem. I'm now convinced it's because I had an apostrophe in the subject line ("round() doesn't"). The bug.report documentation specifically warns against this, but the bug.report() function could also check for it! I
2001 Nov 30
0
Problems with environmental variables set with Sys.putenv
Environment variables set with Sys.putenv() "disappear" spontaneously (and somewhat randomly) when I load large datasets. This was reported in R-help by Dave Kane on June 4, 2001; I have not seen any further discussion. I'm not sure if I can report it as a "bug", since it is not entirely reproducible. Could someone try this and see if you have trouble too? The following
2002 Jan 28
0
merge() generates a factor: bug?
Hello, When I merge two dataframes, each created by read.table and containing no factors, the result has columns which have been converted to factor. I think this is a bug (and may be related to some fixed bugs, eg PR#1102, PR#1121), but will await comments before submitting. Also, I'm not sure if the bug is in merge() or in read.table(). I am using R-1.4.0 patch 1/13/02 on Solaris 2.6.
2002 Mar 08
2
Sys.putenv environment variables disappear (PR#1371)
Environment variables set with Sys.putenv() disappear (i.e. become "") after a while, especially after heavy-duty I/O. Example: R> x <- matrix(1., 3000, 3000) R> save(x, file="myx.RData") R> Sys.putenv(HOME="/tmp") R> while (Sys.getenv("HOME") != "") {cat("ok\n"); load("myx.RData")} The loop prints
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
2019 Mar 22
0
prettyNum digits=0 not compatible with scientific notation
Thank you, Robert for raising this here ! >>>>> Robert McGehee >>>>> on Thu, 21 Mar 2019 20:56:19 +0000 writes: > 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
2019 Mar 22
0
prettyNum digits=0 not compatible with scientific notation
>>>>> peter dalgaard >>>>> on Fri, 22 Mar 2019 17:30:19 +0100 writes: > 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? It seems (and note we are talking about format.default()
2001 Sep 14
1
rowsum dimnames (PR#1092)
The result of rowsum() in R doesn't have the dimnames I'd expect, e.g.: > rowsum(matrix(1:12, 3,4), c("Y","X","Y")) [,1] [,2] [,3] [,4] 1 2 5 8 11 2 4 10 16 22 whereas S-Plus gives the more useful result: [,1] [,2] [,3] [,4] X 2 5 8 11 Y 4 10 16 22 This is because R's rowsum() code gives the
2018 May 25
4
options other than regex
Hi -- I'm looking for alternatives to regex for a fairly simply 'reformatting' problem. Alternatives only because a lot of folks have trouble parsing/interpreting regex expressions, and I'm looking for suggestions for something more 'transparent'. Here is an example of what I'm trying to do. Take the following string, which I call x, and for each character in the
2001 Dec 14
2
colSums in C
Hi, all! My project today is to write a speedy colSums(), which is a function available in S-Plus to add the columns of a matrix. Here are 4 ways to do it, with the time it took (elapsed, best of 3 trials) in both R and S-Plus: m <- matrix(1, 400, 40000) x1 <- apply(m, 2, sum) ## R=16.55 S=52.39 x2 <- as.vector(rep(1,nrow(m)) %*% m) ## R= 2.39 S= 8.52 x3 <-
2008 Aug 07
1
Bug in format.default(): na.encode does not have any effect for (PR#12318)
Hi! If I use format() on numeric vector, na.encode argument does not have any e= ffect. This was reported before: - https://stat.ethz.ch/pipermail/r-help/2007-October/143881.html - http://tolstoy.newcastle.edu.au/R/e2/devel/06/09/0360.html It works for other (say character) classes! > format(c("a", NA), na.encode=3DTRUE) [1] "a " "NA" >