Warning Midterm Exam (Part 2 of 2) on Jan 9, 2025, 3:30–5:30 PM. at RB3208 Total Score: 15% (5% Multiple Choice, 10% Writing R Code). Topics: - Data Structure: Data Frame - Data Wrangling - Data Structure: XTS Project 1: 10% Create your CV using Quarto and upload the HTML and related files to CMU’s personal web hosting. 1. Submit your HTML file to your CMU personal web hosting. 2. Zip your project folder. The zip file should include the .qmd file, any image files, and CSS files (if used). I will render your files to compare them with your URL. Send your URL and the zip file to my email: somsak.c@icdi.cmu.ac.th before midnight on January 5, 2025. Content Requirements: Your CV must include: - Your picture - Your birthday - Your education - Your hobbies - Links to at least 2 social media platforms - Your future plans Criteria: 1. The HTML file and .qmd file must match. 2. Use a theme. 3. Use CSS. 4. Include a table. 5. Include a tabset 6. Include a video. 5. Use icons from Font Awesome (e.g., Facebook, YouTube, LINE, WeChat, etc.). 8. Modify the layout creatively.
Additional Note: Some of your score will be determined by votes from your peers.
Multiple Choices: Matrices
Questions
What function is used to create a matrix in R?
What is the output of matrix(1:6, nrow = 2, ncol = 3)?
Which function can bind matrices or vectors as columns to create a new matrix?
If mat <- matrix(1:9, nrow = 3), what does mat[2, 3] return?
What will dim(matrix(1:4, nrow = 2, ncol = 2)) return?
Which function would you use to get the transpose of a matrix in R?
If mat <- matrix(1:4, nrow = 2), what will mat %*% mat return?
What is the result of ncol(matrix(1:6, nrow = 2))?
Which of the following will convert a matrix to a vector?
What does diag(matrix(1:9, nrow = 3)) return?
If m <- matrix(1:12, nrow = 3, byrow = TRUE), what will m[2, ] return?
What function would you use to get the inverse of a matrix in R?
If mat <- matrix(c(2, 4, 3, 8), nrow = 2), what is the output of apply(mat, 1, sum)?
What will nrow(matrix(1:10, nrow = 5)) return?
Which of the following functions will extract the diagonal elements of a matrix?
If A is a matrix, what does t(A) %*% A represent?
If mat <- matrix(1:9, nrow = 3), what does mat[ , c(1, 3)] return?
Which function reshapes a matrix into a vector by filling it column-wise?
If A <- matrix(1:4, nrow = 2) and B <- matrix(4:1, nrow = 2), what does A * B do?
If mat <- matrix(1:6, nrow = 2), what does colSums(mat) return?
If m <- matrix(1:9, nrow = 3), what is the output of m[ , -2]?
What will rowMeans(matrix(1:6, nrow = 2)) return?
If A <- matrix(1:4, nrow = 2), which command returns the determinant of A?
What will dim(matrix(1:12, ncol = 4)) return?
If mat <- matrix(1:12, nrow = 3), what does mat[mat > 5] return?
Which function extracts only the lower triangular part of a matrix in R?
If mat <- matrix(1:9, nrow = 3), what does sum(mat) return?
What does is.matrix(c(1, 2, 3)) return?
If A <- matrix(c(1, 2, 3, 4), nrow = 2), which of the following commands will return TRUE if A is a square matrix?
If A <- matrix(1:9, nrow = 3), what does A[ , 3] return?