Usage
hsKeyValReader(file = "", chunkSize = -1, skip = 0, sep = "",FUN = function(k, v) cat(paste(k, v, sep = ": "), sep = ""))- file
{A connection object or a character string, as in scan.}
- chunkSize
{The (maximal) number of lines to read at a
time. The default is -1, which specifies that the whole file should be read at once.}
- skip
{Number of lines to ignore at the beginning of the file}
- FUN
{A function that takes a character vector as input}
- sep
{The character separating the key and the value strings.}
No return value.
[object Object]
printFn <- function(k,v) {
cat('A chunk:')
cat(paste(k,v,sep=': '),sep='')
str <- "key1"
cat(str)
con <- textConnection(str, open = "r")
hsKeyValReader(con,chunkSize=2,FUN=printFn)
close(con)
con <- textConnection(str, open = "r")
hsKeyValReader(con,FUN=printFn)
close(con)