parklab / nozzle

Nozzle is a report generation toolkit for data analysis pipelines implemented in R.
http://gdac.broadinstitute.org/nozzle
67 stars 21 forks source link

Bug in alphanumeric sorting of tables? #26

Open auton1 opened 8 years ago

auton1 commented 8 years ago

There appears to be a small bug, presumably in the javascript, which means that alphanumeric columns in tables cannot be sorted when using Nozzle. Here is a small test example.

library("Nozzle.r1")
num = c(1,2,3,2.1)
txt <- c("aada","aaba", "aaca","aaaa")
alphanum <- c("aad1", "aab2", "aac3", "aaa4")
d <- data.frame(numeric=num, text=txt, alphanumeric=alphanum)
report <- newCustomReport("Alphanumeric sorting test")
t <- newTable(d, "Test table")
report <- addTo(report, t)
writeReport(report, "test")

In the html output, it is possible to sort the "numeric" and "text" columns, but the "alphanumeric" column does not sort correctly.

Any insight gratefully received.