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-11-09" #> [15] "Version: 0.2.5" #> [16] "Authors@R: c(" #> [17] " person(\"Eliot J B\", \"McIntire\", email = \"eliot.mcintire@canada.ca\"," #> [18] " role = c(\"aut\", \"cre\"), comment=c(ORCID = \"0000-0002-6914-8316\"))," #> [19] " person(\"Alex M\", \"Chubaty\", email = \"alex.chubaty@gmail.com\"," #> [20] " role = c(\"aut\"), comment = c(ORCID = \"0000-0001-7146-8135\"))," #> [21] " person(\"Tati\", \"Micheletti\", email = \"tati.micheletti@gmail.com\"," #> [22] " role = c(\"ctb\"), comment=c(ORCID = \"0000-0003-4838-8342\"))," #> [23] " person(\"Ceres\", \"Barros\", email = \"cbarros@mail.ubc.ca\"," #> [24] " role = c(\"ctb\"), comment=c(ORCID = \"0000-0003-4036-977X\"))," #> [25] " person(\"Ian\", \"Eddy\", email = \"ian.eddy@canada.com\"," #> [26] " role = c(\"ctb\"), comment=c(ORCID = \"0000-0001-7397-2116\"))," #> [27] " person(\"Her Majesty the Queen in Right of Canada, as represented by the Minister of Natural Resources Canada\"," #> [28] " role = \"cph\")" #> [29] " )" #> [30] "Depends:" #> [31] " R (>= 3.3.0)" #> [32] "Imports:" #> [33] " archivist (>= 2.1.2)," #> [34] " backports," #> [35] " crayon," #> [36] " data.table (>= 1.10.4)," #> [37] " devtools," #> [38] " digest," #> [39] " dplyr," #> [40] " fastdigest," #> [41] " fasterize," #> [42] " fpCompare," #> [43] " gdalUtils," #> [44] " git2r (>= 0.18)," #> [45] " googledrive," #> [46] " httr," #> [47] " magrittr," #> [48] " memoise," #> [49] " methods," #> [50] " parallel," #> [51] " quickPlot," #> [52] " R.utils," #> [53] " raster," #> [54] " Rcpp (>= 0.12.13)," #> [55] " RCurl (>= 1.95-4.8)," #> [56] " remotes," #> [57] " rgdal," #> [58] " rgeos," #> [59] " sf," #> [60] " sp," #> [61] " testthat," #> [62] " tibble," #> [63] " tools," #> [64] " utils," #> [65] " versions" #> [66] "Suggests:" #> [67] " covr," #> [68] " future," #> [69] " knitr," #> [70] " rmarkdown," #> [71] " TimeWarp" #> [72] "Encoding: UTF-8" #> [73] "Language: en-CA" #> [74] "LinkingTo: Rcpp" #> [75] "License: GPL-3" #> [76] "VignetteBuilder: knitr, rmarkdown" #> [77] "BugReports: https://github.com/PredictiveEcology/reproducible/issues" #> [78] "ByteCompile: yes" #> [79] "RoxygenNote: 6.1.0.9000" #> [80] "Collate: " #> [81] " 'RcppExports.R'" #> [82] " 'cache-helpers.R'" #> [83] " 'cache-tools.R'" #> [84] " 'robustDigest.R'" #> [85] " 'cache.R'" #> [86] " 'checksums.R'" #> [87] " 'consistentPaths.R'" #> [88] " 'convertPaths.R'" #> [89] " 'download.R'" #> [90] " 'gis.R'" #> [91] " 'git.R'" #> [92] " 'helpers.R'" #> [93] " 'objectSize.R'" #> [94] " 'packages.R'" #> [95] " 'pipe.R'" #> [96] " 'postProcess.R'" #> [97] " 'preProcess.R'" #> [98] " 'prepInputs.R'" #> [99] " 'reproducible-package.R'" #> [100] " 'search.R'" #> [101] " 'zzz.R'"