how do we install psych packages
install.packages(“psych”)
library(psych)
how do we make a histogram
hist($)
how do we make a density plot
dens<-density(_$)
plot(dens)
what is the order we should investigate skewness
-ss
-dens
histogram
how do we make boxplot and 2
boxplot($)
boxplot($,$)
how do you make boxplot according to condition
boxplot($~$)
how do we change the colour of the boxplot
($~$, frame=FALSE)
col=c(“ “ ,” “)
how do we name axis
ylab “____” , xlab “___”
main= “ “- title
namesc(“No, Yes”)
To clean our data we need to use the subset() function write this according to the practicaldata name set
practicaldata_filtered<- subset(practicaldata,ResponseId!= “Response ID”)
You may have noticed that the previous command assigned (‘<-‘) the subset to a new object called ‘practicaldata_filtered’. ____________ to inspect this new object and check that in this new object, the first row from before is gone!
View(practicaldata_filtered)
How would we delete the second row
practicaldata_filtered <- subset(practicaldata_filtered, ResponseId !=”{"ImportId":"_recordId"}”)
how can we change variable names
datasetname_filtered$variablechanged
How do we change the variable names so they arent numbers with variables
datasetname_filtered$variable <- as.numeric(datasetname_filtered$variable)
sometimes we have to reverse scores so they are not netagitve , how is this done
example :
practicaldata_filtered$RSE_1_R <- 5-practicaldata_filtered$RSE_1)
what is the way to attach a data set
attach(function)