mltools icon indicating copy to clipboard operation
mltools copied to clipboard

Error : Unsupported index type: list

Open cregouby opened this issue 7 years ago • 0 comments

Hello,

Explore_dataset function seems very promising, It would be great to support lists in the 'explore_dataset' function, at least covering the standard dataset that are now included in dplyr :

library(dplyr)
explore_dataset(starwars)
[1] "Data has 87 rows and 13 columns"
Errorr : Unsupported index type: list

as well as

library(dataset)
explore_dataset(swiss)
[1] "Data has 47 rows and 6 columns"
Error in .subset(x, j) : type 'list' d'indice incorrect

A workaround may be available : turn the dataframe into data.table

library(data.table)
explore_dataset(storms %>% as.data.table)
[1] "Data has 10010 rows and 13 columns"
[[1]]
   name year month day hour lat long status category wind pressure ts_diameter hu_diameter
1:  198   41    10  31   24 403  856      3        7   31      124         109          35

[[2]]

Maybe a dataset type test and some conditional transformation into data.table could ease to solve it ? Thanks for your efforts ! Best Regards, C.R.

cregouby avatar Jun 26 '17 21:06 cregouby