SHARE
TWEET

Untitled

a guest Jun 18th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. stemdata <- structure(list( #had to round some nums below for 100% bar
  2.  
  3. A = c(7, 17, 76),
  4. B = c(14, 10, 76),
  5. C = c( 14, 17, 69),
  6. D = c( 4, 10, 86),
  7. E = c( 7, 17, 76),
  8. F = c(4, 10, 86)),
  9.  
  10. .Names = c("Food, travel, accommodations, and procedures",
  11.          "Travel itinerary and dates",
  12.         "Location of the STEM Tour stops",
  13.          "Interactions with presenters/guides",
  14.          "Duration of each STEM Tour stop",
  15.         "Overall quality of the STEM Tour"
  16.          ),
  17. class = "data.frame",
  18. row.names = c(NA, -3L)) #4L=number of numbers in each letter vector#
  19.  
  20. attach(stemdata)
  21. print(stemdata)
  22. par(mar=c(0, 19, 1, 2.1)) # this sets margins to allow long labels
  23. barplot(as.matrix(stemdata),
  24.  
  25.     beside = F, ylim = range(0, 10), xlim = range(0, 100),
  26.     horiz = T, col=colors,  main="N=29",
  27.     border=F, las=1, xaxt='n', width = 1.03)
  28.  
  29. legend(16,9,  legend=c("Medium","High", "Very High"),
  30.  
  31. text(7, 2, "14%")
  32. text(19, 2, "10%")
  33. text(62, 2, "76%")
  34.  
  35. text(7, 3.2, "14%")
  36. text(22.5, 3.2, "17%")
  37. text(65.5, 3.2, "69%")
  38.  
  39. text(8, 4.4, "10%")
  40. text(55, 4.4, "86%")
  41.  
  42. text(3.5, 5.6, "7%")
  43. text(15, 5.6, "17%")
  44. text(62, 5.6, "76%")
  45.  
  46. text(9, 6.9, "10%")
  47. text(55, 6.9, "86%")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top