| Title: | Course-Dependent Skill Structures |
|---|---|
| Description: | Deriving skill structures from skill assignment data for courses (sets of learning objects). |
| Authors: | Cord Hockemeyer [aut, cre] |
| Maintainer: | Cord Hockemeyer <[email protected]> |
| License: | GPL-3 |
| Version: | 0.3-1 |
| Built: | 2026-05-27 07:32:18 UTC |
| Source: | https://github.com/cran/CDSS |
The CDSS package provides functions for a complete workflow from
skill assignment tables to surmise mappings on the sets of skills and
learning objects, respectively.
Read the skill assignment using one of the read_skill_assignments_xxx() functions.
Check the compliance to the definition for skill assignments using cdss_sa_compliance().
Convert the skill assignment into a skill multi-assignment using cdss_sa2sma().
Close the skill multi-assignment under completion using cdss_sma2csma().
Compute the surmise function on skills using cdss_csma2sf().
Continue with functions from the kstMatrix package, e.g., to obtain a basis and further on a skill space.
Read the skill assignment using one of the read_skill_assignments_xxx() functions.
Check whether the skill assignment allows for the derivation of a surmise relation using cdss_sa_describes_sr().
If yes, derive an attribution relation from the skill assignment using cdss_sa2ar_skill().
Close the attribution relation to a surmise relation using cdss_close_ar().
Continue with functions from the kstMatrix package, e.g., to obtain a basis and further on a skill space.
The installation of this package includes several data files as examples in the
extdata sub directory (see the Examples below for how to access the files there).
There are four data sets, KST, KST-Intro, SkillAssignment, and
ErroneousSkillAssignment. The SkillAssignment data set is available in
three formats, ODS, XLSX, and CSV (in CSV format, there are two files each,
SkillAssignment-R.csv and SkillAssignment-T.csv, for required and taught skills, respectively).
The other three data sets are available in ODS format only.
SkillAssignment and ErroneousSkillAssignment are small example data sets
where the latter fails for cdss_sa_compliance(). KST contains a skill
assignment for the course on knowledge space theory under https://moodle.qhelp.eu/.
KST-Intro contains the reduction of KST to the first chapter of
that course.
Hockemeyer, C. (2022). Building Course-Dependent Skill Structures - Applying Competence based Knowledge Space Theory to Itself. Manuscript in preparation.
The creation of this R package was financially supported by the Erasmus+ Programme of the European Commission through the QHELP project (https://qhelp.eu/).
library(readODS) fpath <- system.file("extdata", "SkillAssignment.ods", package="CDSS") sa <- cdss_read_skill_assignment_ods(fpath) sa sma <- cdss_sa2sma(sa) sma csma <- cdss_sma2csma(sma) csma sf <- cdss_csma2sf(csma) sflibrary(readODS) fpath <- system.file("extdata", "SkillAssignment.ods", package="CDSS") sa <- cdss_read_skill_assignment_ods(fpath) sa sma <- cdss_sa2sma(sa) sma csma <- cdss_sma2csma(sma) csma sf <- cdss_csma2sf(csma) sf
cdss_binary_matrix_product expects two binary matrices and computes there Boolean product.
cdss_binary_matrix_product(m, n)cdss_binary_matrix_product(m, n)
m |
Binary matrix |
n |
Binary matrix |
Boolean matrix product of m and n
Other Utility functions:
cdss_close_ar(),
cdss_reduce_sf()
cdss_circular_requirements expects skill assignment and returns
a vector of learning objects which require a skill that they teach.
cdss_circular_requirements(sa)cdss_circular_requirements(sa)
sa |
Skill assignment |
Vector of learning objects
Other Functions testing validity of skill assignments:
cdss_missing_los(),
cdss_nonteaching_los(),
cdss_sa_compliance()
cdss_close_ar expects a quadratic binary matrix and closes it under
reflexivity and transitivity.
cdss_close_ar(ar)cdss_close_ar(ar)
ar |
Attribution relation matrix |
surmise relation or NULL
Other Utility functions:
cdss_binary_matrix_product(),
cdss_reduce_sf()
cdss_csma2sf expects a complete skill multi-assignment object
and returns the corresponding surmise function on the set of skills.
cdss_csma2sf(csma)cdss_csma2sf(csma)
csma |
Skill multi-assignment to be completed |
Object of class cdss_csma.
cdss_lo_csma2sf expects a complete skill multi-assignment and derives a surmise
function on the set of learning objects.
cdss_lo_csma2sf(csma)cdss_lo_csma2sf(csma)
csma |
Complete skill multi-assignment object |
Object of class cdss_sf (attribution function).
Other functions building skill (multi) assignment matrices:
cdss_lo_sa2af(),
cdss_sa2sma(),
cdss_tables2sa()
cdss_lo_sa2af expects a skill assignment and derives an attribution
function on the set of learning objects.
cdss_lo_sa2af(sa)cdss_lo_sa2af(sa)
sa |
Skill assignment object |
Object of class cdss_af (attribution function).
Other functions building skill (multi) assignment matrices:
cdss_lo_csma2sf(),
cdss_sa2sma(),
cdss_tables2sa()
cdss_lo_sa2ar expects a skill assignment and derives an attribution relation
on learning objects if the skill assignment fulfills the necessary conditions, i.e. if
there is only one teaching LO per skill.
cdss_lo_sa2ar(sa)cdss_lo_sa2ar(sa)
sa |
Skill assignment object |
attribution relation or NULL
Other functions deriving skill structures from skill assignments:
cdss_sa2ar_skill(),
cdss_sa_describes_sr()
cdss_missing_los expects a skill assignment and returns a vector
of skills which are not taught by any learning object.
cdss_missing_los(sa)cdss_missing_los(sa)
sa |
SKill assignment |
Vector of skills
Other Functions testing validity of skill assignments:
cdss_circular_requirements(),
cdss_nonteaching_los(),
cdss_sa_compliance()
cdss_nonteaching_los expects a skill assignment and returns a vector
of learning objects which do not teach any skill.
cdss_nonteaching_los(sa)cdss_nonteaching_los(sa)
sa |
SKill assignment |
Vector of learning objects
Other Functions testing validity of skill assignments:
cdss_circular_requirements(),
cdss_missing_los(),
cdss_sa_compliance()
cdss_read_skill_assignment expects two CSV-files with two columns each. The first
column contains the IDs of learning objects and the second row the IDs of single skills
required or taught, respectively, by this learning object.
It returns a list of two binary matrices, "taught" and "required". Each matrix has one
row per learning object and one column per skill. The cells contain a "1" if the skill
is taught or required, respectively, by the learning object and a "0" otherwise,
cdss_read_skill_assignment_csv( taught, required, header = TRUE, sep = ",", dec = ".", warnonly = FALSE, verbose = TRUE )cdss_read_skill_assignment_csv( taught, required, header = TRUE, sep = ",", dec = ".", warnonly = FALSE, verbose = TRUE )
taught |
CSV-file with assignments of taught competencies to learning objects |
required |
CSV-file with assignments of required competencies to learning objects |
header |
Boolean specifying whether the CSV-files contain a header line (default = TRUE) |
sep |
Column separator (default ",") |
dec |
Decimal point character (default ".") |
warnonly |
Are non-compliant SAs allowed? (default = FALSE) |
verbose |
Verbosity of compliance test (default = TRUE) |
List of two binary matrices, "taught" and "required".
Other functions reading skill assignments:
cdss_read_skill_assignment_ods(),
cdss_read_skill_assignment_xlsx(),
cdss_wf_read_skill_assignment()
cdss_read_skill_assignment_ods expects an ODS-file with two sheets assigning taught and
required, respectively, skills to learning objects with two columns each. The first
column contains the IDs of learning objects and the second row the IDs of single skills
required or taught, respectively, by this learning object.
It returns a list of two binary matrices, "taught" and "required". Each matrix has one
row per learning object and one column per skill. The cells contain a "1" if the skill
is taught or required, respectively, by the learning object and a "0" otherwise,
cdss_read_skill_assignment_ods( filename, taughtname = "Taught", requiredname = "Required", warnonly = FALSE, verbose = TRUE )cdss_read_skill_assignment_ods( filename, taughtname = "Taught", requiredname = "Required", warnonly = FALSE, verbose = TRUE )
filename |
Name of the ODS-file |
taughtname |
Name of the sheet with required assignment (default = "Taught") |
requiredname |
Name of the sheet with required assignment (default = "Required") |
warnonly |
Are non-compliant SAs allowed? (default = FALSE) |
verbose |
Verbosity of compliance test (default = TRUE) |
List of two binary matrices, "taught" and "required".
Other functions reading skill assignments:
cdss_read_skill_assignment_csv(),
cdss_read_skill_assignment_xlsx(),
cdss_wf_read_skill_assignment()
cdss_read_skill_assignment_xlsx expects an XLSX-file with two sheets assigning taught and
required, respectively, skills to learning objects with two columns each. The first
column contains the IDs of learning objects and the second row the IDs of single skills
required or taught, respectively, by this learning object.
It returns a list of two binary matrices, "taught" and "required". Each matrix has one
row per learning object and one column per skill. The cells contain a "1" if the skill
is taught or required, respectively, by the learning object and a "0" otherwise,
cdss_read_skill_assignment_xlsx( filename, taughtname = "Taught", requiredname = "Required", warnonly = FALSE, verbose = TRUE )cdss_read_skill_assignment_xlsx( filename, taughtname = "Taught", requiredname = "Required", warnonly = FALSE, verbose = TRUE )
filename |
Name of the XLSX-file |
taughtname |
Name of the sheet with required assignment (default = "Taught") |
requiredname |
Name of the sheet with required assignment (default = "Required") |
warnonly |
Are non-compliant SAs allowed? (default = FALSE) |
verbose |
Verbosity of compliance test (default = TRUE) |
List of two binary matrices, "taught" and "required".
Other functions reading skill assignments:
cdss_read_skill_assignment_csv(),
cdss_read_skill_assignment_ods(),
cdss_wf_read_skill_assignment()
cdss_reduce_sf takes a surmise function and returns its
reduction to non-equivalent items.
cdss_reduce_sf(sf)cdss_reduce_sf(sf)
sf |
Surmise function |
Surmise function reduced by equivalences
Other Utility functions:
cdss_binary_matrix_product(),
cdss_close_ar()
cdss_sa_compliance expects a skill assignment and checks whether
it is compliant to the conditions for CDCS.
cdss_sa_compliance(sa, warnings = FALSE)cdss_sa_compliance(sa, warnings = FALSE)
sa |
Skill assignment |
warnings |
Toggles whether warnings should be printed |
Boolean
Other Functions testing validity of skill assignments:
cdss_circular_requirements(),
cdss_missing_los(),
cdss_nonteaching_los()
cdss_sa_describes_sr expects a list of two matrices (taught and required) of a skill
assignment. It returns TRUE if the skill assignment describes a surmise relation (i.e. there is
only one teaching LO per skill) and FALSE.
cdss_sa_describes_sr(sa, verbose = FALSE)cdss_sa_describes_sr(sa, verbose = FALSE)
sa |
Skill assignment object |
verbose |
Flag, default is FALSE |
Logical value
Other functions deriving skill structures from skill assignments:
cdss_lo_sa2ar(),
cdss_sa2ar_skill()
cdss_sa2ar_skill expects a skill assignment and derives an attribution relation
on skills if the skill assignment fulfills the necessary conditions, i.e. if there
is only one teaching LO per skill.
cdss_sa2ar_skill(sa)cdss_sa2ar_skill(sa)
sa |
Skill assignment object |
attribution relation or NULL
Other functions deriving skill structures from skill assignments:
cdss_lo_sa2ar(),
cdss_sa_describes_sr()
cdss_sa2sma expects a list of two matrices (taught and required) of a skill
assignment. It returns a skill multi-assignment object.
cdss_sa2sma(sa)cdss_sa2sma(sa)
sa |
Skill assignment object |
Object of class cdss_sma.
Other functions building skill (multi) assignment matrices:
cdss_lo_csma2sf(),
cdss_lo_sa2af(),
cdss_tables2sa()
cdss_sma2csma expects a skill multi-assignment object and returns
the corresponding complete skill multi-assignment.
If this would involve cycles, the function stops by default - except if
allowcycles is set to TRUE. In that case, the result may
be ill-defined!
cdss_sma2csma(sma, allowcycles = FALSE)cdss_sma2csma(sma, allowcycles = FALSE)
sma |
Skill multi-assignment to be completed |
allowcycles |
Whether prerequisite cycles should be allowed (default = FALSE) |
Object of class cdss_csma.
cdss_tables2sa expects two data frames with two columns each. The first
column contains the IDs of learning objects and the second row the IDs of single skills
required or taught, respectively, by this learning object.
It returns a list of two binary matrices, "taught" and "required". Each matrix has one
row per learning object and one column per skill. The cells contain a "1" if the skill
is taught or required, respectively, by the learning object and a "0" otherwise.
cdss_tables2sa(taught, required)cdss_tables2sa(taught, required)
taught |
Data table containing the assignment of taught skills to learning objects |
required |
Data table containing the assignment of required skills to learning objects |
List of two binary matrices, "taught" and "required".
Other functions building skill (multi) assignment matrices:
cdss_lo_csma2sf(),
cdss_lo_sa2af(),
cdss_sa2sma()
cdss_wf_read_skill_assignment expects an ODS or XLSX file with two sheets assigning
taught and required, respectively, skills to learning objects with two columns each.
Alternatively, two CSV files can be specified. In the sheets/CSV files, the first
column contains the IDs of learning objects and the second row the IDs of single skills
required or taught, respectively, by this learning object.
It returns a list of two binary matrices, "taught" and "required". Each matrix has one
row per learning object and one column per skill. The cells contain a "1" if the skill
is taught or required, respectively, by the learning object and a "0" otherwise,
cdss_wf_read_skill_assignment( filename, filename2 = NULL, filetype = "auto", taughtname = "Taught", requiredname = "Required", header = TRUE, sep = ",", dec = ".", warnonly = FALSE, verbose = TRUE )cdss_wf_read_skill_assignment( filename, filename2 = NULL, filetype = "auto", taughtname = "Taught", requiredname = "Required", header = TRUE, sep = ",", dec = ".", warnonly = FALSE, verbose = TRUE )
filename |
Name of the file (in case of CSV files the one with TAUGHT assignments) |
filename2 |
Name of the CSV file with REQUIRED assignments (if applicable) |
filetype |
Type of the file, allowed values are "auto", "ODS", "XLSX", and "CSV" |
taughtname |
Name of the sheet with required assignment (default = "Taught") |
requiredname |
Name of the sheet with required assignment (default = "Required") |
header |
Boolean specifying whether the CSV-files contain a header line (default = TRUE) |
sep |
Column separator for CSV files (default ",") |
dec |
Decimal point character for CSV files (default ".") |
warnonly |
Are non-compliant SAs allowed? (default = FALSE) |
verbose |
Verbosity of compliance test (default = TRUE) |
List of four elements: sfs (surmise function between skills), sfl (surmise function between learning objects) srs (surmise relation between skills, if available; NULL otherwise) srl (surmise relation between learning objectrs, if available; NULL otherwise)
Other functions reading skill assignments:
cdss_read_skill_assignment_csv(),
cdss_read_skill_assignment_ods(),
cdss_read_skill_assignment_xlsx()