[TriLUG] R code problem
M.R. via TriLUG
trilug at trilug.org
Mon Sep 16 12:01:06 EDT 2019
In case there are some R users among the readership:
After reading in .csv file [It has the class: dataframe] and subsetting
the columns down to 16 from 71, I want to write a backup .csv with the
following code.
At one time something close to the code below worked, but now it does
not. Any ideas?
CODE SNIPPET:
pth.out =
"d:/dox/projects/politics/voter_stats/ncvoter_Statewide/vtr-data-results/"
setwd(pth.out)
#getwd() # testing the path
fyl.out = "vtr_all_01.csv" # 7.6 e6 records/rows, 71 variables/columns
# all of the above did work.
# now:
write.csv(fyl.out, fyl.out) # sep == ,
# fails: writes two cells or 30 bytes, not the entire dataframe.
And I do not know why
Any thoughts?
Mike R.
More information about the TriLUG
mailing list