HDF5WriteAttribute: Write HDF5 attribute

Description Usage Arguments Note Author(s) See Also Examples

Description

Write an attribute to HDF5 file.

Usage

1

Arguments

filename

HDF5 file name in full path

path

the full path of the attribute within the HDF5 file

data

attribute data to be written

overwrite logical value to indicate if an existing attribute will get overwritten
compresslevel integer value (0-9) to indicate data compression level.
Higher compression results in longer time. Default(0)

Note

None at this time

Author(s)

Wilson Lau

See Also

HDF5Summary HDF5ReadData HDF5WriteData HDF5ReadAttribute

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 
 # write an attribute named "dsAtt" within a group "dsGrp" 
 data <- array(1:10,dim=10) 
 HDF5WriteAttribute("./Kidneycortex_Female_W10.h5","/dsGrp/dsAtt",data)

 # write an attribute named "attInt" of a dataset "dsInt" within a group "dsGrp"  
 data <- array(1:2,dim=2) 
 HDF5WriteAttribute("./Kidneycortex_Female_W10.h5","/dsGrp/dsInt/dsAtt", data)

 # overwrite the same attribute named "attInt" of a dataset "dsInt" within a group "dsGrp"  
 data <- array(1:12,dim=12) 
 HDF5WriteAttribute("./Kidneycortex_Female_W10.h5","/dsGrp/dsInt/dsAtt", data, options=list(overwrite="true"))

Sage-Bionetworks/rHDF5 documentation built on May 9, 2019, 12:13 p.m.