Learn R Programming

One4All (version 0.5)

name_data: Name datasets

Description

This function extracts the names of the datasets provided in the input files. If specific data names are provided, they are used, otherwise the function tries to extract the names from the files themselves.

Usage

name_data(files_data, data_names = NULL)

Value

A vector of dataset names.

Arguments

files_data

A vector of file paths or list of data frames.

data_names

A vector of names to be assigned to datasets.

Examples

Run this code
name_data(files_data = c("path/to/data1.csv", "path/to/data2.csv"))
name_data(files_data = c("path/to/data.xlsx"), data_names = c("sheet1", "sheet2"))

Run the code above in your browser using DataLab