-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
512 lines (512 loc) · 15.4 KB
/
.Rhistory
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
"PharmD - Vinayaka Missions College of Pharmacy",
"MSc Drug Discovery & Toxicology - University of Hertfordshire"),
start = c("2013-06-01", "2015-06-01", "2015-08-01", "2022-09-01"),
end = c(NA, NA, "2021-08-01", "2024-09-01")
)
# Define your education timeline data
education_data <- data.frame(
id = 1:4,
content = c("10th Standard - Sainik School Amaravathinagar",
"12th Standard - Sainik School Amaravathinagar",
"PharmD - Vinayaka Missions College of Pharmacy",
"MSc Drug Discovery & Toxicology - University of Hertfordshire"),
start = c("2013-06-01", "2015-06-01", "2015-08-01", "2022-09-01"),
end = c(NA, NA, "2021-08-01", "2024-09-01")
)
# Create the timeline
timevis(education_data, showZoom = FALSE)
# Create the timeline
timevis(education_data, showZoom = TRUE)
# Load the Shiny library
library(shiny)
# Define UI
ui <- fluidPage(
# Application title
titlePanel("My Education Grades"),
# Sidebar layout with input and output
sidebarLayout(
# Sidebar with a checkbox input for selecting education levels
sidebarPanel(
checkboxGroupInput("education", "Select Education:",
choices = list(
"10th Standard - Sainik School" = "10th",
"12th Standard - Sainik School" = "12th",
"PharmD - Vinayaka Missions College" = "PharmD",
"MSc Drug Discovery & Toxicology - University of Hertfordshire" = "MSc"),
selected = "10th") # Default selected
),
# Main panel for displaying plots
mainPanel(
plotOutput("gradePlot") # Plot output to show grade data
)
)
)
# Define server logic required to draw the plot
server <- function(input, output) {
# Data: Grades in different education stages
grades_data <- data.frame(
Education = c("10th", "12th", "PharmD", "MSc"),
Year = c(2013, 2015, 2021, 2024),
Grades = c(85, 88, 92, 95) # Example grades, you can adjust based on your data
)
# Render the plot based on the selected education
output$gradePlot <- renderPlot({
# Filter the data based on selected education levels
selected_data <- grades_data[grades_data$Education %in% input$education, ]
# Plot the grades
barplot(
selected_data$Grades,
names.arg = selected_data$Education,
col = "skyblue",
ylim = c(0, 100),
main = "Grades in Selected Education Levels",
xlab = "Education",
ylab = "Grades (%)",
border = "white"
)
})
}
# Run the application
shinyApp(ui = ui, server = server)
# Load the required libraries
library(shiny)
# Define UI
ui <- fluidPage(
# Title for the app
titlePanel("Education Grades"),
# Create a fluidRow for each section of the app
fluidRow(
# MSc DDT Section
column(2, strong("MSc DDT")),
column(10,
h4("A bar chart for different modules. I have 5 modules. Grades for each individual module out of 4.5"),
plotOutput("MScPlot") # Placeholder for MSc grades chart
)
),
hr(), # Horizontal line
fluidRow(
# Pharm D Section
column(2, strong("Pharm D")),
column(10,
# Toggle for Year selection (1 to 5)
tabsetPanel(
tabPanel("Year 1", plotOutput("PharmDYear1Plot")),
tabPanel("Year 2", plotOutput("PharmDYear2Plot")),
tabPanel("Year 3", plotOutput("PharmDYear3Plot")),
tabPanel("Year 4", plotOutput("PharmDYear4Plot")),
tabPanel("Year 5", plotOutput("PharmDYear5Plot"))
),
h4("Toggle changes the grades and module names in this section. Each year has 4 modules, and I need a bar chart for each module with theory and practical groups.")
)
),
hr(), # Horizontal line
fluidRow(
# Class XII Section
column(2, strong("Class XII")),
column(10,
h4("Each year has 4 modules and I need a bar chart for each module with theory and practical groups"),
plotOutput("Class12Plot") # Placeholder for Class XII grades chart
)
)
)
# Define server logic
server <- function(input, output) {
# Placeholder plot for MSc DDT (5 modules)
output$MScPlot <- renderPlot({
# Replace this with your actual grades data later
barplot(c(3.5, 4.0, 3.8, 4.2, 4.1),
names.arg = paste("Module", 1:5),
col = "lightblue",
ylim = c(0, 4.5),
main = "MSc DDT Grades (Out of 4.5)")
})
# Placeholder plot for PharmD Year 1 (4 modules)
output$PharmDYear1Plot <- renderPlot({
barplot(c(75, 80, 85, 90),
names.arg = c("Module 1", "Module 2", "Module 3", "Module 4"),
col = "lightgreen",
ylim = c(0, 100),
main = "Pharm D - Year 1 Grades (Theory and Practical)")
})
# Placeholder plot for PharmD Year 2 (4 modules)
output$PharmDYear2Plot <- renderPlot({
barplot(c(70, 78, 82, 88),
names.arg = c("Module 1", "Module 2", "Module 3", "Module 4"),
col = "lightgreen",
ylim = c(0, 100),
main = "Pharm D - Year 2 Grades (Theory and Practical)")
})
# Placeholder plot for PharmD Year 3 (4 modules)
output$PharmDYear3Plot <- renderPlot({
barplot(c(78, 85, 87, 92),
names.arg = c("Module 1", "Module 2", "Module 3", "Module 4"),
col = "lightgreen",
ylim = c(0, 100),
main = "Pharm D - Year 3 Grades (Theory and Practical)")
})
# Placeholder plot for PharmD Year 4 (4 modules)
output$PharmDYear4Plot <- renderPlot({
barplot(c(80, 88, 90, 94),
names.arg = c("Module 1", "Module 2", "Module 3", "Module 4"),
col = "lightgreen",
ylim = c(0, 100),
main = "Pharm D - Year 4 Grades (Theory and Practical)")
})
# Placeholder plot for PharmD Year 5 (4 modules)
output$PharmDYear5Plot <- renderPlot({
barplot(c(85, 90, 88, 93),
names.arg = c("Module 1", "Module 2", "Module 3", "Module 4"),
col = "lightgreen",
ylim = c(0, 100),
main = "Pharm D - Year 5 Grades (Theory and Practical)")
})
# Placeholder plot for Class XII (4 modules)
output$Class12Plot <- renderPlot({
barplot(c(90, 92, 88, 94),
names.arg = c("Module 1", "Module 2", "Module 3", "Module 4"),
col = "lightcoral",
ylim = c(0, 100),
main = "Class XII Grades (Theory and Practical)")
})
}
# Run the application
shinyApp(ui = ui, server = server)
# Load the required libraries
library(shiny)
# Example dataset created from your PharmD marksheet
pharmd_grades <- list(
Year1 = data.frame(
Module = c("Human Anatomy and Physiology", "Pharmaceutics", "Medicinal Biochemistry",
"Pharmaceutical Organic Chemistry", "Pharmaceutical Inorganic Chemistry",
"Pathophysiology", "Pharmaceutical Microbiology"),
Marks = c(174, 156, 150, 175, 175, 166, 168)
),
Year2 = data.frame(
Module = c("Pharmacognosy and Phyto Pharmaceuticals", "Pharmacology-I", "Community Pharmacy",
"Pharmacotherapeutics-I"),
Marks = c(176, 159, 174, 183)
),
Year3 = data.frame(
Module = c("Pharmacology-II", "Pharmaceutical Analysis", "Pharmacotherapeutics-II",
"Pharmaceutical Jurisprudence", "Medicinal Chemistry", "Pharmaceutical Formulations"),
Marks = c(173, 158, 165, 168, 160, 160)
),
Year4 = data.frame(
Module = c("Pharmacotherapeutics-III", "Hospital Pharmacy", "Clinical Pharmacy",
"Biostatistics and Research Methodology", "Biopharmaceutics and Pharmacokinetics"),
Marks = c(169, 160, 173, 81, 81)
),
Year5 = data.frame(
Module = c("Clinical Toxicology", "Clinical Research", "Pharmacoepidemiology and Pharmacoeconomics",
"Clinical Pharmacokinetics & Pharmacotherapeutic Drug Monitoring", "Clerkship",
"Project Work"),
Marks = c(83, 96, 96, 94, 94, 85)
)
)
# Define UI
ui <- fluidPage(
# Title for the app
titlePanel("Education Grades"),
# Create a fluidRow for each section of the app
fluidRow(
# MSc DDT Section
column(2, strong("MSc DDT")),
column(10,
h4("A bar chart for different modules. I have 5 modules. Grades for each individual module out of 4.5"),
plotOutput("MScPlot") # Placeholder for MSc grades chart
)
),
hr(), # Horizontal line
fluidRow(
# Pharm D Section
column(2, strong("Pharm D")),
column(10,
# Toggle for Year selection (1 to 5)
tabsetPanel(
tabPanel("Year 1", plotOutput("PharmDYear1Plot")),
tabPanel("Year 2", plotOutput("PharmDYear2Plot")),
tabPanel("Year 3", plotOutput("PharmDYear3Plot")),
tabPanel("Year 4", plotOutput("PharmDYear4Plot")),
tabPanel("Year 5", plotOutput("PharmDYear5Plot"))
),
h4("Toggle changes the grades and module names in this section. Each year has 4 modules, and I need a bar chart for each module with theory and practical groups.")
)
),
hr(), # Horizontal line
fluidRow(
# Class XII Section
column(2, strong("Class XII")),
column(10,
h4("Each year has 4 modules and I need a bar chart for each module with theory and practical groups"),
plotOutput("Class12Plot") # Placeholder for Class XII grades chart
)
)
)
# Define server logic
server <- function(input, output) {
# Placeholder plot for MSc DDT (5 modules)
output$MScPlot <- renderPlot({
# Replace this with your actual grades data later
barplot(c(3.5, 4.0, 3.8, 4.2, 4.1),
names.arg = paste("Module", 1:5),
col = "lightblue",
ylim = c(0, 4.5),
main = "MSc DDT Grades (Out of 4.5)")
})
# Bar plots for PharmD Years
output$PharmDYear1Plot <- renderPlot({
barplot(pharmd_grades$Year1$Marks,
names.arg = pharmd_grades$Year1$Module,
col = "lightgreen",
ylim = c(0, 200),
las = 2,
main = "Pharm D - Year 1 Grades")
})
output$PharmDYear2Plot <- renderPlot({
barplot(pharmd_grades$Year2$Marks,
names.arg = pharmd_grades$Year2$Module,
col = "lightgreen",
ylim = c(0, 200),
las = 2,
main = "Pharm D - Year 2 Grades")
})
output$PharmDYear3Plot <- renderPlot({
barplot(pharmd_grades$Year3$Marks,
names.arg = pharmd_grades$Year3$Module,
col = "lightgreen",
ylim = c(0, 200),
las = 2,
main = "Pharm D - Year 3 Grades")
})
output$PharmDYear4Plot <- renderPlot({
barplot(pharmd_grades$Year4$Marks,
names.arg = pharmd_grades$Year4$Module,
col = "lightgreen",
ylim = c(0, 200),
las = 2,
main = "Pharm D - Year 4 Grades")
})
output$PharmDYear5Plot <- renderPlot({
barplot(pharmd_grades$Year5$Marks,
names.arg = pharmd_grades$Year5$Module,
col = "lightgreen",
ylim = c(0, 200),
las = 2,
main = "Pharm D - Year 5 Grades")
})
# Placeholder plot for Class XII (4 modules)
output$Class12Plot <- renderPlot({
barplot(c(90, 92, 88, 94),
names.arg = c("Module 1", "Module 2", "Module 3", "Module 4"),
col = "lightcoral",
ylim = c(0, 100),
main = "Class XII Grades (Theory and Practical)")
})
}
# Run the application
shinyApp(ui = ui, server = server)
# Load the required libraries
library(shiny)
# Example dataset created from your PharmD marksheet
pharmd_grades <- list(
Year1 = data.frame(
Module = c("Human Anatomy and Physiology", "Pharmaceutics", "Medicinal Biochemistry",
"Pharmaceutical Organic Chemistry", "Pharmaceutical Inorganic Chemistry",
"Pathophysiology", "Pharmaceutical Microbiology"),
Marks = c(174, 156, 150, 175, 175, 166, 168)
),
Year2 = data.frame(
Module = c("Pharmacognosy and Phyto Pharmaceuticals", "Pharmacology-I", "Community Pharmacy",
"Pharmacotherapeutics-I"),
Marks = c(176, 159, 174, 183)
),
Year3 = data.frame(
Module = c("Pharmacology-II", "Pharmaceutical Analysis", "Pharmacotherapeutics-II",
"Pharmaceutical Jurisprudence", "Medicinal Chemistry", "Pharmaceutical Formulations"),
Marks = c(173, 158, 165, 168, 160, 160)
),
Year4 = data.frame(
Module = c("Pharmacotherapeutics-III", "Hospital Pharmacy", "Clinical Pharmacy",
"Biostatistics and Research Methodology", "Biopharmaceutics and Pharmacokinetics"),
Marks = c(169, 160, 173, 81, 81)
),
Year5 = data.frame(
Module = c("Clinical Toxicology", "Clinical Research", "Pharmacoepidemiology and Pharmacoeconomics",
"Clinical Pharmacokinetics & Pharmacotherapeutic Drug Monitoring", "Clerkship",
"Project Work"),
Marks = c(83, 96, 96, 94, 94, 85)
)
)
# Define UI
ui <- fluidPage(
# Title for the app
titlePanel("Education Grades"),
# Create a fluidRow for each section of the app
fluidRow(
# MSc DDT Section
column(2, strong("MSc DDT")),
column(10,
h4("A bar chart for different modules. I have 5 modules. Grades for each individual module out of 4.5"),
plotOutput("MScPlot") # Placeholder for MSc grades chart
)
),
hr(), # Horizontal line
fluidRow(
# Pharm D Section
column(2, strong("Pharm D")),
column(10,
# Toggle for Year selection (1 to 5)
tabsetPanel(
tabPanel("Year 1", plotOutput("PharmDYear1Plot")),
tabPanel("Year 2", plotOutput("PharmDYear2Plot")),
tabPanel("Year 3", plotOutput("PharmDYear3Plot")),
tabPanel("Year 4", plotOutput("PharmDYear4Plot")),
tabPanel("Year 5", plotOutput("PharmDYear5Plot"))
),
h4("Toggle changes the grades and module names in this section. Each year has 4 modules, and I need a bar chart for each module with theory and practical groups.")
)
),
hr(), # Horizontal line
fluidRow(
# Class XII Section
column(2, strong("Class XII")),
column(10,
h4("Each year has 4 modules and I need a bar chart for each module with theory and practical groups"),
plotOutput("Class12Plot") # Placeholder for Class XII grades chart
)
)
)
# Define server logic
server <- function(input, output) {
# Placeholder plot for MSc DDT (5 modules)
output$MScPlot <- renderPlot({
# Replace this with your actual grades data later
barplot(c(3.5, 4.0, 3.8, 4.2, 4.1),
names.arg = paste("Module", 1:5),
col = "lightblue",
ylim = c(0, 4.5),
main = "MSc DDT Grades (Out of 4.5)")
})
# Bar plots for PharmD Years
output$PharmDYear1Plot <- renderPlot({
barplot(pharmd_grades$Year1$Marks,
names.arg = pharmd_grades$Year1$Module,
col = "lightgreen",
ylim = c(0, 200),
main = "Pharm D - Year 1 Grades")
})
output$PharmDYear2Plot <- renderPlot({
barplot(pharmd_grades$Year2$Marks,
names.arg = pharmd_grades$Year2$Module,
col = "lightgreen",
ylim = c(0, 200),
main = "Pharm D - Year 2 Grades")
})
output$PharmDYear3Plot <- renderPlot({
barplot(pharmd_grades$Year3$Marks,
names.arg = pharmd_grades$Year3$Module,
col = "lightgreen",
ylim = c(0, 200),
main = "Pharm D - Year 3 Grades")
})
output$PharmDYear4Plot <- renderPlot({
barplot(pharmd_grades$Year4$Marks,
names.arg = pharmd_grades$Year4$Module,
col = "lightgreen",
ylim = c(0, 200),
las = 2,
main = "Pharm D - Year 4 Grades")
})
output$PharmDYear5Plot <- renderPlot({
barplot(pharmd_grades$Year5$Marks,
names.arg = pharmd_grades$Year5$Module,
col = "lightgreen",
ylim = c(0, 200),
main = "Pharm D - Year 5 Grades")
})
# Placeholder plot for Class XII (4 modules)
output$Class12Plot <- renderPlot({
barplot(c(90, 92, 88, 94),
names.arg = c("Module 1", "Module 2", "Module 3", "Module 4"),
col = "lightcoral",
ylim = c(0, 100),
main = "Class XII Grades (Theory and Practical)")
})
}
# Run the application
shinyApp(ui = ui, server = server)
View(pharmd_grades)
View(pharmd_grades[["Year1"]])
View(pharmd_grades[["Year2"]])
View(pharmd_grades[["Year3"]])
View(pharmd_grades[["Year4"]])
View(pharmd_grades[["Year5"]])
library(tidyverse)
read.csv("C:\Users\s1801\Downloads\pharmd.csv")
read.csv(C:\Users\s1801\Downloads\pharmd.csv)
read.csv(C:/Users/s1801/Downloads/pharmd.csv)
read.csv("C:/Users/s1801/Downloads/pharmd.csv")
pharmd_marks <- read.csv("C:/Users/s1801/Downloads/pharmd.csv") |> janitor::clean_names()
pharmd_marks |>
mutate(percentage = (marks/out_of)*100)
pharmd_marks |>
mutate(percentage = (marks/out_of)*100,
year = as.factor()) |>
group_by(year)
pharmd_marks |>
mutate(percentage = (marks/out_of)*100,
year = as.factor(year)) |>
group_by(year)
yearly <- pharmd_marks |>
mutate(percentage = (marks/out_of)*100,
year = as.factor(year)) |>
group_by(year) |>
mean(percentage)
pharmd_marks |>
mutate(percentage = (marks/out_of)*100,
year = as.factor(year)) |>
group_by(year)
pharmd_marks |>
mutate(percentage = as.numeric((marks/out_of)*100),
year = as.factor(year)) |>
group_by(year)
yearly <- pharmd_marks |>
mutate(percentage = (marks/out_of)*100,
year = as.factor(year)) |>
group_by(year) |>
mean(percentage)
yearly <- pharmd_marks |>
mutate(percentage = (marks/out_of)*100,
year = as.factor(year)) |>
group_by(year) |>
mutate(
year = c(1:5),
perc = mean(percentage)
)
yearly <- pharmd_marks |>
mutate(percentage = (marks/out_of)*100,
year = as.factor(year)) |>
group_by(year) |>
mutate(
year = c(1:6),
perc = mean(percentage)
)
yearly <- pharmd_marks |>
mutate(percentage = (marks/out_of)*100,
year = as.factor(year)) |>
group_by(year) |>
mutate(
year = year,
perc = mean(percentage)
)
View(yearly)
overall <- mean(yearly$percentage)
pharmd_grades[["Year2"]]
install.packages("table1")
library(table1)
table1(pharmd_marks)
table1(~marks| year, pharmd_marks)
table1(~marks + perce| year, pharmd_marks)
table1(~marks + perc| year, yearly)
renv::status()
plot(cars)