Answer To: PROJECT PRE-INSTRUCTIONS & NOTES TO EXPERTPlease read this first before starting on the...
Banasree answered on Mar 21 2023
Q1Code:
# Create data frame
data <- data.frame(
response = c("Useful", "Neither useful nor not useful", "Not useful"),
count = c(15, 3, 2)
)
# Create bar plot
barplot(data$count, names.arg = data$response, xlab = "Response", ylab = "Count", main = "Response Survey Results")
Output:
Q2Code:
# Define survey_data variable
survey_data <- c("Agree", "Disagree", "Agree", "Neutral", "Strongly Agree", "Disagree")
# Create table of survey responses
table(survey_data)
# Create bar plot of survey responses
barplot(table(survey_data), main = "Survey Responses")
Output:
Q3Code:
# Create data frame
data <- data.frame(
response = c("Strongly agree", "Somewhat agree", "Neither agree nor disagree", "Somewhat disagree", "Strongly disagree"),
count = c(11, 4, 3, 2, 0)
)
# Create bar plot
barplot(data$count, names.arg = data$response, xlab = "Response", ylab = "Count", main = "Question Tour Feedback")
Output:
Q4Code:
# Create vector of ages
ages <- c("18-24 years old", "25-34 years old", "35-44 years old", "45-54 years old", "55-64 years old", "65+ years old")
# Create vector of counts
counts <- c(4, 3, 4, 4, 2, 3)
# Create table of age distribution
table(ages, counts)
# Create pie chart of age distribution
pie(counts, labels = ages, main = "Certification Age Distribution")
Output:
Q5Code:
# Create a vector of response options
options <- c("Single-answer MCQs", "Multiple-answer MCQs", "Dropdown list MCQs", "Select box MCQs")
# Create a vector of counts
counts <- c(16, 1, 2, 1)
# Create a bar plot of the responses
barplot(counts, names.arg = options, main = "Preferred MCQ Type", xlab = "MCQ Type", ylab = "Count")
Output:
Q9Code:
# Create a matrix of response data
data <- matrix(c(55, 5, 0, 15, 25, 30, 60, 0, 5, 5, 20, 20, 20, 10, 50, 35, 20, 30, 10, 25), ncol = 5, byrow = TRUE)
colnames(data) <- c("1", "2", "3", "4", "5")
rownames(data) <- c("Single-answer MCQs", "Multiple-answer MCQs", "Single-line text entry Qs", "Essay box text entry Qs", "Rank order Qs")
# Create a stacked bar plot of the responses
barplot(data, beside = FALSE, legend = rownames(data), col = rainbow(ncol(data)), main = "Question Types Ranking", xlab = "Rank", ylab = "Percentage")
Output:
Q10Code:
# Creating a matrix table using the data
data <- matrix(c(65, 25, 10, 0, 0,
50, 25, 5, 20, 0,
55, 25, 15, 5, 0), nrow = 3, byrow = TRUE)
colnames(data) <- c("Strongly agree", "Somewhat agree", "Neither agree nor disagree", "Somewhat disagree", "Strongly disagree")
rownames(data) <- c("I can build the kind of questions necessary to collect the feedback I need...",
"Qualtrics provides a flexible survey tool that can be configured to meet my...",
"I can use a variety of question types to accomplish my research goals")
# Bar plot of the matrix table
barplot(data, beside = TRUE, legend.text = TRUE,
main = "Survey Feedback",
xlab = "Survey Questions",
ylab = "Percentage",
col = c("darkgreen", "green", "yellow", "red", "darkred"))
Output:
Q12_part 1Code:
# Create a data frame with the survey...