Connecting both R scripts, errors remain