Questions involve the dataset school.data, which is already loaded in the script on your right. This dataset contains some information about every school in Australia (primary and secondary, in 2019). Your tasks are: 1. Display the first 10 rows of the dataset school.data, and have a look at the variables names. 2. Use the variable Total. Enrolments to find the total number of students in Australia, and place the result in a variable named n. Hint: you may need to use argument na.rm in function sum(). 3. Create a two-dimensional frequency table called geo.table where rows represent Geolocation and columns represent State. Each cell of the table should give the number of schools within a given combination of Geolocation and State. 4. Use the package dplyr to create a new dataset called NSW.no.boys. This dataset is a subset of school.data where: • You keep only schools of School. Type "Secondary" from State "NSW" which have 0 Boys. Enrolments. • You keep only two columns: the first is School. Name and the second is Total. Enrolments. • The dataset is sorted by descending order of Total. Enrolments, meaning that the top row is the school with the largest Total. Enrolments. 5. Create a box plot which displays variable ICSEA (which represents a "Index of Community Socio- Educational Advantage") as function of variable State. Change the color of the boxplot to 'lightgreen'. The plot should have as main title ICSEA by State, x axis labeled as State and y axis labeled as ICSEA. Place your plot in a R object called ICSEA.boxplot (you can do this with the usual assignment symbol <-). Hint: the expected result should look like this:
State ACT NSW NT QLD SA TAS VIC WA 8 200 400 O O ICSEA 009 O XOXOXOC*** 800 OO OOODED OD O 00000000000 O O -CODO OBDA HICHOD DO 1000 1200 (00) 4 O O ICSEA by State
6. Briefly comment the plot obtained in part 5. Is there any interesting finding stemming from this plot? Use the # symbol to put your comments directly in your code.
This Week's This Week's Questions involve the dataset school.data, which is already loaded in the script on your right. This dataset
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am