This is an R package for formatting student data for the National
Student Clearinghouse. The package currently supports one function:
format_data().
This package is not affiliated with, endorsed by, sponsored by, or officially connected with the National Student Clearinghouse.
It prepares a seven-column student dataset for submission by creating the NSC header, detail, and trailer rows, then writing tab-delimited TXT and CSV files. Always inspect the generated files before submitting them to the National Student Clearinghouse.
format_data()yyyy-mm-dd, and written to the output as
yyyymmdd.school_code, branch_code, and
requester-return identifiers must be character values. Zeros lost before
the function receives a numeric value cannot be recovered.format_data() returns a 12-column data frame containing
the NSC header, student detail rows, and trailer row. It also writes one
.txt file and one .csv file to
file_dir. Output filenames use the current date, query
option, and suffix.
CO, multiple search dates display a
message and return NULL without creating output files; use
SE for multiple search dates.NA comparison errors. The
current number of days from the search date and today’s date must be at
least 60 days. So, it gives a message if the length is 59 days or
less.students <- data.frame(
first_name = "Jane",
middle_initial = "Q",
last_name = "Example",
suffix = "",
date_of_birth = "2000-01-01",
search_date = "2020-01-01",
requester_return_id = "0001",
stringsAsFactors = FALSE
)
formatted <- format_data(
school_code = "001234",
branch_code = "00",
school_name = "Example College",
file_creation_date = "20260907",
query_option = "SE",
file_dir = tempdir(),
input_file_name = students,
suffix = "example"
)The school_code, branch_code, and
requester-return identifier are quoted so leading zeros remain available
to the function.
To obtain the APA-style citation for this package, run:
cite <- format(citation("NSC"), style = "text")
cat(gsub("_", "", cite, fixed = TRUE), "\n")The console displays:
Klauth B (2026). NSC: Format Student Data for the National Student Clearinghouse. R package version 1.1.8.
In addition to CRAN, to install the package from GitHub, type the following:
install.packages("remotes")
remotes::install_github("Boklauth/NSC")This package is licensed under the MIT License. See
LICENSE and LICENSE.md.
This package is provided free of charge and “as is,” without warranty of any kind. To the fullest extent permitted by applicable law, the author disclaims all express or implied warranties, including warranties of merchantability, fitness for a particular purpose, accuracy, and non-infringement. Users are responsible for evaluating the package, verifying its output, and determining whether it is suitable for their intended use. The author is not responsible for errors, omissions, data loss, or consequences resulting from the use of this package.