From 3f4ed614a27070d6d5e0d7c5a28e3c6120779b57 Mon Sep 17 00:00:00 2001 From: Thomas Hackl Date: Tue, 30 Nov 2021 11:39:11 +0100 Subject: [PATCH] make track_type accept unquoted and positional track_ids --- R/tracks.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/tracks.R b/R/tracks.R index aba9859a..bc723454 100644 --- a/R/tracks.R +++ b/R/tracks.R @@ -36,7 +36,7 @@ track_info.gggenomes <- function(x, ...){ #' @export track_info.gggenomes_layout <- function(x, track_type = c("seqs", "feats", "links")){ - track_type <- match.arg(track_type, several.ok = TRUE) + track_type <- match_arg(track_type, several.ok = TRUE) y <- tibble( id = track_ids(x, track_type), type = track_types(x, track_type), @@ -68,6 +68,7 @@ track_nrows <- function(x, track_type = c("seqs", "feats", "links")){ #' @return a character string with the track type track_type <- function(x, track_id){ track_ids <- track_ids(x) + track_id <- vars_track(x, {{track_id}}) names(track_ids)[track_ids == track_id] }