The issue you encountered may be the result of a corrupt .Prefs or .Data directory. Below are a few indications of a corrupt .Prefs directory:
* The background color of your graph is red.
* You receive the error message: "There is an unrecognized property in the Argument List at Index..."
* In a dialog box, "Return Value" appears in the upper left hand corner
* You are unable to change your Options (Options | General Settings)
* S+ will not start
To check to see if your .Prefs directory is corrupt: Close S+ and delete your .Prefs directory. The location depends on which version of S+ you are running. The default locations are the following for the last three versions of S+:
S+ 7.0: C:\Program Files\Insightful\splus70\users\<user_name>\.Prefs
S+ 8.0: C:\Documents and Settings\<user_name>\My Documents\S-PLUS Projects\Project1
S+ 8.1: C:\Documents and Settings\<user_name>\My Documents\Spotfire S+\Project1
where <user_name> is your login name for your machine.
The .Prefs directory stores your user preferences, such as graph colors, default options, etc. When you restart S+, the defaults will be restored in this directory. When restarting S+ you will receive a message that .Data and/or .Prefs cannot be found. Click OK to create the default. Just the default .Prefs will be created. If this does not help, your .Data directory may be corrupt. Please try the following:
Below are a few indications of a corrupt .Data directory:
* S+ does not start
* Receive the following error message when accessing an object you created:
"Engine connection failure - shutting down S-PLUS recommended"
* Unexplainable error messages
To check to see if your .Data directory is corrupt please try the following:
Start S+ in a *NEW* project directory by defining the S_PROJ environment variable. S_PROJ defines your working .Data, .Prefs and current working directory. For example, create the new "C:\TestProj" directory with nothing in it. Define your S_PROJ variable, at the end of your "Target" line in your S+ icon's shortcut properties. To do this, select your icon, right-click, and select 'Properties' from the contextual menu that opens. Under the shortcut tab, add your S_PROJ definition at the end of the 'Target:' field. For example,
Target: "C:\Program Files\TIBCO\splus81\cmd\SPLUS.exe" S_PROJ=C:\TestProj
specifies to start S+ in the C:\TestProj project directory. Click "OK" and execute S+ from this icon. If the problem persists, then your .Data directory was not corrupt.
If the .Data directory was corrupt, you will now need to do a data.dump() of your original .Data contents into the new .Data directory:
1. Start S+ in the newly created S_PROJ directory.
2. Use attach() from the S+ command line to attach the old .Data directory in position 2 of your S+ search path. For example:
> attach("C:/Documents and Settings/<user_name>/My Documents/Spotfire S+/Project1")
You can also attach the old .Data directory by selecting: File -> Chapters -> Attach/Create Chapter:
Chapter Folder: C:\Documents and Settings\<user_name>\My Documents\Spotfire S+\Project1
Label: Project1
Position: 2
3. Use data.dump() on the objects in your original .Data directory by typing:
> data.dump(objects(where=2),"C:/myfile.dmp", where=2)
to save your old objects into a formatted text file that S+ can interpret. The 'data.dump' file should no longer contain the corrupted files/data.
4. Use data.restore() on your data.dump file:
> data.restore("C:/myfile.dmp")
to restore the old objects in the new working chapter's .Data directory.
5. Use detach() from the command line to detach the corrupt .Data directory from position 2 of your search path:
> detach(2)
You can also detach the corrupt .Data directory by selecting: File -> Chapters -> Detach Chapter.