clean_workdir: Removing files created by Genepop

View source: R/Genepop.R

clean_workdirR Documentation

Removing files created by Genepop

Description

This removes “temporary files” created by Genepop, but also output files, so it should be used only when one no longer needs the latter files. This function asumes that the input file name contains only alphanumeric, dot, or underscore characters.

Usage

clean_workdir(
  otherfiles = NULL,
  path = ".",
  suffixes = c("GRA", "ISO", "MIG", "PRI", "DAT", "DG", "DIV", "D", "DIS", "FST", "NUL",
    "RHO", "2G2", "G", "GE", "GE2", "INF", "MSD", "TAB", "ST2"),
  in. = TRUE,
  cmdline = TRUE
)

Arguments

otherfiles

Character vector(s): one or more names of files to be removed and not matched by the other arguments (such as the input file, or some output files not identified by their suffix, as shown in the Example).

path

character vector: path from where files should be removed.

suffixes

Character vector(s): suffixes of files to be removed (useful for output files with readily identifiable suffixes).

in.

boolean: whether to remove the fichier.in file created by Genepop.

cmdline

boolean: whether to remove the cmdline.txt file created by Genepop.

Examples

# Removing files possibly written by other examples in the documentation:
clean_workdir(otherfiles=c("sample.txt", "Dsample.txt", "w2.txt", 
"PEL1600withCoord.txt", "Rhesus.txt", "structest.txt"))

genepop documentation built on Jan. 22, 2023, 1:07 a.m.