1

I have set up gmailR to share the data frames through emails. I am getting below error. Please help

email <- send_message(mime(from="xxxx@yyyy.com", to="xxxx@yyyy.com",
                          subject="Text Email Testing", body = pander_return(pander(head(iris, 3)))))

Auto-refreshing stale OAuth token.
Warning message:
In charToRaw(x) : argument should be a character vector of length 1
all but the first element will be ignored
Domains Barter
  • 153
  • 1
  • 5

1 Answers1

2

Try

paste(pander_return(pander(head(iris, 3))), collapse="\n")

length(pander_return(pander(head(iris, 3)))) is 24, but the function seems to expect a character vector of length 1. paste concatenates it, using a line break \n as a seperator.

lukeA
  • 53,097
  • 5
  • 97
  • 100
  • Thanks a lot !! It's working BUT the columns width is a problem now. My table is distorted. – Domains Barter Mar 08 '16 at 15:13
  • View your email in an email client that supports a [nonproportional font](https://en.wikipedia.org/wiki/Monospaced_font) or send it as
    -formatted HTML.
    – lukeA Mar 08 '16 at 15:40