[Rd] sys.source and encoding

From: <romain.francois_at_dbmail.com>
Date: Tue, 24 Feb 2009 12:03:41 +0100 (CET)


Hello,

The sys.source function does not have an encoding argument, and does not accept a connection (created by file):

&gt; sys.source("syssource.R")

Error in parse(n = -1, file = file) :
 invalid multibyte character in parser at line 2

Here we could simply pass encoding or ... to parse, the next one is more confusing:

&gt; sys.source( file( "syssource.R", encoding = "windows-1252" ) )
Error in sys.source(file("syssource.R", encoding = "windows-1252")) :  '5' is not an existing file

the syssource.R file contains this :

<file>

critère &lt;- 1
</file>

I can try to fix this, but maybe a decision needs to be made first about how ? just add the encoding argument to sys.source, add the ... to sys.source, handle connection in sys.source ?

&gt; version

              _
platform       i686-pc-linux-gnu
arch           i686
os             linux-gnu
system         i686, linux-gnu
status         Under development (unstable)
major          2
minor          9.0
year           2009
month          02
day            08
svn rev        47879
language       R

version.string R version 2.9.0 Under development (unstable) (2009-02-08 r47879)

Romain

-- 
Romain Francois
Independent R Consultant
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
	[[alternative HTML version deleted]]


______________________________________________ R-devel_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Received on Tue 24 Feb 2009 - 10:16:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 24 Feb 2009 - 14:00:44 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive