Last active
July 13, 2021 16:47
-
-
Save ocaoimh/eb3041f7e5b6dacc885f03eb6b93ac5e to your computer and use it in GitHub Desktop.
Libraries and import data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import libraries | |
library(plyr) | |
library(dplyr) | |
library(likert) | |
library(grid) | |
library(ggplot2) | |
#Import data. You'll need to change the path here and point it to where your data are. | |
LXP.data <- read_excel("LMSdummyDataShort_en.xlsx") | |
# Convert data to factors - this allows us to use convert the text from the Excel file to perform caculations on it | |
LXP.data <- LXP.data[sapply(LXP.data, is.character)] <- lapply(LXP.data[sapply(LXP.data, is.character)], as.factor) | |
# And then back into a data frame | |
LXP.data <- as.data.frame(LXP.data) | |
## Now that we've got our data in the right format, we need to separate our data into two separate files. One for the items, and one for the cohorts. | |
# Remove schools from results/drop first column | |
LXP.data.items <- as.data.frame(LXP.data[-(1)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment