Creates a NWBHDF5IO
file container
Creates a NWBHDF5IO
file container
Value
Nothing
Nothing
'NWBFile'
container
Whatever results generated by expr
Active bindings
opened
Whether the container is opened.
Methods
Method new()
Initialize the class
Usage
NWBHDF5IO$new(path = NULL, mode = c("r", "w", "r+", "a", "w-", "x"), ...)
Arguments
path
Path to a '.nwb'
file
mode
Mode for opening the file
...
Other parameters passed to nwb$NWBHDF5IO
Close the connections (low-level method, see 'with' method below)
Usage
NWBHDF5IO$close(close_links = TRUE)
Arguments
close_links
Whether to close all files linked to from this
file; default is true
Method close_linked_files()
Close all opened, linked-to files. 'MacOS'
and 'Linux'
automatically release the linked-to file after the linking file is
closed, but 'Windows'
does not, which prevents the linked-to
file from being deleted or truncated. Use this method to close all
opened, linked-to files.
Usage
NWBHDF5IO$close_linked_files()
Method read()
Read the 'NWB'
file from the 'IO' source. Please use along with
'$with'
method
Safe wrapper for reading and handling 'NWB'
file. See class examples.
Usage
NWBHDF5IO$with(expr, quoted = FALSE, envir = parent.frame())
Arguments
expr
R expression to evaluate
quoted
Whether expr
is quoted; default is false
envir
environment for expr
to evaluate; default is the
parent frame (see parent.frame
)
Examples
if (FALSE) {
# Running this example requires a .nwb file
library(rnwb)
container <- NWBHDF5IO$new(path = file)
container$with({
data <- container$read()
electrode_table <- data$electrodes[convert = TRUE]
})
print(electrode_table)
}