We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a = data.table(y = list(0), opt_x = list(list(z_1 = 100, z_2 = 200))) unnest(a, "opt_x") # > x y z_1 z_2 # > 1: 1 0 0 0 a = data.table(z = list(0), opt_x = list(list(z_1 = 100, z_2 = 200))) unnest(a, "opt_x") # > x z z_1 z_2 # > 1: 1 0 100 200
The bug occurs when the unnested columns are added to the data.table with rcbind since y is used as the variable name for the unnested columns.
rcbind
y
rcbind function (x, y) { assert_data_table(x) assert_data_table(y) if (ncol(x) == 0L) { return(y) } if (ncol(y) == 0L) { return(x) } if (nrow(x) != nrow(y)) { stopf("Tables have different number of rows (x: %i, y: %i)", nrow(x), nrow(y)) } dup = intersect(names(x), names(y)) if (length(dup)) { stopf("Duplicated names: %s", str_collapse(dup)) } x[, `:=`(names(y), y)][] }
The text was updated successfully, but these errors were encountered:
fix bug in rcbind (#42)
f3b4453
Thanks, should be fixed now.
Sorry, something went wrong.
No branches or pull requests
The bug occurs when the unnested columns are added to the data.table with
rcbind
sincey
is used as the variable name for the unnested columns.The text was updated successfully, but these errors were encountered: