Skip to content

Commit

Permalink
Fixes issue #6
Browse files Browse the repository at this point in the history
  • Loading branch information
blasee committed Dec 8, 2016
1 parent 26014db commit a4dd3bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
clifro 3.0-999
==========
## Bug Fixes
### Bug Fixes
* Requesting combined datatypes now works (issue #4). Note there is no default
plot method for this datatype as they are essentially combinations of other
datatypes.
* Fix bug that hung R if a datatype without any rows was requested -- Fixed issue #6

clifro 3.0 (10-August-2016)
==========
Expand Down
16 changes: 8 additions & 8 deletions R/cfQuery.R
Original file line number Diff line number Diff line change
Expand Up @@ -254,17 +254,17 @@ cf_query = function(user, datatype, station, start_date, end_date = now(tz),

head_names = lapply(data_list, names)
nrows = sapply(data_list, nrow)
data_list = data_list[!(nrows == 0)]
seq_ind = which(nrows != 0)

clifro_data_list = vector("list", length(data_list))
clifro_data_list = vector("list", length(seq_ind))

for (i in seq_along(data_list)){
for (i in seq_along(seq_ind)){
clifro_data_list[[i]] = new("cfData",
dt_name = dt_names[i],
dt_type = dt_types[i],
names = head_names[[i]],
row.names = paste(seq_len(nrows[i])),
as(data_list[[i]], "list"))
dt_name = dt_names[seq_ind[i]],
dt_type = dt_types[seq_ind[i]],
names = head_names[[seq_ind[i]]],
row.names = paste(seq_len(nrows[seq_ind[i]])),
as(data_list[[seq_ind[i]]], "list"))
clifro_data_list[[i]] = create_object(clifro_data_list[[i]])
}
if (!quiet)
Expand Down

0 comments on commit a4dd3bb

Please sign in to comment.