[R] How to get the length of an UTF-8 string

2008-11-06 Thread Fán Lóng
Hi there, I am intending to get the length of an UTF-8 string which contains some Japanese characters (let's say, rstr) in R language. I try to use the nchar(rstr) to get its length, however, it returns the "NA" for it contains some multi-byte characters. Is there any alternatives to return the l

[R] png() does not generate a 24 bit PNG file

2008-07-30 Thread Fán Lóng
Hi there, When I am using the png() function as the following to generate a png file on Mac OSX Tiger, I found that the bit depth is 32. But I want a 24 bit depth png. What should I do? > png(filename="/Users/usg/Desktop/new.png") > plot(1:20) > dev.off() To avoid using "cairo", and R-2.7.0 do

[R] Problem with compiling 64bit R(2.5.1) under HP-UX(ia64)

2007-11-01 Thread Fán Lóng
Hi there, We are trying to compile a 64bit version of R (2.5.1) on HP-UX (B.11.23 U ia64), but are running into some problems. This is our configure step: ../configure --prefix=/rnd/homes/lfan/R251 --enable-R-shlib CC="cc" CFLAGS="+z +DD64" CXX="aCC" CXXFLAGS="-b -lxnet +z +DD64" FC="f90" FCFLAG