Learn R Programming

highlight (version 0.2-5)

getStyleFile: get a style file

Description

This function retrieves the path of a style file by looking in various places of the system

Usage

getStyleFile(name = "default", extension = "css")

Arguments

name
name of the stylesheet, without extension
extension
extension of the stylesheet (e.g. css)

Value

  • The first file found is returned. If no file is found, the function returns NULL.

Details

The function looks for a file called name.extension in the following places: the current working directory (see getwd), the user directory used by highlight (~/.R/highlight), the stylesheet directory of the installed package.

Examples

Run this code
getwd()
file.path(Sys.getenv("HOME"), ".R", "highlight" )
system.file("stylesheet", package = "highlight")

Run the code above in your browser using DataLab