R Script Sharing

Hello,

 

Appreciate if there are community members to please share a sample of R Script which you are able to run from Dataflow?

 

I have read the documentation from https://knowledge.domo.com/Prepare/Magic_Transforms/ETL_DataFlows/ETL_Actions%3A_Scripting

But i'm unclear on the parameters to call a specified column.

 

[Sample]

# Import the domomagic library into the script.
library('domomagic')

# Import Text mining library
library('tm')

# read data from inputs into a data frame
input1 <- read.dataframe('Dataset Foo', colClasses)

 

# remove extra whitespace
# input1 <- tm_map(input1, stripWhitespace)

 

# write a data frame so it's available to the next action
write.dataframe(input1)

===

Error from console 

Error in read.dataframe("Dataset Foo", colClasses) : 
  object 'colClasses' not found

 

Many thanks

J

Comments