I have found this funny bug-ish interaction between Excel and S-Plus
(Professional Edition Version 6.2.1 for Microsoft Windows : 2003)
Suppose you have a excel spreadsheet with the following lines:
C1 C2
VRAI 1 4
TRUE 2 5
VERO 3 6
I want to import it in S+ with the menu: command equivalent (I only selected
NameColAuto = "1"):
> guiImportData(FileName = "F:\\BugTRUE.xls", FileTypes = "Excel Worksheet
> (xl?)", TargetDataFrame = "BugTRUExls", TargetStartCol = "<END>",
> TargetInsertOverwrite = "Create new data set", NameRowAuto = "Auto",
> NameColAuto = "1", StartCol = 1, EndCol = "<END>", StartRow = 1, EndRow =
> "<END>", PageNumberAuto = "Auto", StringsAsFactors = T, SortFactorLevels = T,
> LabelsAsNumbers = F, CenturyCutoffYear = 1930, KeepOrDropList = "<ALL>",
> SeparateDelimiters = T, ASCIIDateInFormat = "dd.MM.yyyy", ASCIITimeInFormat =
> "HH:mm:ss", ASCIIDecimalPoint = "Period (.)", ASCIIThousandsSeparator =
> "None")
> BugTRUExls
C1 C2
NA 1 4
1 2 5
NA 3 6
#(In my original setting I cannot reproduce, all the other names get correct
# and the TRUE was changed to 1)
#If you save the spreadsheet to text first, this does not happen:
> guiImportData(FileName = "F:\\BugTRUE.txt", FileTypes = "ASCII file -
> whitespace delim (asc;dat;txt;prn)", TargetDataFrame = "BugTRUEtxt",
> TargetStartCol = "<END>", TargetInsertOverwrite = "Create new data set",
> NameRowAuto = "Auto", NameColAuto = "1", StartCol = 1, EndCol = "<END>",
> StartRow = 1, EndRow = "<END>", PageNumberAuto = "Auto", StringsAsFactors =
> T, SortFactorLevels = T, LabelsAsNumbers = F, CenturyCutoffYear = 1930,
> ASCIIDelimiters = "Tabs (\\t) and/or spaces ( )", KeepOrDropList = "<ALL>",
> SeparateDelimiters = F, ASCIIDateInFormat = "dd.MM.yyyy", ASCIITimeInFormat =
> "HH:mm:ss", ASCIIDecimalPoint = "Period (.)", ASCIIThousandsSeparator =
> "None")
> BugTRUEtxt
C1 C2
VRAI 1 4
TRUE 2 5
VERO 3 6
Olivier.Renaud@pse.unige.ch http://www.unige.ch/~renaud/
Methodology and Data Analysis - Section of Psychology - FPSE
University of Geneva - 40, Bd du Pont d'Arve - CH-1211 Geneva 4
|