ropensci/rnoaa — pull request #68 by edweber (2014-11-06 17:26:50+00:00)
Title: fixed read_table fxn for single-column tables

There is a bug in the read_table fxn when a single column is queried. To see the problem, try (e.g., which cruises are available in this table?):

erddap_table(x='erdCalCOFIeggcntpos', store=memory(),
fields=c('cruise'), orderby='cruise', distinct=TRUE)

This is caused by the "[-1,]" used to remove the initial blank record in the read statements. Two changes are needed. First, that blank line doesn't occur in single-column tables. So the read functions need to use "blank.lines.skip=FALSE" to prevent a valid row from being removed in single-column queries. Second, need to add "drop=FALSE" to the bracket selection so that single-column results aren't reduced to vectors.