0 votes
1 view
in R Programming by (5.3k points)

I want to split a line in an R script over multiple lines (because it is too long). How do I do that?

Specifically, I have a line such as


Is it possible to split the long path over multiple lines? I tried



with return key at the end of the first line; but that does not work.


1 Answer

0 votes
by (25.4k points)

To split code over multiple lines in an R script, you can use the paste0 function from the base package, whose syntax is given below:

paste0(..., collapse = NULL)

In your case:

R> setwd(paste0("~/a/very/long/path/here",




Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !