- 2
could someone please tell me how i should correct this?
message <- "Everything you can imagine is real." - Picasso print(message)
24 Answers
+ 3
cat("\"Everything you can imagine is real.\" - Picasso")
+ 4
Now you're missing the quotation marks that are part of the string. The escape character you need is \"
+ 2
The whole string has to be in quotation marks. You have to use escape characters for the quotation marks that are part of the string.
+ 2
Almost. You need another escape character at the beginning of the string.
+ 2
Not quite. Now you're missing the opening quotation mark of the string.
+ 2
cat() doesn't return anything (NULL). Therefore it doesn't make much sense to assign it to a variable.
+ 2
i hope you got a help
+ 1
No. I wrote it in a single line without using a variable.
+ 1
I did above, it's the code that starts with "cat".
+ 1
thank you very much for your help. it worked:)
+ 1
message = '"Everything you can imagine is real." - Picasso'
print (message)
0
thanks. I did that but it does not accept it:
message <- "Everything you can imagine is real/ - Picasso"
print(message)
0
you mean like this:
message <- "Everything you can imagine is real\" - Picasso"
print(message)
the result is different.
0
correct?
message <- \"Everything you can imagine is real\" - Picasso"
print(message)
0
this one?
message <- "\"Everything you can imagine is real\" - Picasso"
print(message)
0
Yes, that's it.
0
doesn't accept. the result is different
0
The dot after "real" is missing.
0
ok but the result is:
"\" every.... real. \"- picasso
0
it is almost correct but at the end i have picassoNULL