Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Single Column output as Data Frame

JordyMicheal
11 - Bolide

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:

Capture.JPG

 

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

1 REPLY 1
JordyMicheal
11 - Bolide

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 

Labels