This alternative is from https://gist.github.com/hadley/6353939

readLinesRcpp(path)

path | Path to text file to read. |
---|

Similar to `readLines`

. It may not return identical results.

readLinesRcpp(system.file(package = "reproducible", "DESCRIPTION"))#> [1] "Package: reproducible" #> [2] "Type: Package" #> [3] "Title: A Set of Tools that Enhance Reproducibility Beyond Package Management" #> [4] "Description: Collection of high-level, robust, machine- and OS-independent tools" #> [5] " for making deeply reproducible and reusable content in R." #> [6] " This includes light weight package management (similar to 'packrat' and" #> [7] " 'checkpoint', but more flexible, lightweight and simpler than both), tools" #> [8] " for caching, downloading and verifying or writing checksums, post-processing " #> [9] " of common spatial datasets, and accessing GitHub repositories. " #> [10] " Some features are still under active development." #> [11] "URL: " #> [12] " http://reproducible.predictiveecology.org," #> [13] " https://github.com/PredictiveEcology/reproducible" #> [14] "Date: 2018-08-05" #> [15] "Version: 0.2.3" #> [16] "Authors@R: c(" #> [17] " person(\"Eliot J B\", \"McIntire\", email = \"eliot.mcintire@canada.ca\"," #> [18] " role = c(\"aut\", \"cre\"))," #> [19] " person(\"Alex M\", \"Chubaty\", email = \"alex.chubaty@gmail.com\"," #> [20] " role = c(\"aut\"))," #> [21] " person(\"Her Majesty the Queen in Right of Canada, as represented by the Minister of Natural Resources Canada\"," #> [22] " role = \"cph\")" #> [23] " )" #> [24] "Depends:" #> [25] " R (>= 3.3.0)" #> [26] "Imports:" #> [27] " archivist (>= 2.1.2)," #> [28] " backports," #> [29] " crayon," #> [30] " data.table (>= 1.10.4)," #> [31] " devtools," #> [32] " digest," #> [33] " dplyr," #> [34] " fastdigest," #> [35] " fasterize," #> [36] " gdalUtils," #> [37] " git2r (>= 0.18)," #> [38] " googledrive," #> [39] " httr," #> [40] " magrittr," #> [41] " memoise," #> [42] " methods," #> [43] " raster," #> [44] " Rcpp (>= 0.12.13)," #> [45] " RCurl (>= 1.95-4.8)," #> [46] " R.utils," #> [47] " rgdal," #> [48] " rgeos," #> [49] " quickPlot," #> [50] " sf," #> [51] " sp," #> [52] " tools," #> [53] " utils," #> [54] " versions" #> [55] "Suggests:" #> [56] " covr," #> [57] " future," #> [58] " knitr," #> [59] " rmarkdown," #> [60] " testthat," #> [61] " TimeWarp" #> [62] "Encoding: UTF-8" #> [63] "Language: en-CA" #> [64] "LinkingTo: Rcpp" #> [65] "License: GPL-3" #> [66] "VignetteBuilder: knitr, rmarkdown" #> [67] "BugReports: https://github.com/PredictiveEcology/reproducible/issues" #> [68] "ByteCompile: yes" #> [69] "RoxygenNote: 6.1.0" #> [70] "Collate: " #> [71] " 'RcppExports.R'" #> [72] " 'cache-helpers.R'" #> [73] " 'cache-tools.R'" #> [74] " 'robustDigest.R'" #> [75] " 'cache.R'" #> [76] " 'checksums.R'" #> [77] " 'consistentPaths.R'" #> [78] " 'convertPaths.R'" #> [79] " 'download.R'" #> [80] " 'gis.R'" #> [81] " 'git.R'" #> [82] " 'helpers.R'" #> [83] " 'objectSize.R'" #> [84] " 'packages.R'" #> [85] " 'pipe.R'" #> [86] " 'postProcess.R'" #> [87] " 'preProcess.R'" #> [88] " 'prepInputs.R'" #> [89] " 'reproducible-package.R'" #> [90] " 'search.R'" #> [91] " 'zzz.R'"