stat: Access statistics from a Student Record

statR Documentation

Access statistics from a Student Record

Description

These functions access the stats field of a StudentRecord object. The function stat accesses a single statistics and stats returns all of the statistics. The function statNames returns the names of the available statistics.

Usage

stat(sr, name)
stats(x)
statNames(sr)

Arguments

sr, x

A StudentRecord object whose statsitics are to be accessed.

name

A character object giving the name of the specific statististic to access.

Value

The function stat returns the value of a single statistic, which could be numeric, character or something else.

The function stats returns a named list of statistics.

The function statNames returns a character vector.

Author(s)

Russell Almond

See Also

StudentRecord for the student record class.

Statistic for statistic objects which return the statistics.

Examples


stats <- list(Physics_EAP=0,EnergyTransfer_EAP=.15,
              Physics_Margin=c(High=1/3,Medium=1/3,
                               Low=1/3))

dsr <- StudentRecord("*DEFAULT*",app="ecd://epls.coe.fsu.edu/P4Test",
                     context="*Baseline*",stats=stats)

stats(dsr)
stopifnot(all.equal(stats,stats,tolerance=.0002))

statNames(dsr)
stopifnot(all(statNames(dsr)==names(stats)))

stat(dsr,"Physics_Margin")
stopifnot(all.equal(stat(dsr,"Physics_Margin"),stats[[3]],tolerance=.0002))





ralmond/EABN documentation built on Aug. 30, 2023, 12:52 p.m.