Wednesday, August 13, 2014

Advising, placement analysis in R



require(xlsx)
list.files()

lang = read.xlsx2( "language Placement Results 2014Fall.xlsx", 1,
                  colClasses=c("character", "character", "character", "character", "character") )
for(i in 1:5) {
  lang[,i] = as.character(lang[,i])
}

tb = read.xlsx2( "qin-FYE-2014-worksheets.xlsx", 1 )
for(i in 1:4) {
  tb[,i] = as.character(tb[,i])
}

tb$SCID %in% lang$SCID
tb$Language = lang$Language[match(tb$SCID, lang$SCID)]
tb$LangPlacement = lang$placement[match(tb$SCID, lang$SCID)]

list.files()

math = read.xlsx2( "Advisor Placements Fall 2014.xlsx", 1)
for(i in 1:4) {
  math[,i] = as.character(math[,i])
}
tb$SCID %in% math$Student.ID.
tb$MathCode. = math$Code.[match(tb$SCID, math$Student.ID.)]
tb$MathPlacement = math[match(tb$SCID, math$Student.ID.), 4]
tb$MathOther = math[match(tb$SCID, math$Student.ID.), 5]


write.xlsx(tb, "qin-FYE-20140813.xlsx")

No comments:

Post a Comment