Displaying 20 results from an estimated 10000 matches similar to: ""a.matrix[a.char.matrix]<- " crashes R (PR#447)"
2001 Oct 08
1
NA as names of vector from subscripted matrix == bug ?
Is this a bug?
> matrix(1:4,nc=2,dimnames=list(1:2,1:2))[c(1,3)]
1 NA
1 3
It has some annoying consequences, e.g.
> median( matrix(1:9,nc=3,dimnames=list(1:3,1:3))[1,,drop=F] )
NA
4
>
The above was for
Version:
platform = sparc-sun-solaris2.7
arch = sparc
os = solaris2.7
system = sparc, solaris2.7
status =
major = 1
minor = 3.0
year = 2001
month = 06
day = 22
2000 Sep 29
2
all.equal.list() sometimes fails with unnamed and named components (PR#674)
examples:
1) Fails to report that components 2 and 3 differ
all.equal(list(1,2,3,zap=1),list(1,3,4,zap=2))
[1] "Component zap: Mean relative difference: 1
2) Incorrectly asserts all are equal when components 2 and 3 differ
> all.equal(list(1,2,3,zap=1),list(1,3,4,zap=1))
[1] TRUE
3) Removing named component reveals differences:
> all.equal(list(1,2,3,1),list(1,3,4,1))
[1]
1999 Dec 10
1
split nukes names() (PR#371)
> split(c(a=1,b=2),c(1,2))
$"1"
[1] 1
$"2"
[1] 2
The documentation does not *promise* that names will survive, but in
Splus3.4, they do. This broke a function that worked under S+ that used
the names attribute of elements in the components returned by split.
Chuck Berry
--please do not edit the information below--
Version:
platform = sparc-sun-solaris2.7
arch = sparc
2001 Mar 23
0
cor(x,y) when is.null(y) (PR#883)
Problem:
> names(my.dat)
[1] "x" "y"
> cor(my.dat$x,my.dat$y) # desired result
[1] 0.8660254
> cor(my.dat$x,my.dat$y.NOT) # typo
[1] 1
>
I'd prefer a warning() or stop() in that case.
Solution (??) :
*** 1,5 ****
--- 1,7 ----
cor <- function (x, y=NULL, use="all.obs")
{
+ if (is.null(y) && !is.null( match.call()$y ) )
+
2000 Mar 13
1
plot(1:10,c(1)$nothing) yields index plot (PR#482)
<<insert bug report here>>
IMHO,
plot(x,c(1)$nothing)
should fail or at least issue a warning.
Instead it produces an index plot of the first argument, i.e. plot(x)
Chuck Berry
--please do not edit the information below--
Version:
platform = sparc-sun-solaris2.7
arch = sparc
os = solaris2.7
system = sparc, solaris2.7
status = Patched
major = 1
minor = 0.0
year = 2000
2001 Jun 18
1
"[.data.frame" allows un-named 3rd subscript (PR#989)
Since the Extract page has usage as:
x[i, j, ... , drop=TRUE]
I would expect that 'drop=' would need to be given to the third 'subscript'
> diag(4)[ , 4 , 4 ] # Forgot 'drop=' or added extra ','
Error in diag(4)[, 4, 4] : incorrect number of dimensions
>
> as.data.frame( diag(4) )[ , 4 , 4 ] # should return error, right?
[1] 0 0 0 1
Also note:
2000 Nov 08
1
substitute(x$y)) corrupts 'y' component (PR#731)
viz.
> (function(x,y=a) substitute(x$y))(x)
x$a
> (function(x,y=a) substitute(x$y))(list(y=1:3))
list(y = 1:3)$a
> (function(x,y) eval(substitute(substitute(y))))(x=list(y=1:3),y=x$y)
list(y = 1:3)$x$y
The behavior I expect and want is like that in Splus 3.4:
> (function(x,y=a) substitute(x$y))(x)
x$y
> (function(x,y=a) substitute(x$y))(list(y=1:3))
list(y = 1:3)$y
>
2000 Mar 12
1
make check fails after base-Ex.R
Dear R-help,
I tried to build the R-release version of R-1.0.0.
./configure and make seemed to go just fine.
When I ran 'make check' from $RHOME, it dumped core apparently in the
quit('no')
on the last line of base-Ex.R
I had been having some problems with a package I am building in that R
would report with "Process R segmentation violation (core dumped)" upon
1999 Nov 11
2
dimname'less array breaks apply (PR#318)
<<insert bug report here>>
> apply(array(1:20,c(2,2,5)),2:3,function(x) x)
Error: length of dimnames must match that of dims
>
Changing:
dimnames = if (is.null(dn.ans)) list(ans.names, NULL) else c(list(ans.names), dn.ans)
To:
dimnames = if (length(dn)==0) NULL else
if (is.null(dn.ans)) list(ans.names, NULL) else c(list(ans.names), dn.ans)
seems to fix this.
Chuck
2001 Apr 10
1
Segmentation fault in subscripting array of lists (PR#904)
I get a segmentation fault as follows:
> tmp <- array(list(), c(3, 4))
> tmp[[1, 2]]
NULL # as expected
> tmp[[1, 2]]$fred <- 1:10
> tmp # as expected
[,1] [,2] [,3] [,4]
[1,] "NULL" "List,1" "NULL" "NULL"
[2,] "NULL" "NULL"
2000 Oct 16
2
print problem with data frames (PR#698)
Another one from the student computer practicals: it is possible
to create a dataframe that cannot be printed. Thus
> fred <- data.frame(happy=c(TRUE, FALSE, TRUE), sad=7:9)
> tmp <- fred[c(FALSE, FALSE, TRUE, TRUE)] # no error message!
> tmp
Error in as.matrix.data.frame(x) : dim<- length of dims do not match the length of object
> print.default(tmp)
$"NA"
NULL
2000 Mar 22
3
segmentation fault with 1D array (PR#500)
Here's a nasty one. The following has caused a segmentation
fault and possibly also a bus error.
fred <- 1:6
dim(fred) <- 6
dimnames(fred) <- list(LETTERS[1:6])
mm <- matrix(1:12, 2, 6)
mm %*% fred # segmentation fault here
In the case without the dimnames assignment the result is OK.
Cheers, Jonathan.
--please do not edit the information below--
Version:
platform =
2008 Nov 19
1
more efficient small subsets from moderate vectors?
This creates a named vector of length nx, then repeatedly draws a
single sample from it.
lkup <- function(nx, m=10000L) {
tbl <- seq_len(nx)
names(tbl) <- as.character(tbl)
v <- sample(names(tbl), m, replace=TRUE)
system.time(for(k in v) tbl[k], gcFirst=TRUE)
}
There is an abrupt performance degredation at nx=1000
> lkup(1000)
user system elapsed
0.180
2000 Apr 06
2
Strange behaviour of image (PR#510)
The following commands
z <- matrix(seq(0, 1, len=1000))
image(z, 1, z, zlim=c(0, 1), col=gray(1:10/10))
appear to violate the image functionality as described on the
help page. As I understand it, by specifying a zlim of c(0, 1)
and a colour vector of length 10, the colours should correspond
to the intervals (0, 0.1), (0.1, 0.2), ..., (0.9, 1.0), this
being 10 equally-spaced intervals on (0,
2002 Jun 13
3
Bug in rnorm. (PR#1664)
There appears to be a mild bug, or at least a deficiency, in
rnorm. The bug becomes apparent when one looks at extremes
of the squares of the values generated by rnorm; rnorm is not
generating quite enough extreme values.
The R version that I am using is 1.4.1; I never got around to installing
1.5.0, and now since 1.5.1 is about to come out .... However, checking
the 1.5.0 release notes
2004 Aug 06
1
solaris 2.7 libshout error
Has anyone seen this issue before on solaris 2.7. I keep getting this error
for libshout when trying to compile the example.
root#[/usr/local/src/libshout-1.0.9/example]#gcc -lshout -o test example.c
Undefined first referenced
symbol in file
socket
/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.2/../../../libshout.so
recv
2004 Aug 06
1
solaris 2.7 libshout error
thanks Karl,
that got me almost there. I think i am still missing one other library
apparently. ANy ideas ?
#gcc -lshout -lsocket -lnsl -o test example.c
Undefined first referenced
symbol in file
inet_pton
/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.2/../../../libshout.so
ld: fatal: Symbol referencing errors. No output written to test
2003 Feb 12
2
rl_callback_read_char error on Solaris 7
This question is about compiling R-1.6.2 from source on a
Sparcstation-20 machine running Solaris 7, gcc-2.95.3 and
readline-4.2 (both gcc and readline from sunfreeware.com).
I searched the r-help archive and the FAQ. The errors seem to be
related to the binary readline libraries, and I have
/usr/local/lib/libreadline.a,libreadline.so@, and
libreadline.so.4.
The attached errors are from
2003 Oct 29
1
restarting split.screen
Is there a way of `restarting' split.screen?
This is what I am getting:
> close.screen()
[1] 10 11 12 13
> close.screen(all=TRUE)
Error in par(args) : parameter "i" in "mfg" is out of range
> graphics.off()
> x11()
> close.screen()
[1] 10 11 12 13
> close.screen(all=TRUE)
Error in par(args) : parameter "i" in "mfg" is out of range
As
2001 Mar 03
0
bqtl available on CRAN
Package bqtl version 1.0 is now available on CRAN.
Description: QTL mapping toolkit for inbred crosses and
recombinant inbred lines. Includes maximum likelihood and Bayesian
tools.
I am keen to have comments about this package including implementation
details, additional functionality, and (of course) problems and bugs.
Chuck Berry
--
Charles C. Berry (858) 534-2098