{"action":"opened","issue":{"url":"https://api.github.com/repos/sjPlot/devel/issues/164","repository_url":"https://api.github.com/repos/sjPlot/devel","labels_url":"https://api.github.com/repos/sjPlot/devel/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/sjPlot/devel/issues/164/comments","events_url":"https://api.github.com/repos/sjPlot/devel/issues/164/events","html_url":"https://github.com/sjPlot/devel/issues/164","id":192347912,"number":164,"title":"sjp.likert - negative categories mixed-up","user":{"login":"JaromirCZE","id":6377556,"avatar_url":"https://avatars.githubusercontent.com/u/6377556?v=3","gravatar_id":"","url":"https://api.github.com/users/JaromirCZE","html_url":"https://github.com/JaromirCZE","followers_url":"https://api.github.com/users/JaromirCZE/followers","following_url":"https://api.github.com/users/JaromirCZE/following{/other_user}","gists_url":"https://api.github.com/users/JaromirCZE/gists{/gist_id}","starred_url":"https://api.github.com/users/JaromirCZE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JaromirCZE/subscriptions","organizations_url":"https://api.github.com/users/JaromirCZE/orgs","repos_url":"https://api.github.com/users/JaromirCZE/repos","events_url":"https://api.github.com/users/JaromirCZE/events{/privacy}","received_events_url":"https://api.github.com/users/JaromirCZE/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-29T17:31:20Z","updated_at":"2016-11-29T17:31:20Z","closed_at":null,"body":"Hi and thank you for this amazing package! My issue is with sjp.likert. The same code I already used in the past with success behaves strange now: It returns funny ordering of the negative (left) part of the scale, specifically, it puts the most negative category right to the 0 axis and the least negative quite to the left. So basically it returns the negative side of the scale in reverse order. \r\n\r\nSee the picture below for what I mean.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/6377556/20721034/bb610768-b661-11e6-802c-6b685d269f74.png)\r\n\r\nFor this picture, I used your example code:\r\n\r\n# prepare data for 6-category likert scale, 5 items\r\nlikert_6 <- data.frame()\r\n\r\nQ1 <- as.factor(sample(1:6, 500, replace = TRUE, prob = c(0.2,0.1,0.1,0.3,0.2,0.1)))\r\nQ2 <- as.factor(sample(1:6, 500, replace = TRUE, prob = c(0.15,0.15,0.3,0.1,0.1,0.2)))\r\nQ3 <- as.factor(sample(1:6, 500, replace = TRUE, prob = c(0.2,0.25,0.05,0.2,0.2,0.2)))\r\nQ4 <- as.factor(sample(1:6, 500, replace = TRUE, prob = c(0.2,0.1,0.1,0.4,0.1,0.1)))\r\nQ5 <- as.factor(sample(1:6, 500, replace = TRUE, prob = c(0.1,0.4,0.1,0.3,0.05,0.15)))\r\n\r\nlikert_6 <- data.frame(Q1, Q2, Q3, Q4, Q5)\r\n\r\n# create labels\r\nlevels_6 <- c(\"Very strongly agree\", \"Strongly agree\", \"Agree\",\r\n              \"Disagree\", \"Strongly disagree\", \"Very strongly disagree\")\r\n\r\n# create item labels\r\nitems <- c(\"Q1\", \"Q2\", \"Q3\", \"Q4\", \"Q5\")\r\n\r\n# plot 6-category-likert-scale, ordered by positive values,\r\n# in brown color scale\r\nsjp.likert(likert_6,  legend.labels = levels_6, axis.labels = items, \r\n           sort.frq = \"pos.asc\", digits = 0, show.prc.sign = TRUE,\r\n           values = \"sum.inside\")\r\n"}}
{"actor":{"display_login":"JaromirCZE"}}