[H5r-commits] r68 - man src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 20 08:40:42 CEST 2011


Author: extemporaneousb
Date: 2011-09-20 08:40:42 +0200 (Tue, 20 Sep 2011)
New Revision: 68

Added:
   man/createH5Attribute-methods.Rd
   man/createH5Dataset-methods.Rd
   man/createH5Group-methods.Rd
   man/deleteH5Attribute-methods.Rd
   man/deleteH5Obj-methods.Rd
   man/readH5Data-methods.Rd
   man/writeH5Data-methods.Rd
Removed:
   man/createH5Attribute.Rd
   man/createH5Dataset.Rd
   man/createH5Group.Rd
   man/deleteH5Attribute.Rd
   man/deleteH5Obj.Rd
   man/readH5Data.Rd
Modified:
   man/H5File.Rd
   man/h5AttributeExists.Rd
   man/h5DatasetExists.Rd
   man/h5GroupExists.Rd
   man/h5ObjectExists.Rd
   man/listH5Attributes.Rd
   src/h5_wrap.c
Log:
A number of documentation fixes.

Modified: man/H5File.Rd
===================================================================
--- man/H5File.Rd	2011-09-15 17:39:00 UTC (rev 67)
+++ man/H5File.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -4,16 +4,19 @@
   Create an H5File.
 }
 \description{
-Constructs a read-only H5File.
+  Constructs a read-only H5File.
 }
 \usage{
-H5File(fileName)
+  H5File(fileName, mode = "r")
 }
 \arguments{
   \item{fileName}{
     A path to an H5File. Typically, the path cannot contain special
     characters, such as "~". 
   }
+  \item{mode}{
+    Whether to open the file up with write capabilities.
+  }
 }
 \value{
   An object of class H5File. 

Added: man/createH5Attribute-methods.Rd
===================================================================
--- man/createH5Attribute-methods.Rd	                        (rev 0)
+++ man/createH5Attribute-methods.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -0,0 +1,42 @@
+\name{createH5Attribute-methods}
+\alias{createH5Attribute}
+\alias{createH5Attribute-methods}
+\alias{createH5Attribute,H5Obj-method}
+\title{Method for Creating Attributes on H5 Objects}
+\description{
+  Creates a new attribute on an H5 Object.
+}
+\usage{
+  \S4method{createH5Attribute}{H5Obj}(h5Obj, attrName, attrValue, overwrite = TRUE)
+}
+\arguments{
+  \item{h5Obj}{
+    Oject to which the attribute is attached.
+  }
+  \item{attrName}{
+    Name of attribute.
+  }
+  \item{attrValue}{
+    The value portion of the attribute which contains data element(s)
+    of the same data type. 
+  }
+  \item{overwrite}{
+    Flag specifying whether to err if attribute name already exists.
+  }
+}
+\value{
+  An object of type H5Attribute.  
+}
+\section{Methods}{
+  \describe{
+    \item{\code{signature(h5Obj = "H5Obj")}}{
+    }
+}}
+\examples{
+  require(h5r)
+  h5 <- H5File("test.h5", 'w')
+  a <-  createH5Attribute(h5, "attri", c("a","b","c","d"))
+  b <-  createH5Attribute(h5, "bute", as.integer(c(rnorm(1),rpois(1,5))))
+  list(a,b)
+}
+\keyword{methods}

Deleted: man/createH5Attribute.Rd
===================================================================
--- man/createH5Attribute.Rd	2011-09-15 17:39:00 UTC (rev 67)
+++ man/createH5Attribute.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -1,45 +0,0 @@
-\name{createH5Attribute}
-\alias{createH5Attribute}
-\title{
-  A Function that Creates a Metadata Oject that Describes the Primary Data Object
-}
-\description{
-  'createH5Attribute' describes characteristics of the primary data object,
-  such as a dataset, and specifies the attribute property list. The
-  primary data object characteristics include the datatype and
-  dataspace of the attribute data.
-}
-\usage{
-  createH5Attribute(h5Obj, attrName, attrValue, ...)
-}
-\arguments{
-  \item{h5Obj}{
-    Oject to which the attribute is attached.
-}
-  \item{attrName}{
-    Name of attribute.
-}
-  \item{attrValue}{
-    The value portion of the attribute which contains data element(s)
-    of the same data type. 
-}
-   \item{\dots}{
-     Extra arguments. See class documentation for specific methods.
-}
-}
-\details{
-  The attribute is attached to an object and has a unique name. The
-  value part of the attribute conatins one or more data elements.
-}
-\value{
-  An object of type H5Attribute.  
-}
-\examples{
-  require(h5r)
-  h5 <- H5File("test.h5", 'w')
-  a <-  createH5Attribute(h5, "attri", c("a","b","c","d"))
-  b <-  createH5Attribute(h5, "bute", as.integer(c(rnorm(1),rpois(1,5))))
-  list(a,b)
-}
-\keyword{attribute}
-

Added: man/createH5Dataset-methods.Rd
===================================================================
--- man/createH5Dataset-methods.Rd	                        (rev 0)
+++ man/createH5Dataset-methods.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -0,0 +1,60 @@
+\name{createH5Dataset-methods}
+\alias{createH5Dataset-methods}
+\alias{createH5Dataset}
+\alias{createH5Dataset,H5Container,character-method}
+\title{Create Datasets in HDF5 Files}
+\description{
+  This method creates a new dataset in an HDF5 file.
+}
+\usage{
+  \S4method{createH5Dataset}{H5Container,character}(h5Obj, datasetName, data, dims, dType, chunkSizes, overwrite)
+}
+\arguments{
+  \item{h5Obj}{
+    H5 object in which the dataset is located, e.g., H5File or H5Group.
+  }
+  \item{datasetName}{
+    Specify name of dataset.
+  }
+  \item{data}{
+    The actual data to store, e.g., a matrix or vector of the same data type.
+  }
+  \item{dims}{
+    Specify dimensions of dataset.
+  }
+  \item{dType}{
+    Specify data type; integer, double or character.
+  }
+  \item{chunkSizes}{
+    Specify chunk sizes of dataset.
+  }
+  \item{overwrite}{
+    Overwrite dataset.
+  }
+}
+\section{Methods}{
+  \describe{
+    \item{\code{signature(h5Obj = "H5Container", datasetName = "character")}}{
+      Given an H5Container object, e.g., H5Group and a name create a
+      dataset under that container in the file.
+    }
+}}
+\examples{
+  require(h5r)
+  h5 <- H5File("test.h5",'w')
+  m <- createH5Dataset(h5, "mm", cbind(rnorm(1000), rnorm(1000)))
+  m[1:10, 2]
+
+  m <- createH5Dataset(h5, "nn", dims = c(2,2),dType = "character")
+  m[]
+  writeH5Data(m, c("agct", "tcga"), c(1,1), c(1,2)) 
+  writeH5Data(m, c("jack", "jill"), c(2,1), c(1,2)) 
+  m[]
+  ls(h5)
+  m <- createH5Dataset(h5, "vect", dims = c(10000,1), dType = "integer")
+  m[]
+  for(i in 1:10) {
+      writeH5Data(m, as.integer(rpois(1000,lambda = 10)), c((i-1)*1000+1,1),c( 1000,1))
+  }
+}
+\keyword{methods}

Deleted: man/createH5Dataset.Rd
===================================================================
--- man/createH5Dataset.Rd	2011-09-15 17:39:00 UTC (rev 67)
+++ man/createH5Dataset.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -1,70 +0,0 @@
-\name{createH5Dataset}
-\alias{createH5Dataset}
-\alias{writeH5Data}
-\alias{H5Container-class}
-\alias{createH5Dataset-methods}
-
-\title{Create a Dataset in the Specified H5 Object}
-\description{
-  'createH5Dataset' contains a header and a data
-  array. The header describes the name of the group, datatype,
-  dataspace, and storage layout.
-}
-\usage{
-  createH5Dataset(h5Obj, datasetName, data, dims, dType =
-  c("integer", "double", "character"), chunkSizes = NA, overwrite = TRUE)
-}
-\arguments{
-  \item{h5Obj}{
-    H5 object in which the dataset is located.
-  }
-  \item{datasetName}{
-    Specify name of dataset.
-  }
-  \item{data} {
-    The actual data to store, e.g., a matrix or vector of the same data type.
-  }
-  \item{dims}{
-    Specify dimensions of dataset.
-  }
-  \item{dType}{
-    Specify data type; integer, double or character.
-  }
-  \item{chunkSizes} {
-    Specify chunk sizes of dataset.
-  }
-  \item{overwrite} {
-    Overwrite dataset.
-    
-  }
-  \item{offsets} {
-    Determines x,y-point at which vector begins.
-  }
-  \item{extents} {
-    Determines the length of the vector.
-    }
-}
-\value{
-  Values returned are integer, double or character, depending on
-  data type.
-}
-\examples{
-  require(h5r)
-  h5 <- H5File("test.h5",'w')
-  m <- createH5Dataset(h5, "mm", cbind(rnorm(1000), rnorm(1000)))
-  m[1:10, 2]
-
-  m <- createH5Dataset(h5, "nn", dims = c(2,2),dType = "character")
-  m[]
-  writeH5Data(m, c("agct", "tcga"), c(1,1), c(1,2)) 
-  writeH5Data(m, c("jack", "jill"), c(2,1), c(1,2)) 
-  m[]
-  ls(h5)
-  m <- createH5Dataset(h5, "vect", dims = c(10000,1), dType = "integer")
-  m[]
-  for(i in 1:10) {
-      writeH5Data(m, as.integer(rpois(1000,lambda = 10)), c((i-1)*1000+1,1),c( 1000,1))
-  }
-}
-\keyword{datasets}
-

Added: man/createH5Group-methods.Rd
===================================================================
--- man/createH5Group-methods.Rd	                        (rev 0)
+++ man/createH5Group-methods.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -0,0 +1,28 @@
+\name{createH5Group-methods}
+\alias{createH5Group}
+\alias{createH5Group-methods}
+\alias{createH5Group,H5Container,character-method}
+\title{Create an H5Group in an H5Container}
+\description{
+  Creates a new H5Group under h5Obj.
+}
+\usage{
+  \S4method{createH5Group}{H5Container,character}(h5Obj, groupName, overwrite = TRUE)
+}
+\arguments{
+  \item{h5Obj}{
+    H5 object in which the group(s) or dataset(s) are located.
+  }
+  \item{groupName}{
+    Name of group to create.
+  }
+  \item{overwrite}{
+    Flag specifying whether to err if attribute name already exists.
+  }
+}
+\section{Methods}{
+  \describe{
+    \item{\code{signature(h5Obj = "H5Container", groupName = "character")}}{
+    }
+}}
+\keyword{methods}

Deleted: man/createH5Group.Rd
===================================================================
--- man/createH5Group.Rd	2011-09-15 17:39:00 UTC (rev 67)
+++ man/createH5Group.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -1,42 +0,0 @@
-\name{createH5Group}
-\alias{createH5Group}
-\title{
-   Create a Group that Contains HDF5 Objects
-}
-\description{
-  'createH5Group' contains zero or more HDF5 objects which can consist of
-   either groups, or datasets, and supporting metadata. 
-}
-\usage{
-  createH5Group(h5Obj, groupName, ...)
-}
-\arguments{
-  \item{h5Obj}{
-      H5 object in which the group(s) or dataset(s) are located.
-}
-  \item{groupName}{
-      Name of group.
-}
-  \item{\dots}{
-      Extra arguments. See class documentation for specific methods.
-}
-}
-\details{
-  HDF5 groups are comparable to directories in Linux/Unix.
-}
-\value{
-    An object of type H5Group.   
-}
-\references{
-  \url{http://www.hdfgroup.org/HDF5/doc/H5.intro.html.#IntroOGroups}
-}
-\seealso{
-  \link[=HDF5 file structures]{createH5Datasets}
-}
-\examples{
-  library("h5r")
-  h5 <- H5File("test.H5",'w')
-  createH5Group(h5, "grp101")
-}
-\keyword{datasets}
-

Added: man/deleteH5Attribute-methods.Rd
===================================================================
--- man/deleteH5Attribute-methods.Rd	                        (rev 0)
+++ man/deleteH5Attribute-methods.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -0,0 +1,33 @@
+\name{deleteH5Attribute-methods}
+\alias{deleteH5Attribute}
+\alias{deleteH5Attribute-methods}
+\alias{deleteH5Attribute,H5Obj-method}
+\title{Delete an H5Attribute}
+\description{
+  Deletes an H5 Attribute which is attached to an object.
+}
+\usage{
+ \S4method{deleteH5Attribute}{H5Obj}(h5Obj, attrName)
+}
+\arguments{
+  \item{h5Obj}{
+    Object to which the attribute is attached.
+  }
+  \item{attrName}{
+    Name of attribute.
+  }
+}
+\section{Methods}{
+  \describe{
+    \item{\code{signature(h5Obj = "H5Obj")}}{
+    }
+}}
+\examples{
+  require(h5r)
+  h5 <- H5File("test.h5", 'w')
+  atr <- createH5Attribute(h5, "atr1", 10:1)
+  atr
+  dl <- deleteH5Attribute(h5, "atr1")
+  dl
+}
+\keyword{methods}

Deleted: man/deleteH5Attribute.Rd
===================================================================
--- man/deleteH5Attribute.Rd	2011-09-15 17:39:00 UTC (rev 67)
+++ man/deleteH5Attribute.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -1,51 +0,0 @@
-\name{deleteH5Attribute}
-\alias{deleteH5Attribute}
-\alias{deleteH5Attribute-methods}
-\title{
-  A Function that Deletes a Metadata Object which Describes the Primary
-  Data Object
-}
-\description{
-  'deleteH5Attribute' removes the attribute that describes
-  characteristics of the primary data object. 
-}
-\usage{
- deleteH5Attribute(h5Obj, attrName, ...)
-}
-\arguments{
-  \item{h5Obj}{
-    Oject to which the attribute is attached.
-}
-  \item{attrName}{
-    Name of attribute.
-}
-  \item{attrValue}{
-    The value portion of the attribute which contains data element(s)
-    of the same data type.  
-}
-  \item{\dots}{
-    Extra arguments. See class documentation for specific methods.
-}
-}
-\details{
-  The attribute is attached to an object and has a unique name. The
-  value part of the attribute conatins one or more data elements.
-}
-\value{
-  An object of type H5Attribute.
-}
-\seealso{
-  \link[=attribute]{createH5Attribute}
-}
-\examples{
-  require(h5r)
-  h5 <- H5File("test.h5", 'w')
-
-  atr <- createH5Attribute(h5, "atr1", 10:1)
-  atr
-
-  dl <- deleteH5Attribute(h5, "atr1")
-  dl
-}
-\keyword{datasets}
-

Added: man/deleteH5Obj-methods.Rd
===================================================================
--- man/deleteH5Obj-methods.Rd	                        (rev 0)
+++ man/deleteH5Obj-methods.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -0,0 +1,33 @@
+\name{deleteH5Obj-methods}
+\alias{deleteH5Obj-methods}
+\alias{deleteH5Obj}
+\alias{deleteH5Obj,H5Container-method}
+\title{Delete an H5 Object}
+\description{
+  Deletes an H5 Object.
+}
+\usage{
+  \S4method{deleteH5Obj}{H5Container}(h5Obj, h5ObjName)
+}
+\arguments{
+  \item{h5Obj}{
+    An object of class H5Container holding something with name h5ObjName.
+  }
+  \item{h5ObjName}{
+    Name of H5Object.
+  }
+}
+\section{Methods}{
+  \describe{
+
+    \item{\code{signature(h5Obj = "H5Container")}}{
+    }
+}}
+\examples{
+   require(h5r)
+   h5 <- H5File("test.h5", 'w')
+   g1 <- createH5Group(h5,"grp1")
+   dl <- deleteH5Obj(h5,"grp1")
+   dl
+}
+\keyword{methods}

Deleted: man/deleteH5Obj.Rd
===================================================================
--- man/deleteH5Obj.Rd	2011-09-15 17:39:00 UTC (rev 67)
+++ man/deleteH5Obj.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -1,42 +0,0 @@
-\name{deleteH5Obj}
-\alias{deleteH5Obj}
-\title{
-  Delete Object
-}
-\description{
-  'deleteH5Obj' is a function that removes the H5 Object. The H5 object,
-  which is a baseclass, contains three subclasses: group, dataset and
-  datatype.
-}
-\usage{
-deleteH5Obj(h5Obj, h5ObjName, ...)
-}
-\arguments{
-  \item{h5Obj}{
-    This is the H5Object itself.
-}
-  \item{h5ObjName}{
-    Name of H5Object.
-}
-  \item{\dots}{
-    Extra arguments. See class documentation for specific methods.
-}
-}
-\value{
-  An object of type H5Object.
-}
-\references{
-  \link{http://www.hdfgroup.org/HDF5/doc/cpplus_RM/classH5_1_1H5Object.html}
-}
-\seealso{
-  \link[=HDF5 groups]{createH5Group}
-}  
-\examples{
-   require(h5r)
-   h5 <- H5File("test.h5", 'w')
-   g1 <- createH5Group(h5,"grp1")
-   dl <- deleteH5Obj(h5,"grp1")
-   dl
-}
-\keyword{data}
-

Modified: man/h5AttributeExists.Rd
===================================================================
--- man/h5AttributeExists.Rd	2011-09-15 17:39:00 UTC (rev 67)
+++ man/h5AttributeExists.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -9,22 +9,19 @@
   statement. 
 }
 \usage{
-h5AttributeExists(h5Obj, name)
+  h5AttributeExists(h5Obj, name)
 }
 \arguments{
   \item{h5Obj}{
     H5 object in which the attribute is located.
-}
+  }
   \item{name}{
     Name of attribute.
+  }
 }
-}
 \value{
   The object returned is of type logical.
 }
