CS代写 # to read crab.txt in R, place the file into your R working directory and

# to read crab.txt in R, place the file into your R working directory and
# run the following
crabs <- read.table("crab.txt") names(crabs) <- c("Obs","Colour","Spine","Weight","Width","Satellites") Copyright By PowCoder代写 加微信 powcoder

colour.map <- c("lt.med","med","dk.med","dk") crabs$Colour <- as.factor(colour.map[crabs$Colour]) spine.map <- c("both.gd","one.bad","both.bad") crabs$Spine <- as.factor(spine.map[crabs$Spine]) rm(colour.map,spine.map) 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com