Write a function to generate a histogram

Assignment Help Other Subject
Reference no: EM131439663

Assignment: Building your package

For this assignment, you will have to build a package. You will be grouped into teams of 4. Each student needs to upload on FASER:
- the archive with the source of the package (the tar.gz file)
- a 1 page document where they explain what their contribution was and how they worked in the team
- the presentation.

Everyone in the group should work on both the code and the presentation. The presentation will be given together as a group with exemplification on how the package works.

If two people worked on a function or the same block of code, please clarify who did what.

Do not forget to add relevant comments for each block of code or function that you write. 30 of the points for each part will be provided for supplying an optimal implementation (it includes comments, formatting, generality, sensible data structures, vectorisation vs for-loops etc.). In other words, if you provide a solution that works, but is not optimal you will not get more than 70 of the points associated with that task.

Description

There are several multiple-choice exams for students in Biological Sciences Department (in the test data we uploaded, we included 5 exams). Each exam has different number of questions, but students will only answer a subset of questions (randomly chosen from that exam). We uploaded eigth files:

- correct_answers_MODULE.dat contains the correct answers for each of the 5 exams.
- number_of_questions.tsv contains the number of questions each student needs to answer for each exam.

- students.tsv the ID of each student and their program ("Biological Sciences" or "Genetics").
- examsPerSubject.tsv a table with whether an exam will be taken by students of the "Biological Sciences" or "Genetics" programs or not.
Your package, should have the following functionality.

a) Generate exam sheets

- write a function generateStudentAnswersForExam which randomly generate answers for questions for a student. The function gets as input moduleID, studentID, totalNumberOfQuestions, numberOfQues- tionsToAnswer, writeToFile. If the last argument is a filename, write the data into that file, otherwise return the data.frame with the answers. The question numbers should be random and students can pottentially answer only to some of their questions. The file/data.frame should have 2 columns (question and answer) and these should be printed in the file. The answers to the questions can be a, b, c, d, e.
- write a function generateAllStudentsAnswersForExam which randomly generate answers for questions for all students taking the exam. The function gets as input the moduleID, num- ber_of_questions (number_of_questions.tsv), allStudentIDs (students.tsv), examsPerSubject (examsPerSubject.tsv) and writeToFile. The function should read this from files. Alternatively, you could write an additional function that receives these as data.frames. If the last argument is TRUE, then write the data into a file for each student, otherwise return a list with data.frames with the answers for each student.

b) Mark exams

- write a function markStudentsForExam(), which takes as input the directory with the correct answers for each exam, the exam files for each student and the name of the exam
- write a function markStudents(), which takes as input the directory with the correct answers for each exam and the exam files for each student.
Hint: You need to convert the number of correct answers to the mark taking into account the number of questions the students had to answer. The mark is an integer between 0 and 100.
- write a function to add a degree to each exam.
- "1st" for marks higher or equal to 70
- "2:1" for marks higher or equal to 60 and lower than 70
- "2:2" for marks higher or equal to 50 and lower than 60
- "3rd" for marks higher or equal to 40 and lower than 50
- "failed" for marks lower than 40

c) Plot results

- write a function to compute the degree to each student based on all their marks (the average over all exams they had to take). If a student failed one exam, they would have failed the year.
- write a function to generate a barplot and/or pie chart with the number/percentage of students that got a certain degree per exam.
- write a function to generate a barplot and/or pie chart with the number/percentage of students that got a certain degree overall.
- write a function to generate a scatterplot between the marks at two exams using only the students that took both exams. On the x-axis you should have marks for exam 1 and on the y-axis marks for exam 2.
- write a function to generate a line plot (with vertical lines) to display the marks ordered decreasingly for each student that took that exam. Use different colours for students studying Biological Sciences and Genetics, but do not use different colours for different marks.

d) Statistical analysis

- write a function to generate a histogram with the marks per exam.
- write a function to generate a histogram with the marks per subject (Biological Sciences or Genetics).
- write a function to perform a statistical analysis to test whether there is difference between the marks of Biological Sciences students and Genetics students for an exam
- write a function to perform a statistical analysis to test whether there is difference between the marks of Biological Sciences students and Genetics students overall

Additional points:

a) Writing manuals

b) Writing the vignette

c) Writing test units

d) Writing additional functions

The last 20 points of this assignment will be given for additional functionality of your package. In particular, we want to see you write new functions, beyond what we asked you to do but related to marking students exams.

Team 1:

- POP, ROMANA TABITA
- GEORGIOU, MERILIN
- LUDLAM, JAMES CHARLES
- ABU, LATIF TOMMIE


Team 2:

- BREZOIU, DAIANA-OANA
- THEOCHAROUS, GEORGIOS
- AKHURST, JENNIFER ELLEN
- CHAN, KHUNG HUAN


