stat | R Documentation |
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.
stat(sr, name)
stats(x)
statNames(sr)
sr, x |
A |
name |
A character object giving the name of the specific statististic to access. |
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.
Russell Almond
StudentRecord
for the student record class.
Statistic
for statistic objects which return the
statistics.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.