Given the following R code listing:
x<-c(1,4,2,1,2,3,1,2,3,2,1,2,4,3,2,1,2,1,2,1)
if variable x was a label that indicated the incoming classification, what would the correct data type to apply for visualization be? In other words, what should we make the x data type be? numeric, factor, string, logical? Please provide your reasoning as well as your selection.
Code is shown in Bold format.
x<-c(1,4,2,1,2,3,1,2,3,2,1,2,4,3,2,1,2,1,2,1)
barplot(x,main = "incoming classification" , col =
c("blue","pink","red","cyan"))
This, we got but from this representation. we can't identify, so we required to bind our data.
To Bind data - table(x)
To visualize data use
barplot(table(x),main = "incoming classification" , col = c("blue","pink","red","cyan"))
Tower 1 is representing frequencies of 1.
Tower 2 is representing frequencies of 2.
Tower 3 is representing frequencies of 3.
Tower 4 is representing frequencies of 4.
Get Answers For Free
Most questions answered within 1 hours.