[R] Different stack barplots - same color legends
Jim Lemon
drj|m|emon @end|ng |rom gm@||@com
Thu Nov 1 00:25:27 CET 2018
Hi Roberto,
Here is a snippet of code that translates the text responses of the
BIS-11 into numeric values. Note the reversal of the order in the
second item:
BIS$Q1<-as.numeric(factor(BIS$Q1,
levels=c("Almost","Often","Occasionally","Rarely/Never")))
BIS$Q2<-as.numeric(factor(BIS$Q2,
levels=c("Rarely/Never","Occasionally","Often","Almost")))
...
Jim
On Thu, Nov 1, 2018 at 8:57 AM P. Roberto Bakker
<robertobakker using gmail.com> wrote:
>
> Hi Rich,
>
> Thank you for your answer.
> The sentences are strings (likert scale: 'the situation is highly
> applicable to me' etc - in Dutch), or column labels; it may be confusing as
> it is in Dutch. Below I show you part of the dataframe with my annotation
> added (string/column lable) to give you an idea.
> I need to change the likert strings into numeric (1:5). And this is a
> challenge somehow.
> With dplyr, plyr it did not work.
> After I have the numeric version then I can stack them as suggested by
> David.
>
More information about the R-help
mailing list