-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstructor_Summary_File_Export.R
74 lines (43 loc) · 2.98 KB
/
Instructor_Summary_File_Export.R
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
##################################################################################
###
### R script to create Instructor level summary files
###
##################################################################################
### Load packages
require(SGP)
require(data.table)
### Load Hawaii SGP object
load("Data/Hawaii_SGP.Rdata")
### Create summary files
## School_by_Instructor.txt
summary.data <- Hawaii_SGP@Summary$SCHOOL_NUMBER[['SCHOOL_NUMBER__INSTRUCTOR_NUMBER__INSTRUCTOR_ENROLLMENT_STATUS']]
summary.data <- summary.data[INSTRUCTOR_ENROLLMENT_STATUS=="Enrolled Instructor: Yes"]
fwrite(summary.data, file="School_by_Instructor.txt", quote=FALSE, sep="|")
## School_by_ContentArea_by_Instructor.txt
summary.data <- Hawaii_SGP@Summary$SCHOOL_NUMBER[['SCHOOL_NUMBER__INSTRUCTOR_NUMBER__CONTENT_AREA__INSTRUCTOR_ENROLLMENT_STATUS']]
summary.data <- summary.data[INSTRUCTOR_ENROLLMENT_STATUS=="Enrolled Instructor: Yes"]
fwrite(summary.data, file="School_by_ContentArea_by_Instructor.txt", quote=FALSE, sep="|")
## School_by_Year_by_ContentArea_by_Instructor.txt
summary.data <- Hawaii_SGP@Summary$SCHOOL_NUMBER[['SCHOOL_NUMBER__INSTRUCTOR_NUMBER__CONTENT_AREA__YEAR__INSTRUCTOR_ENROLLMENT_STATUS']]
summary.data <- summary.data[INSTRUCTOR_ENROLLMENT_STATUS=="Enrolled Instructor: Yes"]
fwrite(summary.data, file="School_by_Year_by_ContentArea_by_Instructor.txt", quote=FALSE, sep="|")
## School_by_Year_by_Instructor.txt
summary.data <- Hawaii_SGP@Summary$SCHOOL_NUMBER[['SCHOOL_NUMBER__INSTRUCTOR_NUMBER__YEAR__INSTRUCTOR_ENROLLMENT_STATUS']]
summary.data <- summary.data[INSTRUCTOR_ENROLLMENT_STATUS=="Enrolled Instructor: Yes"]
fwrite(summary.data, file="School_by_Year_by_Instructor.txt", quote=FALSE, sep="|")
## State_by_Instructor.txt
summary.data <- Hawaii_SGP@Summary$STATE[['STATE__INSTRUCTOR_NUMBER__INSTRUCTOR_ENROLLMENT_STATUS']]
summary.data <- summary.data[INSTRUCTOR_ENROLLMENT_STATUS=="Enrolled Instructor: Yes"]
fwrite(summary.data, file="State_by_Instructor.txt", quote=FALSE, sep="|")
## State_by_ContentArea_by_Instructor.txt
summary.data <- Hawaii_SGP@Summary$STATE[['STATE__INSTRUCTOR_NUMBER__CONTENT_AREA__INSTRUCTOR_ENROLLMENT_STATUS']]
summary.data <- summary.data[INSTRUCTOR_ENROLLMENT_STATUS=="Enrolled Instructor: Yes"]
fwrite(summary.data, file="State_by_ContentArea_by_Instructor.txt", quote=FALSE, sep="|")
## State_by_Year_by_ContentArea_by_Instructor.txt
summary.data <- Hawaii_SGP@Summary$STATE[['STATE__INSTRUCTOR_NUMBER__CONTENT_AREA__YEAR__INSTRUCTOR_ENROLLMENT_STATUS']]
summary.data <- summary.data[INSTRUCTOR_ENROLLMENT_STATUS=="Enrolled Instructor: Yes"]
fwrite(summary.data, file="State_by_Year_by_ContentArea_by_Instructor.txt", quote=FALSE, sep="|")
## State_by_Year_by_Instructor.txt
summary.data <- Hawaii_SGP@Summary$STATE[['STATE__INSTRUCTOR_NUMBER__YEAR__INSTRUCTOR_ENROLLMENT_STATUS']]
summary.data <- summary.data[INSTRUCTOR_ENROLLMENT_STATUS=="Enrolled Instructor: Yes"]
fwrite(summary.data, file="State_by_Year_by_Instructor.txt", quote=FALSE, sep="|")