search for: rstrlen

Displaying 7 results from an estimated 7 matches for "rstrlen".

Did you mean: strlen
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 to count the characters in each label, but Rstrlen doesn't understand NA's. Here's a patch, to be applied between lines 242 ("int len;") and 243 ("len = 0;"): if (s ==...
2007 Apr 17
2
format() applied to an NA character string (PR#9616)
I get strange results when I try to format() an NA character string. > x <- 'sometext' > x[1] <- NA > format(NA, width=32) # displays sensibly, right-justified > format(x,width=32) # displays sensibly, left-justified > format(x,width=33) # displays "" > format(x,width=36) # R exits abnormally with code 5 > version platform i386-pc-mingw32
2012 Mar 13
0
111 FIXMEs in main/src
...it if you really think it matters. -- bind.c:/* FIXME : is there another possibility? */ bind.c- -- bind.c: /* FIXME: I'm not sure what the author intended when the sequence was bind.c- defined as raw < logical -- it is possible to represent logical as -- builtin.c: /* FIXME -- Rstrlen allows for double-width chars */ builtin.c- width += Rstrlen(STRING_ELT(labs, nlines % lablen), 0) + 1; -- builtin.c: /* FIXME: call EncodeElement() for every element of s. builtin.c- -- builtin.c: /* FIXME : cat(...) should handle ANYTHING */ builtin.c- w = strlen(p); -- character....
2007 Dec 07
0
Bug#454678: r-base-core: Crash when calling edit.matrix with edit.row.names = TRUE when there are no rownames (PR#10500)
...eveals: (gdb) where #0 0xb7b2ef2c in __gconv_transform_utf8_internal () from /lib/i686/cmov/libc.so.6 #1 0xb7b89f75 in mbrtowc () from /lib/i686/cmov/libc.so.6 #2 0xb7db05e3 in Rstrwid (str=0x8052010 "\020!\005\b\002", slen=134595712, quote=0) at printutils.c:284 #3 0xb7db0888 in Rstrlen (s=0x8051ff8, quote=0) at printutils.c:377 #4 0xb7d2de24 in Rf_formatString (x=0x873bbb8, n=1, fieldwidth=0xbfd0fc04, quote=0) at format.c:62 #5 0xb7db12b5 in Rf_EncodeElement (x=0x873ba10, indx=100, quote=0, dec=46 '.') at printutils.c:576 #6 0xb754ae0d in get_col_width (DE=0xbf...
2007 Dec 07
0
(PR#10500) Bug#454678: r-base-core: Crash when calling
...; #0 0xb7b2ef2c in __gconv_transform_utf8_internal () from /lib/i686/cmov/libc.so.6 > #1 0xb7b89f75 in mbrtowc () from /lib/i686/cmov/libc.so.6 > #2 0xb7db05e3 in Rstrwid (str=0x8052010 "\020!\005\b\002", slen=134595712, > quote=0) at printutils.c:284 > #3 0xb7db0888 in Rstrlen (s=0x8051ff8, quote=0) at printutils.c:377 > #4 0xb7d2de24 in Rf_formatString (x=0x873bbb8, n=1, fieldwidth=0xbfd0fc04, > quote=0) at format.c:62 > #5 0xb7db12b5 in Rf_EncodeElement (x=0x873ba10, indx=100, quote=0, dec=46 '.') > at printutils.c:576 > #6 0xb754ae0d in...
2003 Apr 16
2
R-1.7.0 is released
....test() could give integer overflow warnings on very long vectors. Also added tests for numeric inputs, as per the help page. (PR#2453) o Printing unquoted character vectors containing escape characters was computing the wrong length and hence misaligning names. This was due to a bug in Rstrlen which might have had other effects. o if(logical(0)) and while(logical(0)) now report zero length, not `missing value where logical is needed'. o The gaussian() and inverse.gaussian() families were documented to allow only one link, which has not been true in R for at least four y...
2003 Apr 16
2
R-1.7.0 is released
....test() could give integer overflow warnings on very long vectors. Also added tests for numeric inputs, as per the help page. (PR#2453) o Printing unquoted character vectors containing escape characters was computing the wrong length and hence misaligning names. This was due to a bug in Rstrlen which might have had other effects. o if(logical(0)) and while(logical(0)) now report zero length, not `missing value where logical is needed'. o The gaussian() and inverse.gaussian() families were documented to allow only one link, which has not been true in R for at least four y...