On 9/19/2008 9:32 AM, Christian Hennig wrote:
Hi there,

any explanation for this?

intToUtf8(66)
Error in intToUtf8(66) : argument 'x' must be an integer vector
intToUtf8(c(66,55))
Error in intToUtf8(c(66, 55)) : argument 'x' must be an integer vector
intToUtf8(c(66,55),multiple=TRUE)
Error in intToUtf8(c(66, 55)) : argument 'x' must be an integer vector

Errr... 66 and c(66,55) are as integer vectorish as anything can be, aren't they?

No, they're numeric. "integer" here is a type, not the mathematical thing. This works:

intToUtf8(as.integer(c(66,55)))

The docs don't mention this requirement, and it does seem somewhat unnecessary; I'll look into it.



version
                _
platform       i686-pc-linux-gnu
arch           i686
os             linux-gnu
system         i686, linux-gnu
status
major          2
minor          6.0
year           2007
month          10
day            03
svn rev        43063
language       R
version.string R version 2.6.0 (2007-10-03)

You're lucky I didn't read to the end of your message: that's a pretty old version. Please test on current versions before reporting problems.

Duncan Murdoch

______________________________________________
[email protected] 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