difficulty setting environment variable to its parent

  • Thread starter Thread starter BG
  • Start date Start date
B

BG

Guest
Hello,

I am hoping someone can assist me with a problem I have trying to load
WordNet dictionary into a statistics program called R. Below is the error
message I receive:

> library(wordnet)
> initDict()

[1] FALSE
Warning message:
In initDict() :
cannot find WordNet 'dict' directory: please set the environment variable
WNHOME to its parent

Below is output from my computer when I type the following into a DOS
window. The actual file is in Program Files (note space) whereas below it is
reported as ProgramFiles - I don't know if this makes a difference.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.


C:\>echo %WNHOME%
C:\ProgramFiles\R\WordNet-3.0\

I have entered the Variable value via: control -> panel -> system -> system
properties -> advanced -> environment

Variable Name = WNHOME
variable value = C:\Program Files\R\WordNet-3.0\


Any assistance with this problem is much appreciated,


regards

Bob
 
Re: difficulty setting environment variable to its parent


"BG" <BG@discussions.microsoft.com> wrote in message
news:8278473F-BCCA-440F-9BDC-36B33103FB77@microsoft.com...
> Hello,
>
> I am hoping someone can assist me with a problem I have trying to load
> WordNet dictionary into a statistics program called R. Below is the error
> message I receive:
>
>> library(wordnet)
>> initDict()

> [1] FALSE
> Warning message:
> In initDict() :
> cannot find WordNet 'dict' directory: please set the environment variable
> WNHOME to its parent
>
> Below is output from my computer when I type the following into a DOS
> window. The actual file is in Program Files (note space) whereas below it
> is
> reported as ProgramFiles - I don't know if this makes a difference.
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
>
> C:\>echo %WNHOME%
> C:\ProgramFiles\R\WordNet-3.0\
>
> I have entered the Variable value via: control -> panel -> system ->
> system
> properties -> advanced -> environment
>
> Variable Name = WNHOME
> variable value = C:\Program Files\R\WordNet-3.0\
>
>
> Any assistance with this problem is much appreciated,
>
>
> regards
>
> Bob

Blanks are significant. As C:\ProgramFiles\ is not the same place as
C:\Program Files\.
Jim
 
Re: difficulty setting environment variable to its parent


"BG" <BG@discussions.microsoft.com> wrote in message
news:8278473F-BCCA-440F-9BDC-36B33103FB77@microsoft.com...
> Hello,
>
> I am hoping someone can assist me with a problem I have trying to load
> WordNet dictionary into a statistics program called R. Below is the error
> message I receive:
>
>> library(wordnet)
>> initDict()

> [1] FALSE
> Warning message:
> In initDict() :
> cannot find WordNet 'dict' directory: please set the environment variable
> WNHOME to its parent
>
> Below is output from my computer when I type the following into a DOS
> window. The actual file is in Program Files (note space) whereas below it
> is
> reported as ProgramFiles - I don't know if this makes a difference.
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
>
> C:\>echo %WNHOME%
> C:\ProgramFiles\R\WordNet-3.0\
>
> I have entered the Variable value via: control -> panel -> system ->
> system
> properties -> advanced -> environment
>
> Variable Name = WNHOME
> variable value = C:\Program Files\R\WordNet-3.0\
>
>
> Any assistance with this problem is much appreciated,
>
>
> regards
>
> Bob


Are you saying that you set WNHome to a value of
"C:\Program Files\R\WordNet-3.0\"
and that it then becomes visible as
"C:\ProgramFiles\R\WordNet-3.0\"
in a Command Prompt window? If so, did you open this Command
Prompt before or after setting the variable?
 
Re: difficulty setting environment variable to its parent



"Jim" wrote:

> > Bob

> Blanks are significant. As C:\ProgramFiles\ is not the same place as
> C:\Program Files\.
> Jim

Jim,

Thanks. After trialling various options the space is now there but the error
message remains so it must be something else.


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\>echo %WNHOME%
C:\Program Files\R\WordNet3.0\


Any other suggestions?

Bob
 
Re: difficulty setting environment variable to its parent



"Pegasus (MVP)" wrote:


> Are you saying that you set WNHome to a value of
> "C:\Program Files\R\WordNet-3.0\"
> and that it then becomes visible as
> "C:\ProgramFiles\R\WordNet-3.0\"
> in a Command Prompt window? If so, did you open this Command
> Prompt before or after setting the variable?


Thanks for your reply. I suspect that I previously left the Command Prompt
window open while I was trying various options. As I have tried so many
options, it is now a bit hard to recall the exact sequence, however, when I
just reopened a Command Prompt window, the space is clearly there.

I also tested if I had the file path wrong:

C:\>cd C:\Program Files\R\
C:\Program Files\R> cd C:\Program Files\R\WordNet3.0\
C:\Program Files\R\WordNet3.0> cd C:\Program Files\R\WordNet3.0\dict
C:\Program Files\R\WordNet3.0\dict>


Bob
 
Re: difficulty setting environment variable to its parent


"Jim" <j.n@invalid.invalid> wrote in message
news:enrcfNkIJHA.1160@TK2MSFTNGP05.phx.gbl...
>
> "BG" <BG@discussions.microsoft.com> wrote in message
> news:8278473F-BCCA-440F-9BDC-36B33103FB77@microsoft.com...
>> Hello,
>>
>> I am hoping someone can assist me with a problem I have trying to load
>> WordNet dictionary into a statistics program called R. Below is the error
>> message I receive:
>>
>>> library(wordnet)
>>> initDict()

>> [1] FALSE
>> Warning message:
>> In initDict() :
>> cannot find WordNet 'dict' directory: please set the environment
>> variable
>> WNHOME to its parent
>>
>> Below is output from my computer when I type the following into a DOS
>> window. The actual file is in Program Files (note space) whereas below it
>> is
>> reported as ProgramFiles - I don't know if this makes a difference.
>>
>> Microsoft Windows XP [Version 5.1.2600]
>> (C) Copyright 1985-2001 Microsoft Corp.
>>
>>
>> C:\>echo %WNHOME%
>> C:\ProgramFiles\R\WordNet-3.0\
>>
>> I have entered the Variable value via: control -> panel -> system ->
>> system
>> properties -> advanced -> environment
>>
>> Variable Name = WNHOME
>> variable value = C:\Program Files\R\WordNet-3.0\
>>
>>
>> Any assistance with this problem is much appreciated,
>>
>>
>> regards
>>
>> Bob

> Blanks are significant. As C:\ProgramFiles\ is not the same place as
> C:\Program Files\.
> Jim


Indeed but not for why you think. If there are spaces in the line anywhere
then the variable must be enclosed in quotes. The parser stops at the first
space otherwise.
 
Back
Top