[H5r-commits] r20 - / inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon May 3 20:01:03 CEST 2010


Author: extemporaneousb
Date: 2010-05-03 20:01:02 +0200 (Mon, 03 May 2010)
New Revision: 20

Removed:
   README
   inst/testSlab.R
   inst/tests.R
Modified:
   NEWS
Log:
Various file cleaning.

Modified: NEWS
===================================================================
--- NEWS	2010-05-03 17:57:02 UTC (rev 19)
+++ NEWS	2010-05-03 18:01:02 UTC (rev 20)
@@ -8,6 +8,8 @@
                 CHANGES IN h5r VERSION 1.0
 
 NEW FEATURES
+    o Added proper test harness.
+    o Added support for hyperslab selection.
     o Added support for string attributes and multi-dim string datasets.
     o Added support for 1-d attributes of type: String, Float, and Integer.
 

Deleted: README
===================================================================
--- README	2010-05-03 17:57:02 UTC (rev 19)
+++ README	2010-05-03 18:01:02 UTC (rev 20)
@@ -1,58 +0,0 @@
-			R-Forge SVN README
-
-
-(See "http://download.r-forge.r-project.org/manuals/R-Forge_Manual.pdf"
-       for detailed information on registering a new project.)
-
-1. Introduction
------------------------------------------------------------------------
-R is free software distributed under a GNU-style copyleft. R-Forge is
-a central platform for the development of R packages, R-related 
-software and further projects. Among many other web-based features it 
-provides facilities for collaborative source code management via 
-Subversion (SVN).
-
-2. The directory you're in
------------------------------------------------------------------------
-This is the repository of your project. It contains two important
-pre-defined directories namely 'pkg' and 'www'. These directories must 
-not be deleted otherwise R-Forge's core functionality will not be 
-available (i.e., daily checking and building of your package or the 
-project websites).
-'pkg' and 'www' are standardized and therefore are going to be
-described in this README. The rest of your repository can be used as
-you like.
-
-3. 'pkg' directory
------------------------------------------------------------------------
-To make use of the package building and checking feature the package 
-source code has to be put into the 'pkg' directory of your repository 
-(i.e., 'pkg/DESCRIPTION', 'pkg/R', 'pkg/man', etc.) or, alternatively,
-a subdirectory of 'pkg'. The latter structure allows for having more 
-than one package in a single project, e.g., if a project consists of 
-the packages foo and bar then the source code will be located in 
-'pkg/foo' and 'pkg/bar', respectively.
-
-R-Forge automatically examines the 'pkg' directory of every repository 
-and builds the package sources as well as the package binaries on a
-daily basis for Mac OSX and Windows (if applicable). The package builds
-are provided in the 'R Packages' tab for download or can be installed
-directly in R from a CRAN-style repository using 
-'install.packages("foo", repos="http://R-Forge.R-project.org")'. 
-Furthermore, in the 'R Packages' tab developers can examine logs 
-generated by the build and check process on different platforms.
-
-4. 'www' directory
------------------------------------------------------------------------
-Developers may present their work on a subdomain of R-Forge, e.g.,
-'http://foo.R-Forge.R-project.org', or via a link to an external
-website.
-
-This directory contains the project homepage which gets updated hourly
-on R-Forge, so please take into consideration that it will not be 
-available right after you commit your changes or additions. 
-
-5. Help
------------------------------------------------------------------------
-If you need help don't hesitate to contact us at R-Forge at R-project.org
-