-\seealso{
-  \link{createH5Attribute}
-}
 \examples{
   require(h5r)
   h5 <- H5File("test.h5", 'w')
@@ -36,7 +33,6 @@
   d = listH5Attributes(h5)
   f(d[[1]])
   sapply(d, f)
-
 }
 \keyword{attribute}
 

Modified: man/h5DatasetExists.Rd
===================================================================
--- man/h5DatasetExists.Rd	2011-09-15 17:39:00 UTC (rev 67)
+++ man/h5DatasetExists.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -21,13 +21,10 @@
 \value{
   The object returned is of type logical.
 }
-\seealso{
-  \link{createH5Dataset}
-}
 \examples{
   require(h5r)
   h5 <- H5File("test.h5", 'w')
-   a = c(rnorm(100), rnorm(102)) 
+  a <- c(rnorm(100), rnorm(102)) 
   d1 <- createH5Dataset(h5, "new", a)
   d.e <- h5DatasetExists(h5, "new")
   d.e

Modified: man/h5GroupExists.Rd
===================================================================
--- man/h5GroupExists.Rd	2011-09-15 17:39:00 UTC (rev 67)
+++ man/h5GroupExists.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -22,9 +22,6 @@
 \value{
   The object returned is of type logical.
 }
-\seealso{
-  \link{createH5Group}
-}
 \examples{
   library("h5r")
   h5 <- H5File("test.H5",'w')

Modified: man/h5ObjectExists.Rd
===================================================================
--- man/h5ObjectExists.Rd	2011-09-15 17:39:00 UTC (rev 67)
+++ man/h5ObjectExists.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -21,17 +21,12 @@
 \value{
   The object returned is of type logical.
 }
-\seealso{
-  \link{createH5Dataset}
-  \link{createH5Group}
-}
 \examples{
   require(h5r)
   h5 <- H5File("test.h5", 'w')
   d1 <- createH5Dataset(h5,"new", c(rnorm(100),rnorm(90)))
   o.d <- h5ObjectExists(h5,"new")
   o.d
-
   g1 <- createH5Group(h5, "grp101")
   o.g <- h5ObjectExists(h5, "grp101")  
   o.g

Modified: man/listH5Attributes.Rd
===================================================================
--- man/listH5Attributes.Rd	2011-09-15 17:39:00 UTC (rev 67)
+++ man/listH5Attributes.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -12,14 +12,11 @@
 \arguments{
   \item{h5Obj}{
     H5 object to which the attributes are attached.
+  }
 }
-}
 \value{
   \item{attrName}{Name of attribute}
 }
-\seealso{
-  \link{createH5Attributes}
-}
 \examples{
   require(h5r)
   h5 <- H5File("test.h5", 'w')

Added: man/readH5Data-methods.Rd
===================================================================
--- man/readH5Data-methods.Rd	                        (rev 0)
+++ man/readH5Data-methods.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -0,0 +1,32 @@
+\name{readH5Data-methods}
+\alias{readH5Data}
+\alias{readH5Data-methods}
+\alias{readH5Data,H5Attribute-method}
+\alias{readH5Data,H5Dataset-method}
+\title{Read H5 Data}
+\description{
+  Low-level function for reading data from an H5 File.
+}
+\usage{
+  \S4method{readH5Data}{H5Attribute}(h5Obj)
+  \S4method{readH5Data}{H5Dataset}(h5Obj)
+}
+\arguments{
+  \item{h5Obj}{
+    An H5Object which stores data.
+  }
+}
+\section{Methods}{
+  \describe{
+    \item{\code{signature(h5Obj = "H5Attribute")}}{
+    }
+    \item{\code{signature(h5Obj = "H5Dataset")}}{
+    }
+}}
+\examples{
+  require(h5r)
+  h5 <- H5File("test.H5",'w')
+  m <- createH5Dataset(h5, "mm", cbind(rnorm(1000), rnorm(1000)))
+  readH5Data(m)
+}
+\keyword{methods}

Deleted: man/readH5Data.Rd
===================================================================
--- man/readH5Data.Rd	2011-09-15 17:39:00 UTC (rev 67)
+++ man/readH5Data.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -1,32 +0,0 @@
-\name{readH5Data}
-\alias{readH5Data}
-\title{
-  Print H5 data in the specified H5 Object
-}
-\description{
-  'readH5Data' is a function that is used for printing out a dataset in
-  the specified H5 Object.
-}
-\usage{
-readH5Data(h5Obj, ...)
-}
-\arguments{
-  \item{h5Obj}{
-    H5 object in which the dataset is located.
-}
-  \item{\dots}{
-    Extra arguments. See class documentation for specific methods.
-}
-}
-\value{
-  The values returned depend on H5 dataset data. Values returned can be
-  of type integer, double or character.
-}
-\examples{
-  require(h5r)
-  h5 <- H5File("test.H5",'w')
-  m <- createH5Dataset(h5, "mm", cbind(rnorm(1000), rnorm(1000)))
-  readH5Data(m)
-}
-\keyword{datasets}
-

Added: man/writeH5Data-methods.Rd
===================================================================
--- man/writeH5Data-methods.Rd	                        (rev 0)
+++ man/writeH5Data-methods.Rd	2011-09-20 06:40:42 UTC (rev 68)
@@ -0,0 +1,32 @@
+\name{writeH5Data-methods}
+\alias{writeH5Data-methods}
+\alias{writeH5Data}
+\alias{writeH5Data,H5Dataset-method}
+\title{Writes H5 Data to an Object}
+\description{
+  Writes data to an H5Dataset.
+}
+\usage{
+  \S4method{writeH5Data}{H5Dataset}(h5Obj, data, offsets, extents)
+}
+\arguments{
+  \item{h5Obj}{
+    The object 
+  }
+  \item{data}{
+    data is the data to be written.
+  }
+  \item{offsets}{
+    data is the data to be written.
+  }
+  \item{extents}{
+    data is the data to be written.
+  }
+}
+\section{Methods}{
+\describe{
+
+\item{\code{signature(h5Obj = "H5Dataset")}}{
+}
+}}
+\keyword{methods}

Modified: src/h5_wrap.c
===================================================================
--- src/h5_wrap.c	2011-09-15 17:39:00 UTC (rev 67)
+++ src/h5_wrap.c	2011-09-20 06:40:42 UTC (rev 68)
@@ -16,6 +16,8 @@
     hid_t id;
 } h5_holder;
 
+
+
 void h5R_finalizer(SEXP h5_obj) {
     h5_holder* h = (h5_holder*) R_ExternalPtrAddr(h5_obj);
     if (! h) {
@@ -43,21 +45,15 @@
 	    break;
 	}
     }
-    free(h);
+    Free(h);
     R_ClearExternalPtr(h5_obj);
 }
 
-SEXP h5R_flush(SEXP h5_file) {
-    H5Fflush(HID(h5_file), H5F_SCOPE_GLOBAL);
-    return SUCCESS;
-}
-
 SEXP _h5R_make_holder (hid_t id, int is_file) {
     if (id < 0) {
 	return R_NilValue;
     } 
-    /** Note the use of malloc/free here and above. **/
-    h5_holder* holder = (h5_holder*) malloc(sizeof(h5_holder));
+    h5_holder* holder = (h5_holder*) Calloc(1, h5_holder);
     holder->id = id;
     holder->is_file = is_file;
     SEXP e_ptr = R_MakeExternalPtr(holder, R_NilValue, R_NilValue); 
@@ -67,6 +63,11 @@
     return e_ptr;
 }
 
+SEXP h5R_flush(SEXP h5_file) {
+    H5Fflush(HID(h5_file), H5F_SCOPE_GLOBAL);
+    return SUCCESS;
+}
+
 SEXP h5R_open(SEXP filename, SEXP mode) {
     int _mode_ = (INTEGER(mode)[0] == 1) ? H5F_ACC_RDWR : H5F_ACC_RDONLY;
     return _h5R_make_holder(H5Fopen(NM(filename), _mode_, H5P_DEFAULT), 1);



More information about the H5r-commits mailing list