This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Source specific lines in an R file | |
#' | |
#' @param file character string with the path to the file to source. | |
#' @param lines numeric vector of lines to source in \code{file}. | |
source_lines <- function(file, lines){ | |
source(textConnection(readLines(file)[lines])) | |
} |