Hi All,
Banging my head against the wall with this one.
Writing an R script to hash using SHA256. That all works.
If I pick 2 columns, everything hashes and the columns are renames "V1, V2, etc"
If I pick 1 column, the data still writes but I'm given "apply(df, 1, f, output = "outputfile")"
My code is below:
So , when I select a single column it is treating it as a single element? (I hope that's right....)
I'm wondering if there is any way to alter my code to allow me to select both a single and multiple columns.
Any other info and workflow points can also be posted.
Thanks,
Jordan
Solved! Go to Solution.
NVM, I fixed it.....
For those wondering:
output <- as.data.frame(apply(df,1,f,output = 'outputfile')) needed to be changed to output <- as.data.frame(apply(df,2,f,output = 'outputfile'))
This let's you keep the column headers from the original file. By doing so, I can just rejoin on those fields.
Took a lot of tools out of my workflow by doing that..... a short lesson in R.....
If anyone wants to explain what those switches actually do (true/false of column names?) that would be cool also.
Thanks,
Jordan