save_lookup: Save a lookup table to a CSV file

View source: R/build_lookup.R

save_lookupR Documentation

Save a lookup table to a CSV file

Description

save_lookup() saves a data frame as a CSV file (without row names) in the specified directory.

Usage

save_lookup(df, savedir, name)

Arguments

df

A data frame containing the lookup table data.

savedir

A string, the path to the save directory.

name

A string, the file name (should end in .csv).

Value

Nothing

Examples

# Create a temp save directory and load an example
save_dir <- file.path(tempdir(), "TCRconvertR_tmp")
dir.create(save_dir, showWarnings = FALSE, recursive = TRUE)
dat <- read.csv(get_example_path("fasta_dir/lookup.csv"))

save_lookup(dat, save_dir, "newlookup.csv")

# Clean up temporary folder
unlink(save_dir, recursive = TRUE)

TCRconvertR documentation built on June 8, 2025, 10:43 a.m.