See example for the element order in the vectors :
messagebox.png
To get the menu, just use the following code:
vlabel<-'Wrong matrix dimension !'ans<-messagebox(vlabel)
References
Lawrence M.F.,Verzani J., (2012) Programming Graphical User Interfaces in R,CRC Press Taylor & Francis Group