save_depending_on_format: save_depending_on_format

View source: R/saving_and_loading_data.R

save_depending_on_formatR Documentation

save_depending_on_format

Description

Saves data in TSV, CSV, RDA or RDS, depending on the file's extension. CSV and TSVs are saved the same way: with double quotes (ascii character 34, or 0x22 " ), EOL is a newline (ascii character 10, or 0x0A), NAs are saved as "NA", decimal point are latin point (ascii character 46, or 0x2E . ), row names and colnames are added and the encoding is UTF-8. The only thing that changes is the separator: A comma (ascii character 44, or 0x2C , ) for CSV files and a tabulation (ascii character 9, or 0x09) for TSV files.

Usage

save_depending_on_format(file, var_name, compress = "bzip2")

Arguments

file

the path of the file to save

var_name

the name of the object to save

compress

compression algo for rds/rda, defaults to bzip2

Value

NULL - called for side effects


TAD documentation built on April 4, 2025, 5:10 a.m.