import_trajectory: Import trajectories of search heuristics.

Description Usage Arguments Details Value

View source: R/import_trajectory.R

Description

Given a set of files, the function reads all files, extracts rows as desired, appends the file path as “job.id” column and returns a data.frame. As alternative, one can pass a vector of integer |codeids, a path and a file extension ext. In this case the file paths are build given this information and the “job.id” corresponds to the ID.

Usage

1
2
3
import_trajectory(files = NULL, ids = NULL, path = NULL,
  ext = ".out", filter.rows = NULL, reader.fun = readr::read_delim,
  ...)

Arguments

files

[character]
Paths to files. May be NULL if ids is not NULL.

ids

[integer]
Vector of job IDs. May be NULL. If not NULL, parameter files is ignored.

path

[character(1)]|cr Directory containing the trajectory files. Only necessary if ids is not NULL.

ext

[character(1)]
File extension of trajectory files. Only relevant if ids is not NULL.

filter.rows

[numeric]
Which rows should be selected? Either relative by passing a sequence of values between zero and one or absolute by passing a sequence of integer values. In any case at least two values must be passed. Default is NULL.

reader.fun

[function(file, ...)]
Function used to import each single file. Default is read_delim. The first argument needs to be “file”. Remaining arguments may be passed down via ... (see below).

...

[any]
Furhter arguments passed down to reader.fun.

Details

Internally, each file is by default imported with read_delim. The variable length arguments ... are passed down to this function.

Value

[data.frame]


jakobbossek/tblutils documentation built on March 13, 2021, 12:47 p.m.