PimaIndiansDiabetes_wide | R Documentation |
The data set PimaIndiansDiabetes2 contains a corrected version of the original data set. While the UCI repository index claims that there are no missing values, closer inspection of the data shows several physical impossibilities, e.g., blood pressure or body mass index of 0. In PimaIndiansDiabetes2, all zero values of glucose, pressure, triceps, insulin and mass have been set to NA, see also Wahba et al (1995) and Ripley (1996).
PimaIndiansDiabetes_wide
A data frame with 392 observations of
8 numeric variables, and target factor diabetes
.
pregnant, Number of times pregnant
glucose, Plasma glucose concentration (glucose tolerance test)
pressure, Diastolic blood pressure (mm Hg)
triceps, Triceps skin fold thickness (mm)
insulin, 2-Hour serum insulin (mu U/ml)
mass, Body mass index (weight in kg/(height in m, squared))
pedigree, Diabetes pedigree function
age, Age (years)
diabetes, Class variable (test for diabetes), either "pos" or "neg"
This is a cleaned subset of mlbench
's PimaIndiansDiabetes2
.
See help(PimaIndiansDiabetes2, package = "mlbench")
.
Replicating this dataset:
require("mlbench") data(PimaIndiansDiabetes2) d <- PimaIndiansDiabetes2 d <- d[complete.cases(d), ] ## Remove ~350 row-wise incomplete rows PimaIndiansDiabetes_wide <- d ## save(PimaIndiansDiabetes_wide, file = "./data/PimaIndiansDiabetes_wide.rda")
library(spinifex)
str(PimaIndiansDiabetes_wide)
dat <- scale_sd(PimaIndiansDiabetes_wide[, 1:8])
clas <- PimaIndiansDiabetes_wide$diabetes
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))
animate_plotly(ggt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.