in R, can I stop print(cat(“”)) from returning NULL? and why does cat(“foo”) return foo>

后端 未结 6 914
一整个雨季
一整个雨季 2021-02-18 20:00

If I enter

print(cat(\"\"))

I get

NULL

I want to use cat() to print out the progress of an R sc

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-18 20:21

    I have had the exact same problem. In a nutshell, cat() is a little wonky under R. You didn't go into great detail about how you are trying to use cat() but I would suggest looking at paste().

    ?paste

    I think it may be what you are looking for.

提交回复
热议问题