[R] R suitability for development project
Eric Langley
eric at abeo.us
Tue Sep 4 13:34:03 CEST 2012
Jim,
Thank you again for your response. The integer conversion looks good.
You wrote:
> I think you may be doing something here that you don't intend. The point of
> plots like this is to transform numeric values into lengths or areas. If you
> don't maintain the same metric throughout the plot, the relationship between
> the two is lost. If you were using vertical lines to indicate the
> transformed mean ranks of the items, they could be placed at the appropriate
> positions. As you use different edges of the bars to place them, let's see,
> your bars are about 90 units wide so there would be about a 180 unit offset
> between positive and negative transformed mean ranks. Are you sure that you
> want to do this?
I note:
Yes, the bars are half the width of the axis. In this model there are
14 questions to determine the ranking. My concept is the all of the
Items are ranked. Even though some Items may not be ranked in some
positions, 1,2,4 or 4, they still receive a rank. Therefore with 14
ranks all of the bars are the same width. There position along the
horizontal axis is determined by the right edge of the bar for highest
rank.
~eric
On Tue, Sep 4, 2012 at 5:31 AM, Jim Lemon <jim at bitwrit.com.au> wrote:
> On 09/03/2012 11:18 PM, Eric Langley wrote:
>
> <chomp>
>
>>
>> I note:
>> Is it possible to have the output as an integer where 99 is the highest
>> score?
>>
> It certainly is. The mean ranks are:
>
>
> Item2 Item3 Item4 Totals
> 1.571429 1.642857 2.857143 3.928571
>
> To make the highest score 99 (meaning the score for the highest ranked item)
> and the lowest score -99 as on your examples:
>
> # first convert high ranks to high numeric scores
> revmeanranks<-4-meanranks
> revmeanranks
> Item1 Item2 Item3 Item4
> 2.428571 2.357143 1.142857 0.071429
> # scale the score to the desired range
> library(plotrix)
> rescale(revmeanranks,c(-99,99))
> Item1 Item2 Item3 Item4
> 99.000000 93.000046 -9.000015 -99.000000
> # then just round or truncate your values to get integers
>
> <chomp>
>
>
>> I note:
>> The look I am aiming to achieve (as shown here:
>> http://community.abeo.us/sample-graphs/ ) is a relative position
>> within the middle zero based horizontal axis. The mean is not
>> required. Since all bars are 14 units long the upper and lower values
>> note where the end of each bar should align, either to the right for
>> Highest or to the left for Lowest. The third graph shows both.
>>
>> ~eric
>>
> I think you may be doing something here that you don't intend. The point of
> plots like this is to transform numeric values into lengths or areas. If you
> don't maintain the same metric throughout the plot, the relationship between
> the two is lost. If you were using vertical lines to indicate the
> transformed mean ranks of the items, they could be placed at the appropriate
> positions. As you use different edges of the bars to place them, let's see,
> your bars are about 90 units wide so there would be about a 180 unit offset
> between positive and negative transformed mean ranks. Are you sure that you
> want to do this?
>
> Jim
>
--
Eric Langley
Founder
eric at abeo.us
404-326-5382
More information about the R-help
mailing list