Skip to content

Commit 23681df

Browse files
committed
update vignette
1 parent 842e169 commit 23681df

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

R/HDF5DataFrame.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ cbind.HDF5DataFrame <- function(..., deparse.level=1) {
322322
if (!preserved) {
323323
for (i in seq_along(objects)) {
324324
obj <- objects[[i]]
325-
print(obj)
326325
if (methods::is(obj, "HDF5DataFrame")) {
327326
objects[[i]] <- .collapse_to_df(obj)
328327
}

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# HDF5DataFrame
22

3-
HDF5-backed DataFrame objects and methods.
3+
HDF5DataFrame is an R/Bioconductor package for HDF5-backed DataFrame objects
4+
and methods.
45

56
## Installation
67

vignettes/HDF5DataFrame.Rmd

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,24 @@ vignette: |
1313
%\VignetteEncoding{UTF-8}
1414
---
1515

16-
# Introduction
17-
18-
HDF5-backed DataFrame objects and methods.
19-
2016
```{r load-libs}
2117
library(rhdf5)
2218
library(HDF5Array)
2319
library(HDF5DataFrame)
2420
```
2521

22+
# Introduction
23+
24+
`r Biocpkg("HDF5DataFrame")` is an R/Bioconductor package for HDF5-backed
25+
DataFrame objects and methods. Each column of a data frame is stored
26+
as a separate one dimensional array in an HDF5 file.
27+
`r Biocpkg("HDF5DataFrame")` organizes these arrays and serves them
28+
as a `DataFrame`-like object.
29+
2630
# Installation
2731

2832
You can install `r Biocpkg("HDF5DataFrame")` from Bioconductor using
29-
**BiocManager**:
33+
`r CRANpkg("BiocManager")`:
3034

3135
```{r bioc, eval=FALSE}
3236
if (!requireNamespace("BiocManager", quietly = TRUE)) {
@@ -35,30 +39,19 @@ if (!requireNamespace("BiocManager", quietly = TRUE)) {
3539
BiocManager::install("HDF5DataFrame")
3640
```
3741

38-
Or you can install the development version of `r Biocpkg("HDF5DataFrame")`
39-
from GitHub like so:
40-
41-
```{r devtools, eval=FALSE}
42-
if (!require("devtools", quietly = TRUE))
43-
install.packages("devtools")
44-
devtools::install_github("BIMSBbioinfo/HDF5DataFrame")
45-
```
46-
4742
# Usage
4843

49-
The main usage of the HDF5DataFrame is to deliver DelayedArray
50-
operations for DataFrames
44+
We use `writeHDF5DataFrame` to write the a `data.frame` to an HDF5 file.
45+
You can also specify the HDF5 group (`name`) where columns of the data frame
46+
are stored.
5147

5248
```{r read}
53-
54-
# create h5 and a group for the hdf5 backed data frames
55-
output_h5ad <- tempfile(fileext = ".h5")
56-
5749
# data
5850
data("chickwts")
5951
metadata <- chickwts
6052
6153
# create HDF5DataFrame and write to hdf5
54+
output_h5ad <- tempfile(fileext = ".h5")
6255
metadata_hdf5 <- writeHDF5DataFrame(metadata,
6356
filepath = output_h5ad,
6457
name = "metadata",
@@ -70,12 +63,19 @@ metadata_hdf5
7063

7164
# Methods
7265

66+
You can use various `DataFrame` methods on `HDF5DataFrame` objects such as
67+
`cbind` where an in-memory `data.frame` can be combined with the `HDF5DataFrame`
68+
object.
69+
7370
```{r methods}
7471
# cbind with in memory data
7572
metadata_hdf5 <- cbind(metadata_hdf5, metadata)
7673
metadata_hdf5
7774
```
7875

76+
You can also realize the `HDF5DataFrame` object into an in-memory
77+
`data.frame` any time.
78+
7979
```{r methods2}
8080
# coerce to data.frame
8181
metadata_hdf5 <- as.data.frame(metadata_hdf5)

0 commit comments

Comments
 (0)