From 47ebd9c99ce685f59a0b021f20a4e36b02fa69bc Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 10 Oct 2024 14:41:30 +0200 Subject: [PATCH] lintr --- R/select_nse.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/select_nse.R b/R/select_nse.R index 63b9a548d..adfc22ae2 100644 --- a/R/select_nse.R +++ b/R/select_nse.R @@ -162,10 +162,10 @@ .warn_not_found(colon_vars, columns, colon_match, verbose) matches <- NA } else { - start <- match(colon_vars[1], columns) - end <- match(colon_vars[2], columns) - if (!is.na(start) && !is.na(end)) { - matches <- start:end + start_pos <- match(colon_vars[1], columns) + end_pos <- match(colon_vars[2], columns) + if (!is.na(start_pos) && !is.na(end_pos)) { + matches <- start_pos:end_pos } else { matches <- NA }