Permalink
Browse files

solve weirdness with data.frames

example:
slopegraph(data = as.data.frame(WorldPhones[,1:3]), mymain = "YEARS", mar=c(5, 5, 5, 5))

now works properly
  • Loading branch information...
1 parent dbe709a commit 0a767fc270ef027499cf270712708b582dc75880 @davharris committed Jul 19, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 slopegraph.r
View
@@ -23,6 +23,7 @@
slopegraph <- function(data, label.cex=0.9, axis.cex=0.9, digits = 2, rounding.method = NULL, mymain = "slopegraph", ...) {
require(plotrix)
+ data = as.matrix(data)
if(!is.null(rounding.method)){
fmt <- .rd.method(rounding.method, width, digits)
data.annot <- sprintf(fmt, data)

0 comments on commit 0a767fc

Please sign in to comment.