File: H5File-class.Rd

package info (click to toggle)
r-cran-hdf5r 1.3.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,192 kB
  • sloc: ansic: 76,883; sh: 82; python: 32; makefile: 13
file content (512 lines) | stat: -rw-r--r-- 23,276 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/R6Classes_H5File.R
\docType{class}
\name{H5File-class}
\alias{H5File-class}
\alias{H5File}
\title{Class for interacting with HDF5 files.}
\value{
Object of class \code{\link{H5File}}.
}
\description{
\code{H5File} objects are are the main entry point to access HDF5 data from binary 
files. This class represents an open HDF5 File-id. It inherits all functions 
of the \code{\link{H5RefClass}}.
}
\details{
HDF5 files can be opened or generated using the \code{H5File$new()} function and
a specified file access mode. \code{H5File$new()} returns a \code{H5File} object
which can be used to access \code{\link{H5Group}}s and Datasets (see \code{\link{H5D}})
using subsetting parameters or according class methods.

HDF5 files which have been created or opened through \code{H5File$new()} need 
to be closed afterwards using \code{$close_all()}. \code{$close_all()} not only closes the file itself,
but also all objects that are still open inside it (such as groups or datasets). \code{$flush()} can be used 
to flush unwritten data to an HDF5 file.

HDF5 Files typically contain the following objects:
\describe{
  \item{Groups}{Similar to a file system folder, used to organize HDF5 objects in a hierarchical way, see also \code{\link{H5Group}}}
  \item{Datasets}{Objects to store actual data, see also \code{\link{H5D}}}
  \item{Attributes}{Meta data objects to store extra information about Files, Groups and Datasets, see also \code{\link{H5A}}}
}
}
\section{Methods}{

\describe{
\item{\code{new(filename = NULL, mode = c("a", "r", "r+", "w", "w-", "x"),
  file_create_pl = h5const$H5P_DEFAULT,
  file_access_pl = h5const$H5P_DEFAULT, id = NULL)}}{

Opens or creates a new HDF5 File

\strong{Parameters}
\describe{
\item{filename}{Name of the file}
\item{mode}{How to open it. \code{a} creates a new file or opens an existing one for read/write. \code{r} opens an
existing file for reading, \code{r+} opens an existing file for read/write. \code{w} creates a file, truncating any
existing ones and \code{w-}/\code{x} are synonyms, creating a file and failing if it already exists.}
}}

\item{\code{get_obj_count(types = h5const$H5F_OBJ_ALL)}}{

This function implements the HDF5-API function H5Fget_obj_count.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5F_GET_OBJ_COUNT} for details.}

\item{\code{get_obj_ids(types = h5const$H5F_OBJ_ALL)}}{

This function implements the HDF5-API function H5Fget_obj_ids.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5F_GET_OBJ_IDS} for details.}

\item{\code{get_filesize()}}{

This function implements the HDF5-API function H5Fget_filesize.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5F_GET_FILESIZE} for details.}

\item{\code{file_info()}}{

This function implements the HDF5-API function H5Fget_info2.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5F_GET_INFO2} for details.
Please note that the returned information differs if HDF5 Version 1.8.16 or HDF5 Version >= 1.10.0 is being used}

\item{\code{get_intent()}}{

This function implements the HDF5-API function H5Fget_intent.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5F_GET_INTENT} for details.}

\item{\code{close_all(close_self = TRUE)}}{

Closes the file, flushes it and also closes all open objects that are still open in it. This is the recommended way of
closing any file. If not all objects in a file are closed, the file remains open and cannot be re-opened the regular way.}

\item{\code{print(..., max.attributes = 10, max.listing = 10)}}{

Prints information for the file

\strong{Parameters}
\describe{
\item{max.attributes}{Maximum number of attribute names to print}
\item{max.listing}{Maximum number of ls-items to print}
\item{...}{ignored}
}}

