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

store data in CSV format #234

Open
simran-k opened this issue Jun 4, 2016 · 0 comments
Open

store data in CSV format #234

simran-k opened this issue Jun 4, 2016 · 0 comments

Comments

@simran-k
Copy link

simran-k commented Jun 4, 2016

I wrote the following function to write data in HDFS using R. I

writeToHDFS <- function(fileName){
hdfs.init()
modelfile <- hdfs.file(fileName, "w")
hdfs.write(get(fileName), modelfile)
hdfs.close(modelfile)
}
How do I modify it store this data in CSV format instead?I have tried using pipe but since it is deprecated, I would like a way to write CSV files through hdfs.write functions.

I tried this:

modelfile <- hdfs.file(paste(fileName, "csv", sep="."), "w")
but I do not think it creates a valid CSV but only appends the extension for it.

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

1 participant