Try:
paste(c("a", "b", "c"), collapse = "\n")
On Mon, Aug 29, 2011 at 8:56 PM, Ben qant <ccquant@gmail.com> wrote:
> Hello,
>
> Does anyone know how to convert this:
> > msg
> [1] "a"
> [2] "b"
> [3] "c"
>
>
> To:
>
> > msg
> "a
> b
> c"
>
> In other words, I need to convert a character vector to a single string
> with
> carriage returns for each row.
>
> Functionally, I'm attempting to send an email of a character vector in
a
> way
> that is readable in the email body. I can only input one string as the
> message body parameter. I'm using rJython to send the email because I
need
> authentication.
>
> Thanks!
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O
[[alternative HTML version deleted]]