-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_READ_ONE_TRAIN_FILE.R
More file actions
30 lines (23 loc) · 911 Bytes
/
Copy path_READ_ONE_TRAIN_FILE.R
File metadata and controls
30 lines (23 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
training<-read.csv(paste(wd_path,'/Input/frompems/',item,'.tsv',sep=""), header=TRUE,
sep = "\t", fileEncoding="windows-1252",quote="")
# discard Final Scores that are not numeric
for (Response_id in c("A","B","C")) {
eval(parse(text=paste("
training[,Response_name_",Response_id,"]<-
as.numeric(as.character(training[,Response_name_",Response_id,"]))"
,sep="")))
eval(parse(text=paste("
training<-training[!is.na(training[,Response_name_",Response_id,"]),]"
,sep="")))
}
# convert EssayText to character format
EssayText <-as.character(training$Item_Response)
Nrows<-length(EssayText)
# get score to be modelled
for (Response_id in c("A","B","C")) {
eval(parse(text=paste("
y",Response_id,"<-training[,Response_name_",Response_id,"]"
,sep="")))
}
# store data
Store(EssayText,Nrows,yA,yB,yC)