Skip to content
New issue

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

Deleted columns #73

Open
Make42 opened this issue Apr 30, 2015 · 1 comment
Open

Deleted columns #73

Make42 opened this issue Apr 30, 2015 · 1 comment

Comments

@Make42
Copy link

Make42 commented Apr 30, 2015

Hello, the data.frame sales_inspected has 11 columns. Here is the code I execute:

Putting the data.frame into hdfs:

output(input(as.data.frame(sales_inspected)), "/data/sales_inspected")

Processing the data and putting the result into hdfs:

output(bind.cols(input("/data/sales_inspected"), Unitval=Val/Quant), "/data/sales.out")

Loading the result into R:

sales.out <- as.data.frame( input("/data/sales.out") )

Processing the data and putting it into R:

sales.out2 <- input("/data/sales_inspected") %|% bind.cols(Unitval=Val/Quant) %|% as.data.frame

Comparing the results:

identical(sales.out,sales.out2)

It turns out, that during the bind.cols of the second way of doing it, leads to the loss of two columns. So sales.out has 12 columns (correctly), while sales.out2 only has 10 columns. Why is that? What went wrong?

@piccolbo
Copy link
Collaborator

Since you don't provide any test data, I used my own and simplified your program a little bit

ncol(as.data.frame(bind.cols(input(mtcars), Unitval=carb/cyl)))
input(mtcars) %|% bind.cols(Unitval=carb/cyl) %|% as.data.frame %|% ncol

12 in either case. You need to give me more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants