The file "household_power_consumption.txt" is too large to upload. So we assume that the file is already in your local directory before running the R files attached.
The file new_data.txt is generated by plot1.R in which we extract the two days data into a new file. Therefore, make sure you have run the plot1.R and generate the file before running the plot2.R, plot3.R, plot4.R.
The four plot files are already attached. But you could delete them and run the r files again and generate them.