similar to: formatting of complex matrix

Displaying 20 results from an estimated 500 matches similar to: "formatting of complex matrix"

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
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="")
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=".") >
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.
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
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
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
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
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]
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
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
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
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
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
2006 Feb 01
2
Write.table: change points to commas when object contains a row of characters
Dear Group! I asked write.table to change the decimal point from "." to "," , but apparently it would only do so if the object to be written does not contain any character elements. I would like to understand, why this has to be so and - of course - find a solution for my matrix object jjmat, that I tried to write out by write.table(jjmat, file="jjmat.txt",
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
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
2005 Apr 17
3
RFC: hexadecimal constants and decimal points
These are some points stimulated by reading about C history (and related in their implementation). 1) On some platforms > as.integer("0xA") [1] 10 but not all (not on Solaris nor Windows). We do not define what is allowed, and rely on the OS's implementation of strtod (yes, not strtol). It seems that glibc does allow hex: C99 mandates it but C89 seems not to allow it. I
2012 Aug 08
3
decimal points midline
Hi, does anyone know how to make decimal points midline when plotting? The journal to which we are going to submit a manuscript require this particular formatting, and it gives direction how to do this on PC: hold down ALT key and type 0183 on the number pad Thanks John [[alternative HTML version deleted]]
2012 Aug 14
0
as.numeric and as.character with locale using comma as separator
Dear all, summary: My LC_NUMERIC is changed from C to de_DE by library (qtbase). [which shouldn't happen according to the warning when setting it back manually]. I posted an issue at their github repository, but maybe the behaviour is a bit more of general interest. However, if LC_NUMERIC is changed, as.character () uses the decimal separator that belongs to LC_NUMERIC (and not options