On Sun, Nov 17, 2013 at 6:24 PM, Barry Rowlingson
<b.rowling...@lancaster.ac.uk> wrote:
> On Sun, Nov 17, 2013 at 10:42 PM, R. Michael Weylandt
> <michael.weyla...@gmail.com> <michael.weyla...@gmail.com> wrote:
>  Did you mean to do 'nchar(x)' to show that \" was one character?
> 'length' gives the number of elements in a vector, which in this case
> is also one.
>
>  > x=c("\"", '\'')
>  > length(x)
>  [1] 2
>  > nchar(x)
>  [1] 1 1

D'oh! Fair enough,

MW

______________________________________________
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.

Reply via email to