[R] Encoding of Sweave file error message

Duncan Mackay mackay at northnet.com.au
Thu Apr 12 02:49:48 CEST 2012


Hi

I ran the following sweave file in R2.14.1 and upgraded to R2.15 
yesterday with the same setup
I got the following error message when I rand the following Sweave file

 > setwd("D:/Cic/Sweave/Parasite/Comb/12")
 > Sweave("D:/Cic/Sweave/Parasite/Comb/12/ParasiteComb12.Rnw")
Error: c("'ParasiteComb12DS.Rnw'", "'ParasiteComb12.Rnw'") is not 
ASCII and does not declare an encoding
 > version
                _
platform       i386-pc-mingw32
arch           i386
os             mingw32
system         i386, mingw32
status
major          2
minor          15.0
year           2012
month          03
day            30
svn rev        58871
language       R
version.string R version 2.15.0 (2012-03-30)
nickname

I checked that the files were encoded as ANSI

The file  ParasiteComb12.Rnw is a master file and sets things up and 
calls a number of Sweave files.
ParasiteComb12DS.Rnw which loads packages  processes the data is the 
first file to be called

I can run ParasiteComb12.Rnw by itself without any problems but when 
I add other files then the error message occurs.

There are no references just plain text (no extended character set) 
plain latex and R coding

The first few lines for the Sweave preamble is:

\documentclass[10pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[latin1]{inputenc}
\usepackage{times}
\usepackage{courier}
\usepackage[scaled=.92]{helvet}

I can send the files if needed as the resultant pdf that is produced 
is 42 pages.

Any pointers to solve the problem will be greatly appreciated

Regards

Duncan


Duncan Mackay
Department of Agronomy and Soil Science
University of New England
ARMIDALE NSW 2351
Email home: mackay at northnet.com.au



More information about the R-help mailing list