Skip to contents

Extract function line in file path

Usage

get_function_line(file_location)

Arguments

file_location

Character scalar specifying the path of a file.

Value

A numeric scalar

Examples

if (FALSE) { # \dontrun{
cleaned_function_line <- get_function_line(
 file_location = "tests/testthat/example_project/R/calculate_QALYs.R:L41"
)
cleaned_function_line <- get_function_line(
 file_location = c(
   "tests/testthat/example_project/R/calculate_QALYs.R#L41",
   "tests/testthat/example_project/R/calculate_QALYs.R#L49"
 )
)
} # }