Skip to contents

Sources specified lines within a single file

Usage

source_lines(file, lines, env = .GlobalEnv)

Arguments

file

= a connection object or a character string path to a file.

lines

= A vector of integers specifying the lines to be sourced.

env

the environment in which to source the lines

IMPORTANT !!!

sourcing this file is a mistake - may result in infinite recursion

Examples

if (FALSE) { # \dontrun{
source_lines(file = "PATH/filename",  ## any file name, or a Connection object
             lines = c(4, 5, 6) )     ## source lines 4-6
} # }