Learn R Programming

spinifex (version 0.3.2)

BreastCancer: Wisconsin Breast Cancer Database

Description

The objective is to identify each of a number of benign or malignant classes. Samples arrive periodically as Dr. Wolberg reports his clinical cases. The database therefore reflects this chronological grouping of the data. This grouping information appears immediately below, having been removed from the data itself. Each variable except for the first was converted into 11 primitive numerical attributes with values ranging from 0 through 10. Rows with missing attribute values and duplicate rows removed.

Usage

BreastCancer

Arguments

Format

A data frame with 675 observations of 8 numeric variables and target factor Class.

  • Id, Sample code number

  • Cl.thickness, Clump thickness

  • Cell.size, Uniformity of cell size

  • Cell.shape, Uniformity of cell shape

  • Marg.adhesion, Marginal adhesion

  • Epith.c.size, Single Epthelial cell size

  • Bare.nuclei, Bare nuclei

  • Bl.cromatin, Bland chromatin

  • Normal.nucleoli, Normal Nucleoli

  • Mitoses, Mitoses

  • Class, Class of cancer, either "benign" or "malignant"

Details

This is a cleaned subset of mlbench's BreastCancer. See help(BreastCancer, package = "mlbench") for the original.

Replicating this dataset:

require("mlbench")
data(BreastCancer)

raw <- BreastCancer ## rownumber index of 8 duplicate 16 incomplete rows idx <- !duplicated(raw) & complete.cases(raw) d <- raw[idx, 3:10] d <- apply(d, 2L, as.integer) d <- data.frame(d, Class = as.factor(raw$Class[idx])) BreastCancer <- d ## save(BreastCancer, file = "./data/BreastCancer.rda")

Examples

Run this code
# NOT RUN {
library("spinifex")
str(spinifex::BreastCancer)
dat  <- scale_sd(spinifex::BreastCancer[, 1:8])
clas <- spinifex::BreastCancer$Class

bas <- basis_pca(dat)
mv  <- manip_var_of(bas)
mt  <- manual_tour(bas, mv)

ggt <- ggtour(mt, dat, angle = .2) +
  proto_default(aes_args = list(color = clas, shape = clas))
# }
# NOT RUN {
animate_plotly(ggt)
# }

Run the code above in your browser using DataLab