[H5r-commits] r58 - man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jul 22 18:34:03 CEST 2011


Author: malinka
Date: 2011-07-22 18:34:02 +0200 (Fri, 22 Jul 2011)
New Revision: 58

Added:
   man/H5DataFrame.Rd
   man/h5DatasetExists.Rd
   man/h5GroupExists.Rd
   man/h5ObjectExists.Rd
   man/listH5Attributes.Rd
Modified:
   man/deleteH5Attribute.Rd
   man/deleteH5Obj.Rd
   man/h5AttributeExists.Rd
Log:
added more help files to h5r...


Added: man/H5DataFrame.Rd
===================================================================
--- man/H5DataFrame.Rd	                        (rev 0)
+++ man/H5DataFrame.Rd	2011-07-22 16:34:02 UTC (rev 58)
@@ -0,0 +1,82 @@
+\name{H5DataFrame}
+\alias{H5DataFrame}
+\title{
+  Create an H5 Data Frame
+}
+\description{
+  'H5DataFrame' is a function that creates a list of equal-length
+  vectors. It stores H5 data tables.
+}
+\usage{
+H5DataFrame(file, nms = NA)
+}
+\arguments{
+  \item{file}{
+    
+}
+  \item{nms}{
+%%     ~~Describe \code{nms} here~~
+}
+}
+\details{
+%%  ~~ If necessary, more details than the description above ~~
+}
+\value{
+%%  ~Describe the value returned
+%%  If it is a LIST, use
+%%  \item{comp1 }{Description of 'comp1'}
+%%  \item{comp2 }{Description of 'comp2'}
+%% ...
+}
+\references{
+%% ~put references to the literature/web site here ~
+}
+\author{
+%%  ~~who you are~~
+}
+\note{
+%%  ~~further notes~~
+}
+
+%% ~Make other sections like Warning with \section{Warning }{....} ~
+
+\seealso{
+%% ~~objects to See Also as \code{\link{help}}, ~~~
+}
+\examples{
+   require(h5r)
+   h5 <- H5File("test.h5", 'w')
+   d1 <- createH5Dataset(h5,"one", c(1,7,5))
+   d2 <- createH5Dataset(h5,"two", c(6,4,8))
+   ...
+
+##---- Should be DIRECTLY executable !! ----
+##-- ==>  Define data, use random,
+##--	or do  help(data=index)  for the standard data sets.
+
+## The function is currently defined as
+function (file, nms = NA) 
+{
+    .getCols <- function(h5) {
+        nms <- names(listH5Contents(h5))
+        nms[nms != "."]
+    }
+    h5File <- H5File(file)
+    if (is.na(nms)) {
+        nms <- .getCols(h5File)
+    }
+    h5Datasets <- lapply(nms, function(nm) {
+        getH5Dataset(h5File, nm)
+    })
+    names(h5Datasets) <- nms
+    stopifnot(length(unique(sapply(h5Datasets, length))) == 1)
+    obj <- new("H5DataFrame")
+    obj at h5File <- h5File
+    obj at h5Datasets <- h5Datasets
+    return(obj)
+  }
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{ ~kwd1 }
+\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line

Modified: man/deleteH5Attribute.Rd
===================================================================
--- man/deleteH5Attribute.Rd	2011-07-20 23:55:29 UTC (rev 57)
+++ man/deleteH5Attribute.Rd	2011-07-22 16:34:02 UTC (rev 58)
@@ -1,6 +1,5 @@
 \name{deleteH5Attribute}
 \alias{deleteH5Attribute}
-\alias{createH5Attribute}
 \title{
   A Function that Deletes a Metadata Object which Describes the Primary
   Data Object

Modified: man/deleteH5Obj.Rd
===================================================================
--- man/deleteH5Obj.Rd	2011-07-20 23:55:29 UTC (rev 57)
+++ man/deleteH5Obj.Rd	2011-07-22 16:34:02 UTC (rev 58)
@@ -1,7 +1,7 @@
 \name{deleteH5Obj}
 \alias{deleteH5Obj}
 \title{
-  Delete H5Object
+  Delete Object
 }
 \description{
   'deleteH5Obj' is a function that removes the H5 Object. The H5 object,

Modified: man/h5AttributeExists.Rd
===================================================================
--- man/h5AttributeExists.Rd	2011-07-20 23:55:29 UTC (rev 57)
+++ man/h5AttributeExists.Rd	2011-07-22 16:34:02 UTC (rev 58)
@@ -1,61 +1,42 @@
 \name{h5AttributeExists}
 \alias{h5AttributeExists}
-%- Also NEED an '\alias' for EACH other topic documented here.
 \title{
-%%  ~~function to do ... ~~
+  Check whether an Attribute Exists 
 }
 \description{
-%%  ~~ A concise (1-5 lines) description of what the function does. ~~
+  'h5AttributeExists' is a function that searches for an attribute of the
+  specified name. The function returns a TRUE or FALSE
+  statement. 
 }
 \usage{
 h5AttributeExists(h5Obj, name)
 }
-%- maybe also 'usage' for other objects documented here.
 \arguments{
   \item{h5Obj}{
-%%     ~~Describe \code{h5Obj} here~~
+    H5 object in which the attribute is located.
 }
   \item{name}{
-%%     ~~Describe \code{name} here~~
+    Name of attribute.
 }
 }
-\details{
-%%  ~~ If necessary, more details than the description above ~~
-}
 \value{
-%%  ~Describe the value returned
-%%  If it is a LIST, use
-%%  \item{comp1 }{Description of 'comp1'}
-%%  \item{comp2 }{Description of 'comp2'}
-%% ...
+  The object returned is of type character.
 }
-\references{
-%% ~put references to the literature/web site here ~
-}
-\author{
-%%  ~~who you are~~
-}
-\note{
-%%  ~~further notes~~
-}
-
-%% ~Make other sections like Warning with \section{Warning }{....} ~
-
 \seealso{
-%% ~~objects to See Also as \code{\link{help}}, ~~~
+  \link{createH5Attribute}
 }
 \examples{
-##---- Should be DIRECTLY executable !! ----
-##-- ==>  Define data, use random,
-##--	or do  help(data=index)  for the standard data sets.
-
-## The function is currently defined as
-function (h5Obj, name) 
-{
-    .myCall("h5R_attribute_exists", .ePtr(h5Obj), name)
+  require(h5r)
+  h5 <- H5File("test.h5", 'w')
+  H5A <-createH5Attribute(h5,"a1",10:1, overwrite = TRUE)
+  if (h5AttributeExists(h5, "a1")) {
+    print("Exists!")
   }
+  f = function(attrName) h5AttributeExists(h5, attrName)
+  d = listH5Attributes(h5)
+  f(d[[1]])
+  sapply(d, f)
+
 }
-% Add one or more standard keywords, see file 'KEYWORDS' in the
-% R documentation directory.
-\keyword{ ~kwd1 }
-\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
+\keyword{attribute}
+

Added: man/h5DatasetExists.Rd
===================================================================
--- man/h5DatasetExists.Rd	                        (rev 0)
+++ man/h5DatasetExists.Rd	2011-07-22 16:34:02 UTC (rev 58)
@@ -0,0 +1,35 @@
+\name{h5DatasetExists}
+\alias{h5DatasetExists}
+\title{
+  Check whether a Dataset Exists
+}
+\description{
+  'h5DatasetExists' is a function that searches for a dataset of the
+  specified name. The function returns a TRUE or FALSE statement.
+}
+\usage{
+  h5DatasetExists(h5Obj, name)
+}
+\arguments{
+  \item{h5Obj}{
+    H5 object to which the dataset is attached.
+}
+  \item{name}{
+     Name of attribute.
+}
+}
+\value{
+  The object returned is of type character.
+}
+\seealso{
+  \link{createH5Dataset}
+}
+\examples{
+  require(h5r)
+  h5 <- H5File("test.h5", 'w')
+   a = c(rnorm(100), rnorm(102)) 
+  d1 <- createH5Dataset(h5, "new", a)
+  d.e <- h5DatasetExists(h5, "new")
+  d.e
+}
+\keyword{datasets}

Added: man/h5GroupExists.Rd
===================================================================
--- man/h5GroupExists.Rd	                        (rev 0)
+++ man/h5GroupExists.Rd	2011-07-22 16:34:02 UTC (rev 58)
@@ -0,0 +1,36 @@
+\name{h5GroupExists}
+\alias{h5GroupExists}
+\title{
+  Check whether a Group Exists
+}
+\description{
+  'h5GroupExists' is a function that searches for a group of the
+  specified name. The function returns a TRUE or FALSE
+  statement.
+}
+\usage{
+  h5GroupExists(h5Obj, name)
+}
+\arguments{
+  \item{h5Obj}{
+    The object to which the group is attached.
+}
+  \item{name}{
+    The name of the group.
+}
+}
+\value{
+  The object returned is of type character.
+}
+\seealso{
+  \link{createH5Group}
+}
+\examples{
+  library("h5r")
+  h5 <- H5File("test.H5",'w')
+  new <- createH5Group(h5, "grp101")
+  check <- h5GroupExists(h5,"grp101")
+  check
+}
+\keyword{datasets}
+

Added: man/h5ObjectExists.Rd
===================================================================
--- man/h5ObjectExists.Rd	                        (rev 0)
+++ man/h5ObjectExists.Rd	2011-07-22 16:34:02 UTC (rev 58)
@@ -0,0 +1,40 @@
+\name{h5ObjectExists}
+\alias{h5ObjectExists}
+\title{
+  Check whether an Object Exists
+}
+\description{
+  'h5ObjectExists' is a function that searches foran object of the
+  specified name. The function returns a TRUE or a FALSE statement.
+}
+\usage{
+  h5ObjectExists(h5Obj, name)
+}
+\arguments{
+  \item{h5Obj}{
+    H5 object in which the attribute is located.
+}
+  \item{name}{
+    Name of group.
+}
+}
+\value{
+  The object returned is of type character.
+}
+\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
+}
+\keyword{datasets}
+

Added: man/listH5Attributes.Rd
===================================================================
--- man/listH5Attributes.Rd	                        (rev 0)
+++ man/listH5Attributes.Rd	2011-07-22 16:34:02 UTC (rev 58)
@@ -0,0 +1,30 @@
+\name{listH5Attributes}
+\alias{listH5Attributes}
+\title{
+  Lists all H5 Attributes
+}
+\description{
+  'listH5Attributes' is a function that returns the names of all H5 attributes. 
+}
+\usage{
+  listH5Attributes(h5Obj)
+}
+\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')
+  createH5Attribute(h5, "attri", c("a","b","c","d"))
+  createH5Attribute(h5, "bute", as.integer(c(rnorm(1),rpois(1,5))))
+}
+\keyword{attribute}
+



More information about the H5r-commits mailing list