New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using item names as item.labels #6
Comments
Thanks for the feature request! You’re right, this graph should be able to
use the item names directly, and should be more flexible in general. I like
your suggestion for a TRUE/FALSE flag. I pushed a commit to the develop
branch that I think will meet your use case, with some additions for other
possible uses. The new version has the following changes:
- added parameter label.items
- when NULL (default) or FALSE, is 1:[number of items]
- when TRUE, takes the item labels from the row names
- can also be a list of item names
- added parameter label.steps
- when NULL (default) or FALSE, is 1:[number of levels]
- when TRUE, takes the step labels from the column names
- can also be a list of step names
- added parameter label.sep with default value “.”
- added parameter thr.lab.sep with default value “ | “
I also added in some flexible parameter lists that I created recently for
itemModern (also available in the develop branch). The goal of these lists
is to allow people to access the parameters of the points/text/etc.
functions directly. So, for itemClassic, I added:
- thr.lab.par (pass ‘text' parameters)
- axis.logits.par (pass ‘axis' parameters)
- logits.text.par (pass ‘mtext’ parameters)
Example code:
library(devtools)
install_github("david-ti/wrightmap",ref = "develop")
fpath <- system.file("extdata", package="WrightMap")
model1 <- CQmodel(p.est = file.path(fpath,"ex2.eap"), show = file.path(fpath
,"ex2.shw"))
wrightMap(model1,item.side = itemClassic) # default
wrightMap(model1,item.side = itemClassic, label.items = TRUE) # use item
names
wrightMap(model1,item.side = itemClassic,label.items = LETTERS[1:10],
label.steps = c("(a)","(b)"), label.sep = "", thr.lab.sep = ", ",thr.lab.par
= list(font = 2), axis.logits.par = list(at = seq(from = -3, to = 4, by = .5
)), logits.text.par = list(cex = .6, line = 2)) # custom parameters
This last gives the following Wright Map:
Let me know if you have any other requests! We are always glad to find
people using our package and interested in their use cases.
Rebecca
On March 21, 2018 at 7:52:04 PM, LCisannoyed (notifications@github.com) wrote:
Currently the WrightMap uses a sequential list for item.labels (01.1 , 02.1
, 03.1 , ...).
These labels have no bearing on the actual name of the item. Additionally
this can get pretty confusing if an item has already been removed.
Could the itemClassic function be amended to allow a user to use their own
item names? something like "item.names.labels=TRUE/FALSE "
Thanks
Before:
In example below, item 2 was removed leaving 44 items. The first chart
(original WrightMap code) displays "02.1" as an item (its actually item 3).
[image: image]
<https://user-images.githubusercontent.com/8520783/37748079-71e7afc2-2dd6-11e8-8466-154d6de3324e.png>
After:
Using the item names means that we have no confusion about item 2 / item 3.
[image: image]
<https://user-images.githubusercontent.com/8520783/37748099-95686810-2dd6-11e8-8773-314545abd3da.png>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AESTYZ7HVVwmm2vuBtI1wnvRk5ZkOkxaks5tgxHUgaJpZM4S2Xux>
.
|
Awesome! thanks for this |
@rfreund This is great! However, I seem to be losing the functionality in itemClassic to set show.axis.logits = "L" and have the logits axis on the left. Do you know why this might be happening? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently the WrightMap uses a sequential list for item.labels (01.1 , 02.1 , 03.1 , ...).
These labels have no bearing on the actual name of the item. Additionally this can get pretty confusing if an item has already been removed.
Could the itemClassic function be amended to allow a user to use their own item names? something like "item.names.labels=TRUE/FALSE "
Thanks
Before:

In example below, item 2 was removed leaving 44 items. The first chart (original WrightMap code) displays "02.1" as an item (its actually item 3).
After:

Using the item names means that we have no confusion about item 2 / item 3.
The text was updated successfully, but these errors were encountered: