briandk / granovaGG

Bob Pruzek and Jim Helmreich's implementation of Elemental Graphics for Analysis of Variance
Other
15 stars 4 forks source link

Remove explicit names() calls in granovagg.ds InitializeGgplot #129

Closed briandk closed 13 years ago

briandk commented 13 years ago

@rmpruzek points out that when granovagg.ds is passed data where the column names have more than one word, there is a text-parsing error:

> set.seed(1001)
> test.data <- data.frame(x = rnorm(12), y = rnorm(12))
> colnames(test.data) <- c("Word One", "Word Two")
> granovagg.ds(test.data)
                              Summary Statistics
n                                         12.000
Word One mean                             -0.123
Word Two mean                              0.321
mean(D = Word One - Word Two)             -0.444
SD(D)                                      1.788
Effect Size                               -0.248
r(Word One, Word Two)                     -0.170
r(Word One + Word Two, D)                  0.262
Lower 95% Confidence Interval             -1.580
Upper 95% Confidence Interval              0.692
t (D-bar)                                 -0.861
df.t                                      11.000
p-value (t-statistic)                      0.408
Error in parse(text = x) : <text>:1:6: unexpected symbol
1: Word One
        ^

The proposed patch should fix that error.