Deleted: inst/testSlab.R
===================================================================
--- inst/testSlab.R	2010-05-03 17:57:02 UTC (rev 19)
+++ inst/testSlab.R	2010-05-03 18:01:02 UTC (rev 20)
@@ -1,71 +0,0 @@
-##
-## Used to test hyperslab reading.
-##
-require(h5r)
-
-files <- list.files("h5_files", full.names = TRUE)
-
-## ex_1
-f <- H5File(files[1])
-g <- getH5Group(f, "group_1")
-d <- getH5Dataset(g, "ds_6", inMemory = FALSE)
-d2 <- getH5Dataset(g, "ds_6", inMemory = TRUE)
-
-all(d[,] == d2[,])
-all(d[] == d2[])
-all(d[2:length(d)] == d2[2:length(d2)])
-
-timeMe <- function(d) {
-  k <- 1000
-  n <- 1000
-  system.time({
-    for (i in seq.int(1, n)) {
-      b <- runif(1, 1, nrow(d) - k)
-      length(readSlab(d, b, k))
-    }
-  })
-}
-timeMe(d)
-timeMe(d2)
-
-dM <- getH5Dataset(g, "ds_1", inMemory = FALSE)
-dMM <- getH5Dataset(g, "ds_1", inMemory = TRUE)
-
-all(dM[] == dMM[])
-all(dM[,] == dMM[,])
-all(dM[1:5, 1:5] == dMM[1:5, 1:5])
-all(dM[1:5, 2] == dMM[1:5, 2])
-
-length(dM[1:5, 2]) == length(dMM[1:5, 2])
-
-all(dim(dM[1:5, 2:3]) == dim(dMM[1:5, 2:3]))
-
-
-##
-## Three dimensional 
-##
-d3M <- getH5Dataset(g, "ds_3", inMemory = TRUE)
-d3 <- getH5Dataset(g, "ds_3", inMemory = FALSE)
-
-d3M[,,]
-d3[,,]
-
-d3[1,,]
-d3[1,1,1]
-d3[1,,]
-d3[,,1]
-
-
-dStr <- getH5Dataset(g, "ds_2", inMemory = FALSE)
-dStrM <- getH5Dataset(g, "ds_2", inMemory = TRUE)
-all(dStr[1:2] == dStrM[1:2])
-all(dStr[1:2] == dStrM[1:2])
-
-
-dStr <- getH5Dataset(g, "ds_4", inMemory = FALSE)
-dStrM <- getH5Dataset(g, "ds_4", inMemory = TRUE)
-all(dStr[1:2,] == dStrM[1:2,])
-all(dStr[,1:2] == dStrM[,1:2])
-
-x = replicate(1000000, dStr[,1:5])
-

Deleted: inst/tests.R
===================================================================
--- inst/tests.R	2010-05-03 17:57:02 UTC (rev 19)
+++ inst/tests.R	2010-05-03 18:01:02 UTC (rev 20)
@@ -1,87 +0,0 @@
-##
-## Used to test the examples in the h5_files directory.
-##
-require(h5r)
-
-files <- list.files("h5_files", full.names = TRUE)
-
-## ex_1
-f <- H5File(files[1])
-g <- getH5Group(f, "group_1")
-
-d <- getH5Dataset(g, "ds_1", inMemory = T)
-
-d[1:10, 1:10]
-d[1:10,]
-d[,1]
-
-## string dataset
-d2 <- getH5Dataset(g, "ds_2", inMemory = T)
-d2[1:10]
-
-## attributes
-dim(a <- getH5Attribute(d2, "x"))
-dim(b <- getH5Attribute(d2, "y"))
-dim(c <- getH5Attribute(d2, "z"))
-
-## > 2 dimensional data.
-d3 <- getH5Dataset(g, "ds_3", inMemory = T)
-all(dim(d3[,,]) == dim(d3))
-id3 <- d3 at .data$.data
-
-all(id3[,,] == d3[,,])
-all(id3[,1,,drop=TRUE] == d3[,1,,drop=TRUE])
-all(id3[1,1,,drop=TRUE] == d3[1,1,,drop=TRUE])
-all(id3[1,,3,drop=TRUE] == d3[1,,3,drop=TRUE])
-
-
-d3M <- getH5Dataset(g, "ds_3", inMemory = F)
-all(d3M[,,] == d3[,,])
-
-all(id3[,1,,drop=TRUE] == d3M[,1,,drop=TRUE])
-all(id3[3,1,,drop=TRUE] == d3M[3,1,,drop=TRUE])
-all(id3[,1,,drop=FALSE] == d3M[,1,,drop=FALSE])
-
-all(id3[,1,1,drop=TRUE] == d3M[,1,1,drop=TRUE])
-all(id3[,1,1:2] == d3M[,1,1:2])
-
-## 2 dimensional string dataset.
-d4 <- getH5Dataset(g, "ds_4", inMemory = T)
-d4[,]
-
-## instanteate a lot of objects, see if memory remains
-## fixed while making new objects.
-a <- replicate(100, {
-  x <- replicate(100, getH5Dataset(g, "ds_4"))[1,1]
-  b <- gc()[,1]
-  rm(x)
-  b - gc()[,1]
-})
-
-assertError <- function(expr) {
-  tryCatch({{expr}; FALSE}, simpleError = function(e) {
-    return(TRUE)
-  })
-}
-
-
-##
-## checks.
-##
-all(c(is.null(dim(d[1,10])),
-      all(dim(d[,]) == dim(d)),
-      is.null(dim(d2)),
-      length(d2) == 20,
-      is.null(dim(d2[1])),
-      is.null(dim(d2[1:4])),
-      is.null(dim(d3[1,1,1])),
-      all(dim(d3[,,]) == dim(d3)),
-      all(dim(d3[1,,]) == c(7,9)),
-      all(dim(d3[,,1]) == c(3,7)),
-      all(dim(d3[,1,]) == c(3,9)),
-      
-      ## should all be errors.
-      assertError(d2[1,1:4]),
-      assertError(d3[1]),
-      assertError(d3[1,])))
-



More information about the H5r-commits mailing list