copy_mplus_output: A Function to Copy the Data Folder

View source: R/copy_mplus_output.R

copy_mplus_outputR Documentation

A Function to Copy the Data Folder

Description

In a data folder, there are sub folders, which represent study conditions. In the sub folders, there may be folders for estimators. This function allows one to copy just the output files with the extensions "out" and "dat" and paste another location but preserving the folder structure. It uses the "folder.Rdata" (study condition folders), which are created in a data generation stage.

Usage

copy_mplus_output(source_main_dir, dest_main_dir, cell_num, output_folder)

Arguments

source_main_dir

It is a main directory, where the study condition folders, including data files, are located. This main directory is to be copied.

dest_main_dir

It is a main destination directory, where the study condition folders, including data files, will be located.

cell_num

The cell numbers in order of the "folders.Rdata" object, and it must be in a numeric list; e.g., c(1, 3, 5) or c(1:24).

output_folder

This is the folder where the output files (".out", ".dat") are stored. The folder represents an estimator.

Examples

library(AUTTT)

source_main_dir <- "C:/Users/shh6304/Desktop/test3"
# dest_main_dir does not exist and will be created.
# Folders and files in "test3" will be cloned.
dest_main_dir <- "C:/Users/shh6304/OneDrive - Western Michigan University/test3"

copy_mplus_output(source_main_dir = "C:/Users/shh6304/Desktop/test3",
                 dest_main_dir = "C:/Users/shh6304/OneDrive - Western Michigan University/test3",
                 cell_num = c(1,3,5),
                 output_folder = "ML_probit")

Boklauth/AUTTT documentation built on Dec. 9, 2022, 7:37 a.m.