\item{\code{open(name, link_access_pl = h5const$H5P_DEFAULT,
  dataset_access_pl = h5const$H5P_DEFAULT,
  type_access_pl = h5const$H5P_DEFAULT)}}{

Opens groups, datasets or types using the appropriate HDF5-API functions. Please see the documentation at
\url{https://portal.hdfgroup.org/display/HDF5/H5D_OPEN} for datasets, 
\url{https://portal.hdfgroup.org/display/HDF5/H5O_OPEN} for types and 
\url{https://portal.hdfgroup.org/display/HDF5/H5O_OPEN} for general objects.}

\item{\code{open_by_idx(n, group_name = ".",
  index_type = h5const$H5_INDEX_NAME,
  order = h5const$H5_ITER_NATIVE,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Oopen_by_idx.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5O_OPEN_BY_IDX} for details.}

\item{\code{ls(recursive = FALSE, detailed = FALSE,
  index_type = h5const$H5_INDEX_NAME,
  order = h5const$H5_ITER_NATIVE,
  link_access_pl = h5const$H5P_DEFAULT,
  dataset_access_pl = h5const$H5P_DEFAULT,
  type_access_pl = h5const$H5P_DEFAULT)}}{

Returns the contents of a file or group as a data.frame.}

\item{\code{exists(name, link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Lexists.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_EXISTS} for details.}

\item{\code{path_valid(path, check_object_valid = TRUE)}}{

This function implements the HDF5-API function H5LTpath_valid.
Please see the documentation at \url{https://support.hdfgroup.org/HDF5/doc/HL/RM_H5LT.html#H5LTpath_valid} for details.}

\item{\code{link(obj, new_link_name, link_create_pl = h5const$H5P_DEFAULT,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Olink.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5O_LINK} for details.}

\item{\code{obj_copy_to(dst_loc, dst_name, src_name,
  object_copy_pl = h5const$H5P_DEFAULT,
  link_create_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Ocopy.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5O_COPY} for details.}

\item{\code{obj_copy_from(src_loc, src_name, dst_name,
  object_copy_pl = h5const$H5P_DEFAULT,
  link_create_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Ocopy.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5O_COPY} for details.}

\item{\code{obj_info_by_idx(n, group_name = ".",
  index_field = h5const$H5_INDEX_NAME,
  order = h5const$H5_ITER_NATIVE, remove_internal_use_only = TRUE)}}{

This function implements the HDF5-API function H5Oget_info_by_idx.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5O_GET_INFO_BY_IDX} for details.}

\item{\code{obj_info_by_name(object_name, remove_internal_use_only = TRUE)}}{

This function implements the HDF5-API function H5Oget_info_by_name.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5O_GET_INFO_BY_NAME} for details.}

\item{\code{group_info()}}{

This function implements the HDF5-API function H5Gget_info.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5G_GET_INFO} for details.}

\item{\code{group_info_by_name(name, link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Gget_info_by_name.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5G_GET_INFO_BY_NAME} for details.}

\item{\code{group_info_by_idx(n, group_name = ".",
  index_field = h5const$H5_INDEX_NAME,
  order = h5const$H5_ITER_NATIVE,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Gget_info_by_idx.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5G_GET_INFO_BY_IDX} for details.}

\item{\code{create_group(name, link_create_pl = h5const$H5P_DEFAULT,
  group_create_pl = h5const$H5P_DEFAULT,
  group_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Gcreate2 and H5Gcreate_anon (if name is NULL). Please see the documentation at
\url{https://portal.hdfgroup.org/display/HDF5/H5G_CREATE2} for regular groups and
\url{https://portal.hdfgroup.org/display/HDF5/H5G_CREATE_ANON} for anonymous groups for details.}

\item{\code{create_dataset(name, robj = NULL, dtype = NULL, space = NULL,
  dims = NULL, chunk_dims = "auto", gzip_level = 4,
  link_create_pl = h5const$H5P_DEFAULT,
  dataset_create_pl = h5const$H5P_DEFAULT,
  dataset_access_pl = h5const$H5P_DEFAULT)}}{

This function is the main interface to create a new dataset. Its parameters allow for customization of the default
behavior, i.e. in order to get a specific datatype, a certain chunk size or dataset dimensionality.
Also note that this function implements the HDF5-API function H5Dcreate2 and H5Dcreate_anon (if name is NULL). Please see the documentation at
\url{https://portal.hdfgroup.org/display/HDF5/H5D_CREATE2} for regular groups and
\url{https://portal.hdfgroup.org/display/HDF5/H5D_CREATE_ANON} for anonymous groups for details.

\strong{Parameters}
\describe{
\item{name}{The name of the new dataset. If missing, an anonymous dataset is created}
\item{robj}{An R-object to take as a template for creating the dataset. Either \code{robj} or both \code{dtype} and {space}
have to be provided}
\item{dtype}{The datatype to use for the creation of the object. Can be null if \code{robj} is given.}
\item{space}{The space to use for the object creation. Can be null if \code{robj} is given. Otherwise an object of type \code{H5S} which specifies the dimensions of the dataset.}
\item{dims}{Dimension of the new dataset; used if \code{space} is \code{NULL}. overwrite the dimension guessed from \code{robj}
if \code{robj} is given.}
\item{chunk_dims}{Size of the chunk. Has to have the same length as the dataset dimension. If \code{"auto"}
then the size of each chunk is estimated so that each chunk is roughly as large in bytes as the value in
the \code{hdf5r.chunk_size} option. See also \code{\link{guess_chunks}} for a more detailed explanation.
If set to \code{NULL}, then no chunking is used, unless explicitly set in \code{dataset_create_pl}.}
\item{gzip_level}{Only if \code{chunk_dims} is not null. If given, then the \code{dataset_create_pl} is set to enable zipping
at the level given here. If set to NULL, then gzip is not set (but could be set otherwise in \code{dataset_create_pl}}
\item{link_create_pl}{Link creation property list. See \code{\link{H5P_LINK_CREATE}}}
\item{dataset_create_pl}{Dataset creation property list. See \code{\link{H5P_DATASET_CREATE}}}
\item{dataset_access_pl}{Dataset access property list. See \code{\link{H5P_DATASET_ACCESS}}}
}}

\item{\code{commit(name, dtype, link_create_pl = h5const$H5P_DEFAULT,
  type_create_pl = h5const$H5P_DEFAULT,
  type_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Tcommit2.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5T_COMMIT2} for details.}

\item{\code{link_create_hard(obj_loc, obj_name, link_name,
  link_create_pl = h5const$H5P_DEFAULT,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Lcreate_hard.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_CREATE_HARD} for details.}

\item{\code{link_create_soft(target_path, link_name,
  link_create_pl = h5const$H5P_DEFAULT,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Lcreate_soft.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_CREATE_SOFT} for details.}

\item{\code{link_create_external(target_filename, target_obj_name, link_name,
  link_create_pl = h5const$H5P_DEFAULT,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Lcreate_external.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_CREATE_EXTERNAL} for details.}

\item{\code{link_exists(name, link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Lexists.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_EXISTS} for details.}

\item{\code{link_move_from(src_loc, src_name, dst_name,
  link_create_pl = h5const$H5P_DEFAULT,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Lmove.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_MOVE} for details.}

\item{\code{link_move_to(dst_loc, dst_name, src_name,
  link_create_pl = h5const$H5P_DEFAULT,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Lmove.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_MOVE} for details.}

\item{\code{link_copy_from(src_loc, src_name, dst_name,
  link_create_pl = h5const$H5P_DEFAULT,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Lcopy.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_COPY} for details.}

\item{\code{link_copy_to(dst_loc, dst_name, src_name,
  link_create_pl = h5const$H5P_DEFAULT,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Lcopy.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_COPY} for details.}

\item{\code{link_delete(name, link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Ldelete.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_DELETE} for details.}

\item{\code{link_delete_by_idx(n, group_name = ".",
  index_field = h5const$H5_INDEX_NAME,
  order = h5const$H5_ITER_NATIVE,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Ldelete_by_idx.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_DELETE_BY_IDX} for details.}

\item{\code{link_info(name, link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Lget_info.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_GET_INFO} for details.}

\item{\code{link_info_by_idx(n, group_name = ".",
  index_field = h5const$H5_INDEX_NAME,
  order = h5const$H5_ITER_NATIVE,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Lget_info_by_idx.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_GET_INFO_BY_IDX} for details.}

\item{\code{link_value(name, link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Lget_val.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_GET_VAL} for details.}

\item{\code{link_value_by_idx(n, group_name = ".",
  index_field = h5const$H5_INDEX_NAME,
  order = h5const$H5_ITER_NATIVE,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Lget_val_by_idx.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_GET_VAL_BY_IDX} for details.}

\item{\code{link_name_by_idx(n, group_name, idx_type = h5const$H5_INDEX_NAME,
  order = h5const$H5_ITER_NATIVE,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Lget_name_by_idx.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5L_GET_NAME_BY_IDX} for details.}

\item{\code{mount(name, child)}}{

This function implements the HDF5-API function H5Fmount.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5F_MOUNT} for details.}

\item{\code{unmount(name)}}{

This function implements the HDF5-API function H5Funmount.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5F_UNMOUNT} for details.}

\item{\code{create_reference(name = ".", space = NULL)}}{

This function implements the HDF5-API function H5Rcreate. If \code{space=NULL} then a \code{H5R_OBJECT} reference
is created, otherwise a \code{H5R_DATASET_REGION} reference
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5R_CREATE} for details.}

\item{\code{obj_info(remove_internal_use_only = TRUE)}}{

This function implements the HDF5-API function H5Oget_info.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5O_GET_INFO} for details.}

\item{\code{get_obj_name()}}{

This function implements the HDF5-API function H5Iget_name.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5I_GET_NAME} for details.}

\item{\code{create_attr(attr_name, robj = NULL, dtype = NULL, space = NULL)}}{

This function implements the HDF5-API function H5Acreate2.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5A_CREATE2} for details.}

\item{\code{attr_open(attr_name)}}{

This function implements the HDF5-API function H5Aopen.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5A_OPEN} for details.}

\item{\code{create_attr_by_name(attr_name, obj_name, robj = NULL,
  dtype = NULL, space = NULL,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Acreate_by_name.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5A_CREATE_BY_NAME} for details.}

\item{\code{attr_open_by_name(attr_name, obj_name,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Aopen_by_name.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5A_OPEN_BY_NAME} for details.}

\item{\code{attr_open_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME,
  order = h5const$H5_ITER_NATIVE,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Aopen_by_idx.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5A_OPEN_BY_IDX} for details.}

\item{\code{attr_exists_by_name(attr_name, obj_name,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Aexists_by_name.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5A_EXISTS_BY_NAME} for details.}

\item{\code{attr_exists(attr_name)}}{

This function implements the HDF5-API function H5Aexists.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5A_EXISTS} for details.}

\item{\code{attr_rename_by_name(old_attr_name, new_attr_name, obj_name,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Arename_by_name.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5A_RENAME_BY_NAME} for details.}

\item{\code{attr_rename(old_attr_name, new_attr_name)}}{

This function implements the HDF5-API function H5Arename.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5A_RENAME} for details.}

\item{\code{attr_delete(attr_name)}}{

This function implements the HDF5-API function H5Adelete.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5A_DELETE} for details.}

\item{\code{attr_delete_by_name(attr_name, obj_name,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Adelete_by_name.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5A_DELETE_BY_NAME} for details.}

\item{\code{attr_delete_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME,
  order = h5const$H5_ITER_NATIVE,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Adelete_by_idx.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5A_DELETE_BY_IDX} for details.}

\item{\code{attr_info_by_name(attr_name, obj_name,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Aget_info_by_name.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5A_GET_INFO_BY_NAME} for details.}

\item{\code{attr_info_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME,
  order = h5const$H5_ITER_NATIVE,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Aget_info_by_idx.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5A_GET_INFO_BY_IDX} for details.}

\item{\code{attr_name_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME,
  order = h5const$H5_ITER_NATIVE,
  link_access_pl = h5const$H5P_DEFAULT)}}{

This function implements the HDF5-API function H5Aget_name_by_idx.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5A_GET_NAME_BY_IDX} for details.}

\item{\code{attr_get_number()}}{

This function implements the HDF5-API function H5Aget_num_attrs.
Please see the documentation at \url{https://support.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-NumAttrs} for details.}

\item{\code{flush(scope = h5const$H5F_SCOPE_GLOBAL)}}{

This function implements the HDF5-API function H5Fflush.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5F_FLUSH} for details.}

\item{\code{get_filename()}}{

This function implements the HDF5-API function H5Fget_name.
Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5F_GET_NAME} for details.}

\item{\code{names(link_access_pl = h5const$H5P_DEFAULT)}}{

Returns the names of the items in the group or at the root of the file

\strong{Parameters}
\describe{
\item{link_access_pl}{The link-access property list. See \url{https://portal.hdfgroup.org/display/HDF5/Link+Access+Properties} for more detail.}
}}
}}

\section{Extract/List File Contents}{

The following functions are defined to extract HDF5 file contents:
\describe{
  \item{\code{\link{list.groups}}}{List HDF5 groups in file.}
  \item{\code{\link{list.datasets}}}{List HDF5 datasets in file.}
  \item{\code{\link{names}}}{List all items in a file or group (applicable for \code{\link{H5File}} and \code{\link{H5Group}})}
  \item{\code{\link{list.attributes}}}{List Attributes of HDF5 object (file, group or dataset).}
  \item{\code{\link{h5attr_names}}}{Attribute names of an HDF5 object; similar to list.attributes}
}
}

\examples{
# The following examples generates a HDF5 file with the different HDF5 
# Objects and shows its contents:
fname <- tempfile(fileext = ".h5")
file <- H5File$new(fname, mode = "a")
file[["testdataset"]] <- 1:10
h5attr(file, "testattrib") <- LETTERS[1:10]
file$create_group("testgroup")
file[["testgroup/testdataset2"]] <- 1:10
# Show contents of file
file
# Close file and delete
file$close_all()

# The following example shows hdf5 file contents and how to use them to iterate over HDF5 elements:
file <- h5file(fname, mode = "a")
sapply(c("testgroup1", "testgroup2", "testgroup3"), file$create_group)
file[["testgroup1/testset1"]] <- 1:10
file[["testgroup2/testset2"]] <- 11:20
file[["testgroup3/testset3"]] <- 21:30

# Extract first 3 elements from each dataset and combine result to matrix
sapply(list.datasets(file, recursive = TRUE), function(x) file[[x]][1:3])
# Close file
file$close_all()
file.remove(fname)

}
\seealso{
\code{\link{h5file}}
}
\author{
Holger Hoefling, Mario Annau
}