Ask Your Question
3

In the R language, what is the method for merging paste() and print() functions?

asked 2023-06-29 18:26:05 +0000

lalupa gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-06-29 18:35:01 +0000

huitzilopochtli gravatar image

The method for merging the paste() and print() functions in R is to use cat() function. The cat() function takes one or more R objects and concatenate them, separating them by a space. It also prints the result to the console by default.

For example:

x <- "Hello"
y <- "world"
cat(paste(x, y))

Output:

Hello world
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-29 18:26:05 +0000

Seen: 9 times

Last updated: Jun 29 '23