Tony
Tony

Reputation: 324

Execute R files through an R script

I'm not sure how to properly ask this but basically I have a very populated single 400 line file on a kaggle competition I was working on and I want to split it up into multiple files (say one file is for data cleaning, another file is for feature engineering etc) in such a way that I can have one main file that will go from reading the csv files all the way to making the model predictions, how can I do that in R? Do I have to encapsulate the entire files into one function each and then use that? If so how does that work? Thanks in advance

Upvotes: 0

Views: 200

Answers (1)

Dave Ross
Dave Ross

Reputation: 703

You can use the source command and pass it the filename. try ?source

Upvotes: 1

Related Questions