1

Here is the data

x <- c(0:10)
y <- c(10:0)
test <- paste(x, y, sep="/")
data.test <- data.frame(x,y,test)

The current output for data.test is 0/10 1/9 2/8 ... I want to make it "0/10 "1/9 "2/8 ...

Rspacer
  • 2,369
  • 1
  • 14
  • 40
  • `test <- paste(as.character(x), as.character(y), sep="/")` shall do the trick – Grzegorz Sapijaszko Mar 06 '22 at 22:44
  • When you do `paste(paste0("\"", x), y, sep = "/")` you will notice that the output looks like `"\"0/10" ...`. That backslash is only printed. To see the result, wrap your call in `cat()`. – markus Mar 06 '22 at 22:46

0 Answers0