get_bids_entity {bidsr} | R Documentation |
Get 'BIDS' entity values from file
Description
Get 'BIDS' entity values from file
Usage
get_bids_entity(x, key, value_only = TRUE, ifnotfound = NULL)
get_bids_entity_rules(x)
Arguments
x |
'BIDS' file path or parsed object; see 'Examples' |
key |
entity key |
value_only |
whether to return the value only; default is true; set
to |
ifnotfound |
default value to return is the entity is missing |
Value
'BIDS' entity value or object, depending on value_only
Author(s)
Zhengjia Wang
Examples
# Quick usage
get_bids_entity("ieeg/sub-YAB_ses-01_task-AV_ieeg.mat", "sub")
get_bids_entity_rules("ieeg/sub-YAB_ses-01_task-AV_channels.tsv")
# Full usage
parsed <- parse_path_bids_entity(
path = "ieeg/sub-YAB_ses-01_task-AV_channels.tsv")
parsed$get_bids_entity("sub")
parsed$get_bids_entity_rules()
parsed$description
parsed$entities
[Package bidsr version 0.1.0 Index]