ILSArename: Rename 'ILSAmerge' files

View source: R/ILSArename.R

ILSArenameR Documentation

Rename ILSAmerge files

Description

Renames files produced by ILSAmerge from name codes to comprehensible names including the study name, year and respondent. This function has been tested to behave correctly for: 'TIMSS', 'TIMSS Advanced', 'PIRLS', 'ICCS', 'ICILS', 'CIVED', 'REDS', 'RLII', and 'SITES' (2006).

Usage

ILSArename(
  inputdir = getwd(),
  codeTOname = TRUE,
  overwrite = TRUE,
  quiet = FALSE
)

Arguments

inputdir

a string indicating the path where ILSA 'SPSS' files are stored.

codeTOname

a logical value indicating if files should be renamed from codes to names (TRUE) or from names to codes (FALSE). Default is TRUE.

overwrite

a logical value indicating if files should be overwritten. If FALSE, files will be copied with the new names. Default is TRUE.

quiet

a logical value indicating if progress status should be shown. Default is FALSE.

Value

Renames or copies files produced by ILSAmerge.

Examples


# Merge files
dir.create(file.path(tempdir(),"REDS2021"),showWarnings = FALSE)
ILSAmerge(inputdir = system.file("extdata/reds", package = "ILSAmerge"), 
outputdir = file.path(tempdir(),"REDS2021"))

# Show files with raw names
list.files(file.path(tempdir(),"REDS2021"))

# Rename files
ILSArename(inputdir = file.path(tempdir(),"REDS2021"))

# Show files new names 
list.files(file.path(tempdir(),"REDS2021"))


ILSAmerge documentation built on April 11, 2025, 5:54 p.m.