[R] error with demo in gsubfn on Mac; Re: string parsing

Gabor Grothendieck ggrothendieck at gmail.com
Wed Feb 16 22:13:32 CET 2011


On Wed, Feb 16, 2011 at 3:42 PM, David Winsemius <dwinsemius at comcast.net> wrote:
>
> On Feb 16, 2011, at 3:25 PM, Gabor Grothendieck wrote:
>
>> On Tue, Feb 15, 2011 at 5:20 PM, Sam Steingold <sds at gnu.org> wrote:
>>>
>>>
>>
>> Check the example at the end of section 2 of the gsubfn vignette:
>>
>> http://cran.r-project.org/web/packages/gsubfn/vignettes/gsubfn.pdf
>
> OK. I'm impressed. So I loaded gsubfn to do some self study and got:
>
>> require(gsubfn)
> Loading required package: gsubfn
> Loading required package: proto
>> demo("gsubfn-si")
>
>
>        demo(gsubfn-si)
>        ---- ~~~~~~~~~
>
> Type  <Return>   to start :
> Error in source(available, echo = echo, max.deparse.length = Inf,
> keep.source = TRUE) :
>  invalid multibyte character in parser at line 8
>> sessionInfo()
> R version 2.12.1 (2010-12-16)
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] splines   stats     graphics  grDevices utils     datasets
> [7] methods   base
>
> other attached packages:
> [1] gsubfn_0.5-5    proto_0.3-8     rms_3.1-0       Hmisc_3.8-3
> [5] survival_2.36-2 sos_1.3-0       brew_1.0-4      lattice_0.19-13
>
> loaded via a namespace (and not attached):
> [1] cluster_1.13.2 grid_2.12.1    tools_2.12.1
>

I can't reproduce this on my Windows system. I assume its a character
set issue associated with the Mac.  What happens when you try this
first (or some variation):

Sys.setlocale("LC_ALL","C")

?

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list