Description Usage Arguments Value Author(s) Examples
Useful when you don't know the length/structure of a file and want a useful sample to look at. Can skip ahead in the file too. Copes well when there are less than 'n' lines in the file.
1 | n.readLines(fn, n, comment = "#", skip = 0, header = TRUE)
|
fn |
name of the file(s) to get the length of |
n |
number of valid lines to attempt to read looks at the top few lines (ignoring comments) |
comment |
a comment symbol to ignore lines in files |
skip |
number of lines to skip at top of file before processing |
header |
whether to allow for, and skip, a header row |
returns the first n lines of the file meeting the criteria, or if 'skip' implies lines beyond the length of the file, the result,will be truncated - although in this case, the last line will always be read.
Nicholas Cooper nick.cooper@cimr.cam.ac.uk
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.