list_files: Lists files for input to create_data

View source: R/dataimport.R

list_filesR Documentation

Lists files for input to create_data

Description

The function takes all the files and organises them in a list with one element per ID, containing all the files for that ID.

Usage

list_files(files)

Arguments

files

a character vector of all the files

Details

How to use: Collect all files in a folder, and name them VARIABLE_GROUP_ID, where ID is numeric and group is characters. Make a character vector of all the filepaths using the [list.files()] function, and then pass that vector to list_files().

See example

Value

a named list of data filepaths

Examples

List of all files using list.files()
allfiles <- list.files(path = "PATH TO FILES", pattern = ".txt")

Make list containing one element per ID, which can be passed to [create_data()]

animals <- list_files(allfiles)

VegardLysne/bssg documentation built on Aug. 26, 2022, 3:16 p.m.