Learn R Programming

WebAnalytics (version 0.9.13)

logFileListRead: Given a list of file names, read them as log files

Description

This function calls logFileRead to read the individual log files.

Usage

logFileListRead(fileNameList, readFunction=logFileRead, columnList=NULL)

Value

The function returns a dataframe that is the concatenation (rbind) of the read log files. If the default read function is used the data frame will contain the standard column set required by the other functions in this package.

Arguments

fileNameList

A list of character file names

readFunction

This function is called to read the file name.

columnList

The columnList is a list of predefined column names. See logFileRead for the list of valid values.

Author

Greg Hunt <greg@firmansyah.com>

Examples

Run this code
# \dontshow{
datd = paste0(tempdir(),"/minconfigtemp")
unlink(datd)
dir.create(paste0(tempdir(),"/minconfigtemp"))
logfile = paste0(datd,"/log.log")
fileConn = gzfile(system.file("extdata", "compressed.log", package = "WebAnalytics"))
writeLines(readLines(fileConn,n=100),con=logfile)
close(fileConn)
setDTthreads(threads = 1)
# }

fileNameList = logFileNamesGetAll(dataDirectory=datd)

logdf = logFileListRead(fileNameList, 
          readFunction=logFileRead, 
          columnList=logFileFieldsGetIIS(fileNameList[[1]]))

Run the code above in your browser using DataLab