read_log: Read and parse log file as a data frame.

Description Usage Arguments Value Examples

View source: R/read_log.R

Description

Read and parse log file as a data frame.

Usage

1

Arguments

file

A path to the CSV file or a CSV formated string. First row starts with values without headers.

Value

A data frame object with three columns sorted by these columns:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Prepare data
log_csv <- paste(
  "20200101000001, 192.168.1.1/24, 5",
  "20200101000002, 192.168.1.1/24, 8",
  sep = "\n"
)
path <- tempfile()
writeLines(log_csv, path)

# Read from path and string.
read_log(path)
read_log(I(log_csv))

atusy/pingAnalysis documentation built on Jan. 3, 2022, 12:47 p.m.