vanao veneri
vanao veneri

Reputation: 1054

What does this notation mean in an expressoin function: *~~

I am working through an example from Aguinis, Gottfredson, & Culpepper (2013). They have provided some R code to plot an interaction. Here is the relevant section:

#Figure 3 Panel (b) - Reduced Y Scale
ylb=5;yub=6.5
curve(0+1*x,xlb,xub,xlab='LMX',ylab='Individual Empowerment',lwd=2,type='n',
ylim=c(ylb,yub))
for(i in 1:length(Wjs)){
    B0j=gammas[1]+gammas[3]*Wjs[i]
    B1j=gammas[2]+gammas[4]*Wjs[i]
    curve(B0j+B1j*x,xlb,xub,add=T,xlab='LMX',ylab='Individual Empowerment',lwd=2,lty=i)
}

labs=c(expression(W[j]==-1*~~SD),expression(W[j]==0*~~SD),expression(W[j]==1*~~SD))

legend(xlb,6.5,legend=c("Leadership Climate",labs[1],labs[2],labs[3]),bty='n',lty=c(0:3))

Note how the expression function is used to create the legend and there is this *~~ but in the resulting graphic there appears to be nothing more than empty space.
What is it for? What does it mean?

Upvotes: 3

Views: 114

Answers (1)

boshek
boshek

Reputation: 4406

You've guessed it! A tilde adds a space in expression(). See the table in ?plotmath for more information ... from there,

‘x*y’ juxtapose x and y

and

‘x ~~ y’ put extra space between x and y

Upvotes: 3

Related Questions