Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

file_string

Read a text file and concatenate the lines by '\n'


Description

The source code of this function should be self-explanatory.

Usage

file_string(file)

Arguments

file

Path to a text file (should be encoded in UTF-8).

Value

A character string of text lines concatenated by '\n'.

Examples

xfun::file_string(system.file("DESCRIPTION", package = "xfun"))

xfun

Miscellaneous Functions to Support Packages Maintained by 'Yihui Xie'

v0.22
MIT + file LICENSE
Authors
Yihui Xie [aut, cre, cph] (<https://orcid.org/0000-0003-0645-5666>), Wush Wu [ctb], Daijiang Li [ctb], Xianying Tan [ctb], Salim Brüggemann [ctb] (<https://orcid.org/0000-0002-5329-5987>), Christophe Dervieux [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.