You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: