emr_track.dbs returns all the databases which have a version of the track, while emr_track.current_db returns the database from which 'naryn' currently takes the track according to the override rules.

emr_track.dbs(track, dataframe = FALSE)

emr_track.current_db(track, dataframe = FALSE)

Arguments

track

one or more track names

dataframe

return a data frame with with columns called 'track' and 'db' instead of a vector of database ids.

Value

A named vector of db ids for each track. If dataframe is TRUE - returns a data frame with columns called 'track' and 'db' with the track and database ids (multiple rows per track in the case of emr_track.dbs).

See also

Examples


# both db1 and db2 have a track named 'categorical_track'
emr_db.init_examples(2)
emr_track.dbs("categorical_track")
#>                       categorical_track                       categorical_track 
#>          "/tmp/RtmpGXo75k/naryndb/test" "/tmp/RtmpGXo75k/naryndb2/naryndb/test" 
emr_track.dbs(emr_track.ls())
#>                       categorical_track                       categorical_track 
#>          "/tmp/RtmpGXo75k/naryndb/test" "/tmp/RtmpGXo75k/naryndb2/naryndb/test" 
#>                             dense_track                             dense_track 
#>          "/tmp/RtmpGXo75k/naryndb/test" "/tmp/RtmpGXo75k/naryndb2/naryndb/test" 
#>                           logical_track                            patients.dob 
#>          "/tmp/RtmpGXo75k/naryndb/test"          "/tmp/RtmpGXo75k/naryndb/test" 
#>                            sparse_track                            sparse_track 
#>          "/tmp/RtmpGXo75k/naryndb/test" "/tmp/RtmpGXo75k/naryndb2/naryndb/test" 

emr_track.current_db("categorical_track")
#>                       categorical_track 
#> "/tmp/RtmpGXo75k/naryndb2/naryndb/test" 
emr_track.current_db(emr_track.ls())
#>                       categorical_track                             dense_track 
#> "/tmp/RtmpGXo75k/naryndb2/naryndb/test" "/tmp/RtmpGXo75k/naryndb2/naryndb/test" 
#>                           logical_track                            patients.dob 
#>          "/tmp/RtmpGXo75k/naryndb/test"          "/tmp/RtmpGXo75k/naryndb/test" 
#>                            sparse_track 
#> "/tmp/RtmpGXo75k/naryndb2/naryndb/test"