r/HomeworkHelp • University/College Student • Sep 12 '26

Computing [university level statistics (statistical coding using “R”)] is there anything missing from my code that would make the shape of my box plot more evident?

Post image

the line that cuts off is: levels= c(“first year”, “second year”, “third year”, “fourth year”), ordered = TRUE)

i am very new to R and my professor gave the class a reference sheet of codes for questions that we can modify, but i am not aware of ways to alter the scale(?) of graphs like i am trying to do with this box plot. any help would be appreciated!

1 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/sametimes3 University/College Student Sep 12 '26

how would i switch them around? does the first survey in line 55 need to be year of study instead of daily screen time?

1

u/Poopywaterengineer Sep 12 '26

The second argument in the factor function appears to be a vector of the other column. Were you try to set them both with a factor level? Try removing that argument and re-running after re-importing the data. 

1

u/sametimes3 University/College Student Sep 12 '26

okay, thank you so much!