Hi R list,
I have a peculiar problem in trying to Sweave a document in Ubuntu.

The error message I get is the following:

Error in gsub("\\n", "_", dd_name_level_nominal[k, 1], perl = TRUE) :
  input string 1 is invalid in this locale

dd_name_level_nominal[k, 1] is a character object.
I initially read these characters from a csv file which I create in Excel
2007.

I have created the tex documents on my local WinXP machine but when I try to
create it on my
Ubuntu server, it does'nt seem to work(and throws the above error). I need
to create on the Ubuntu server, since I am using
Rserv and using R as a service.
I wish I could do everything on one platform (WinXP preferably) but there
isnt an R server for Windows which is as good or better than Rserv for
Linux.

This may be a very trivial problem, but I have tried to change the locale on
R Ubuntu to en_us.utf8.
On the windoes machine the locale is
"LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252"

and
 > l10n_info()
$MBCS
[1] FALSE

$`UTF-8`
[1] FALSE

$`Latin-1`
[1] TRUE

$codepage
[1] 1252

The locales i test in R ubuntu do not provide the Latin-1.

Is there a way to circumvent this problem? I have tried to clean my input
csv file by removing spaces and other special characters. I only have
alphabets and '_'  only. There could be a new line character in there, but I
am not able to remove it in a csv reader such as EXCEL.

Thanks for your help.

Harsh Singhal
Decision Systems,
Mu Sigma Inc.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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