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-06-15" #> [15] "Version: 0.2.0" #> [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] " crayon," #> [29] " data.table (>= 1.10.4)," #> [30] " devtools," #> [31] " digest," #> [32] " dplyr," #> [33] " fastdigest," #> [34] " fasterize," #> [35] " gdalUtils," #> [36] " git2r (>= 0.18)," #> [37] " googledrive," #> [38] " httr," #> [39] " magrittr," #> [40] " memoise," #> [41] " methods," #> [42] " raster," #> [43] " Rcpp (>= 0.12.13)," #> [44] " RCurl (>= 1.95-4.8)," #> [45] " R.utils," #> [46] " rgdal," #> [47] " rgeos," #> [48] " quickPlot," #> [49] " sf," #> [50] " sp," #> [51] " tools," #> [52] " utils," #> [53] " versions" #> [54] "Suggests:" #> [55] " covr," #> [56] " knitr," #> [57] " rmarkdown," #> [58] " testthat," #> [59] " TimeWarp" #> [60] "Language: en-CA" #> [61] "LinkingTo: Rcpp" #> [62] "License: GPL-3" #> [63] "VignetteBuilder: knitr, rmarkdown" #> [64] "BugReports: https://github.com/PredictiveEcology/reproducible/issues" #> [65] "ByteCompile: yes" #> [66] "RoxygenNote: 6.0.1" #> [67] "Collate: " #> [68] " 'RcppExports.R'" #> [69] " 'cache-helpers.R'" #> [70] " 'cache-tools.R'" #> [71] " 'robustDigest.R'" #> [72] " 'cache.R'" #> [73] " 'checksums.R'" #> [74] " 'consistentPaths.R'" #> [75] " 'download.R'" #> [76] " 'gis.R'" #> [77] " 'git.R'" #> [78] " 'helpers.R'" #> [79] " 'objectSize.R'" #> [80] " 'packages.R'" #> [81] " 'pipe.R'" #> [82] " 'postProcess.R'" #> [83] " 'preProcess.R'" #> [84] " 'prepInputs.R'" #> [85] " 'reproducible-package.R'" #> [86] " 'search.R'" #> [87] " 'zzz.R'"