Team 3:

- DAVIS, ANDREW MICHAEL
- HADJICONSTANTI, ANDRIANI
- ZAMFIRESCU, ANA-MARIA
- MEHRETEAB, HANNAH TESFAY


Team 4:

- GRECO, ALESSANDRO PIO
- FARIAS GARCIA, PAULA
- MERRITT, RYAN JAMES
- ARALIYA KANKANAMLAGE, HASITHA LAKSHMAN


Team 5:

- BARRETO FRANCISCO, SARA
- GAVRIEL, CHRISTIANA
- PLUMMER, EDEN LAURICE
- HOLLOWAY, CATHAL JOHN


Team 6:

- BASTON, JANE LOUISA
- POVALL, CHELSEA
- ATHANASIOU, PANTELITSA
- RANDALL, TYLER JOHN MICHAEL


Team 7

- IRELEWUYI, OYETADE OLUWAMAYOKUN
- JORDAN, ALEXANDER MORRIS
- LEITHEAD, EMMA MELISSA JOY
- YIANNAKKOS, KONSTANTINOS

Reference no: EM131439663

Questions Cloud

What are some of the ethical issues that can arise : What are some of the ethical issues that can arise during a research study? What tools are available to research institutions to assure ethical compliance of the researchers?
Describe interpersonal conflict that not handled effectively : Watch one episode of one of the above television programs and identify and describe one interpersonal conflict that was not handled effectively.
Why is it important to know the variables within research : At this point you should be narrowing in on potential topics for your dissertation. The specifics may not be targeted but you should know the general area you wish to research. Using the topic area you are considering, explain how the measurement ..
Discuss operationalization choices and offers research : Babbie discusses operationalization choices and offers four research questions and ways to address them. Choose two of the questions and discuss how the applications mentioned are good choices or how they may not bring about the expected results.
Write a function to generate a histogram : write a function to compute the degree to each student based on all their marks (the average over all exams they had to take). If a student failed one exam, they would have failed the year.
Small groups of untrained volunteers : During the Revolutionary War, there was no organized medical or nursing corps; small groups of untrained volunteers cared for the wounded or sick in their homes, barns, or churches. Several nursing leaders were influential in making this change..
Analyze the data using the appropriate control chart : Analyze the data in Figure 11.22 and, using the appropriate control chart, determine whether the system is in control.
Personally observed an effective leader : Describe one situation in which you personally observed an effective leader, what made hi or her effective and why?
Provide overview of successful company that you have chosen : Provide a brief overview of successful company that you have chosen to benchmark for management best practice. Include specific examples relating to fundamental principles of management and the company's mission and vision statement.

Reviews

Write a Review

Other Subject Questions & Answers

  The nineteenth century part 1

The Nineteenth Century, Part 1

  Kants solution to the free-will problem relies

Kant's solution to the free-will problem relies on

  In what ways do children and youth ministries gain support

Childhood Issues: How might the church be best addressing these types of struggles? In what ways do children and youth ministries gain support with more challenging children, and what is thought of them and their families within the church

  Vincent was desperately ill with particularly virulent and

vincent was desperately ill with a particularly virulent and painful form of cancer.nbsphe was

  Write a short paragraph of three correct sentences

Write a short paragraph of three correct sentences (NB: using ONLY your own sentences) for each of the following sets of words. Principal (adjective) and principle (noun). Dependent and dependant

  Determine financial impacts in healthcare

HCM 400 Final Project Guidelines. What are the major forces affecting the delivery of healthcare today? Discuss these forces and their corresponding impacts on today's healthcare environment

  Find an expression for the electric and magnetic fields

Without loss of generality, assume the magnetic charge is located at the origin. Find an expression for the electric and magnetic fields at an arbitrary point in space in spherical coordinates.

  Analysis factor analysis cognitive theory

Applying ______ to traits identifies clusters of correlated items that seem to be measuring some common, underlying factor analytical theory developmental analysis factor analysis cognitive theory

  Create two more unit plans integrating science

Just create two more unit plans integrating science and math content of fractions, decimals, and/or percents. Ensure you have listed each of the science (NSES)) and math (NCTM) standards to include learning goals and objectives.It should be a sing..

  Capture the desired behavior using an equation

Capture the desired behavior using an equation, and then convert the equation to a circuit.

  With many types of counseling positions and work settings

with many types of counseling positions and work settings available how would you choose to develop your skills in one

  Study the preconscious and unconscious

I'm study the preconscious and unconscious. Is it possible for some unconscious thoughts in the mind to transfer over to the preconscious and even the conscious. It mentioned the need for food in my book, but couldn't that also fall under one of t..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd