crsra_import_course: Imports all the .csv files into one list consisting of all...

Description Usage Arguments Examples

View source: R/crsra_import_course.R

Description

Imports all the .csv files into one list consisting of all the tables within the course.

Usage

1
2
3
4
5
6
7
8
9
crsra_import_course(
  workdir = ".",
  add_course_name = FALSE,
  change_pid_column = FALSE,
  check_problems = TRUE,
  include = NULL
)

crsra_table_names(workdir = ".")

Arguments

workdir

A character string vector indicating the directory where the unzipped course is stored.

add_course_name

Should a column of the course name be added to all the data.frames

change_pid_column

Should the partner_user_id column be changed to simply say "partner_user_id"?

check_problems

Should problems with reading in the data be checked?

include

vector of tables to import, they are the lowercase names of the files without any '.csv'. See crsra_table_names.

Examples

1
2
3
4
5
6
7
8
zip_file = system.file("extdata", "fake_course_7051862327916.zip",
package = "crsra")
bn = basename(zip_file)
bn = sub("[.]zip$", "", bn)
res = unzip(zip_file, exdir = tempdir(), overwrite = TRUE)
workdir = file.path(tempdir(), bn)
course_tables = crsra_import_course(workdir,
check_problems = FALSE)

ahdvnd/crsra documentation built on March 26, 2021, 9:29 a.m.