Learn R Programming

HandTill2001 (version 1.0.3)

bincap: A Constructor for Objects of Class bincap

Description

bincap(...) is an alias to new("bincap", ...).

Usage

bincap(response, predicted, true = "1")

Value

An object of class bincap.

Arguments

response

Object of class factor.

predicted

Object of class numeric.

true

Object of class character.

Details

There is no casting or conversion of data. bincap(...) is just an alias to new("bincap", ...).

See Also

class?HandTill2001::bincap

Examples

Run this code

library(HandTill2001)
data(ht01.twoclass)
str(ht01.twoclass$observed)
message("note that ht01.twoclass$observed is not a factor; we have to convert it.")
bincap(
  response = as.factor(ht01.twoclass$observed),
  predicted = ht01.twoclass$predicted,
  true = c("1")
)

Run the code above in your browser using DataLab