s-news
[Top] [All Lists]

.Data/ folder and SPLUS prompt

To: s-news@wubios.wustl.edu
Subject: .Data/ folder and SPLUS prompt
From: Pierre.Ilouga@evotecoai.com
Date: Fri, 7 Dec 2001 10:37:07 +0100
Hallo everyone.
The situation I encountered is either very crucial or results from an
ignorance of me. What's going on?

I created a  file named  "functions.s" (located in my working  directory
~/SPLUS/FUNCTIONS/)  consisting of  2 simple well known functions:
skew<-function(x)
{
 x<-x[!is.na(x)]
mean((x-mean(x))^3)/stdev(x)^3
}

sd<-function(x)
{
sqrt(var(x[!is.na(x)]))
}

FIRST OPERATION

I compiled  this function from the Splus prompt.
> source("functions.s")
> ls( )
[1] ".Last.value"  "sd"          "skew"

The content of the .Data/    folder becomes

~/SPLUS/FUNCTIONS/.Data> ls -al
total 19
drwxr-xr-x    5 pilouga  user          115 Dec  7 09:56 .
drwxr-xr-x    3 pilouga  user           65 Dec  7 09:19 ..
-rw-r--r--    1 pilouga  user         3278 Dec  7 09:56 .Audit
-rw-r--r--    1 pilouga  user           56 Dec  7 09:56 .Last.value
drwxr-xr-x    2 pilouga  user            9 Dec  6 13:28 __Hhelp
drwxr-xr-x    2 pilouga  user           28 Dec  6 13:28 __Meta
drwxr-xr-x    2 pilouga  user            9 Dec  6 13:28 __Shelp
-rw-r--r--    1 pilouga  user          392 Dec  7 09:56 sd
-rw-r--r--    1 pilouga  user          868 Dec  7 09:56 skew

That is what was expected.
I then removed all objects, and  wrote the command q() to quit Splus and
started the

SECOND OPERATION

The second function of my file "functions.s" was renamed  in "unbsd", the
first function "skew" remaining unchanged.
skew<-function(x)
{
 x<-x[!is.na(x)]
mean((x-mean(x))^3)/stdev(x)^3
}

unbsd<-function(x)
{
sqrt(var(x[!is.na(x)]))
}

From the Splus prompt:

> source("functions.s")
> ls( )
[1] ".Last.value" "skew"        "unbsd"

~/SPLUS/FUNCTIONS/.Data> ls -al
total 19
drwxr-xr-x    5 pilouga  user          118 Dec  7 10:10 .
drwxr-xr-x    3 pilouga  user           65 Dec  7 09:19 ..
-rw-r--r--    1 pilouga  user         3488 Dec  7 10:10 .Audit
-rw-r--r--    1 pilouga  user           59 Dec  7 10:10 .Last.value
drwxr-xr-x    2 pilouga  user            9 Dec  6 13:28 __Hhelp
drwxr-xr-x    2 pilouga  user           28 Dec  6 13:28 __Meta
drwxr-xr-x    2 pilouga  user            9 Dec  6 13:28 __Shelp
-rw-r--r--    1 pilouga  user          868 Dec  7 10:10 skew
-rw-r--r--    1 pilouga  user          392 Dec  7 10:10 unbsd

After quitting Splus and starting Splus again (Splus -e under the tcsh)
> ls( )
[1] ".Last.value" "skew"
> unbsd
Problem: Object "unbsd" not found

that is there is no  function "unbsd", although the content of the .Data/
directory is the same as above (before quitting Splus).
~/SPLUS/FUNCTIONS/.Data> ls -al
total 19
drwxr-xr-x    5 pilouga  user          118 Dec  7 10:13 .
drwxr-xr-x    3 pilouga  user           65 Dec  7 09:19 ..
-rw-r--r--    1 pilouga  user         3681 Dec  7 10:20 .Audit
-rw-r--r--    1 pilouga  user           53 Dec  7 10:13 .Last.value
drwxr-xr-x    2 pilouga  user            9 Dec  6 13:28 __Hhelp
drwxr-xr-x    2 pilouga  user           28 Dec  6 13:28 __Meta
drwxr-xr-x    2 pilouga  user            9 Dec  6 13:28 __Shelp
-rw-r--r--    1 pilouga  user          868 Dec  7 10:10 skew
-rw-r--r--    1 pilouga  user          392 Dec  7 10:10 unbsd

This situation does'nt occur with "sd" instead of "unbsd". WHY? Some
compiled functions are  therefore lost.
Is there something to do in order to overcome this problem?

~/SPLUS/FUNCTIONS > Splus -e
S-PLUS : Copyright (c) 1988, 2000 MathSoft, Inc.
S : Copyright Lucent Technologies, Inc.
Version 6.0 Release 1 for Linux 2.2.12 : 2000
Working data will be in .Data


Dr. Pierre Ilouga
EVOTEC OAI
Screening Operations/Discovery Informatics
Schnackenburgallee 114
D-22525 Hamburg
Germany



<Prev in Thread] Current Thread [Next in Thread>
  • .Data/ folder and SPLUS prompt, Pierre . Ilouga <=