# NOT RUN {
tmpDf <- data.frame(means = c(1, 2, 3),
sds = c(1.5, 3, 5),
ns = c(2, 4, 10),
labels = c('first', 'second', 'third'),
color = c('purple', 'grey', 'orange'));
### A simple diamond plot
meanSDtoDiamondPlot(tmpDf);
### A simple diamond plot with labels
meanSDtoDiamondPlot(tmpDf, labels=4);
### When specifying column names, specify column
### names for all columns
meanSDtoDiamondPlot(tmpDf, means='means',
sds='sds', ns='ns',
labels='labels');
### A diamond plot using the specified colours
meanSDtoDiamondPlot(tmpDf, labels=4, colorCol=5);
### A diamond plot using automatically generated colours
### using a gradient
meanSDtoDiamondPlot(tmpDf,
generateColors=c('green', 'red'));
### A diamond plot using automatically generated colours
### using a gradient, specifying the minimum and maximum
### possible values that can be attained
meanSDtoDiamondPlot(tmpDf,
generateColors=c('red', 'yellow', 'blue'),
fullColorRange=c(0, 5));
# }
Run the code above in your browser using DataLab