[BioC] trouble with rhdf5 and hdf5.datasets

Laurent Gautier laurent@cbs.dtu.dk
Sun, 21 Jul 2002 14:30:34 +0200


Dear all,

I observed unexplainable things with rhdf5. I do not
know if they could be avoided. 

I am trying to access datasets in a group using the
function 'do.call' with "$" (since the name of the
dataset will only be known at run-time)... and I have
a hard time with that (example below). Does anybody
have experience with that ?


## example from the help file
> mad <- hdf5.open("microarray.h5")
>        # Create a new group inside the file
>        hdf5.group(mad,"chip1")
>        hdf5.dataset(mad$chip1,"raw", dim=c(534,534))
> 
>        raw <- mad$chip1$raw
>        for(i in 1:534) 
+            { raw[i,1:534] <- runif(534) }

> 
> do.call("$", list("mad", "chip1"))
NULL

# uh, uh....


> mad$chip1
  	Name	Type	Date		Comment
[1]	raw	Dataset	21/07/2002 16:26

# let's try again...

> do.call("$", list("mad", "chip1"))
NULL
> mad
  	Name	Type	Date		Comment
[1]	chip1	Group	

# show stopper

> mad[[1]]
Segmentation fault





Thanks,




Laurent






-- 
--------------------------------------------------------------
Laurent Gautier			CBS, Building 208, DTU
PhD. Student			DK-2800 Lyngby,Denmark	
tel: +45 45 25 24 85		http://www.cbs.dtu.dk/laurent