Re: [R] install package from CRAN

2009-07-28 Thread Steve Lianoglou


On Jul 28, 2009, at 8:15 PM, cindy Guo wrote:


Hi,

I have a very basic question about install packages from CRAN on  
unix. I
only installed on Windows before. Should I use the command  
install.package?

The error message I got is
syntax error near unexpected token `mvtnorm'
Is it because I didn't set the path? Which path should I specify?



You should use install.packages (note the last s)... how did you  
call that function to get that error you are showing us?


It looks like you're trying to install the 'mvtnorm' package, and  
you'd do so like this:


install.packages('mvtnorm')

Is that what you did?
 -steve

--
Steve Lianoglou
Graduate Student: Computational Systems Biology
  |  Memorial Sloan-Kettering Cancer Center
  |  Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

__
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.


Re: [R] install package from CRAN

2009-07-28 Thread cindy Guo
Hi, Steve,

Thanks for the response.

I did the same thing:
 install.packages('mvtnorm')
-bash: syntax error near unexpected token `'mvtnorm''

I think what may cause difference is that I am using a unix cluster of my
university, so I am not the administrator. Do I need to set the path?

Cindy


On Tue, Jul 28, 2009 at 5:31 PM, Steve Lianoglou 
mailinglist.honey...@gmail.com wrote:


 On Jul 28, 2009, at 8:15 PM, cindy Guo wrote:

 Hi,

 I have a very basic question about install packages from CRAN on unix. I
 only installed on Windows before. Should I use the command
 install.package?
 The error message I got is
 syntax error near unexpected token `mvtnorm'
 Is it because I didn't set the path? Which path should I specify?



 You should use install.packages (note the last s)... how did you call
 that function to get that error you are showing us?

 It looks like you're trying to install the 'mvtnorm' package, and you'd do
 so like this:

 install.packages('mvtnorm')

 Is that what you did?
  -steve

 --
 Steve Lianoglou
 Graduate Student: Computational Systems Biology
  |  Memorial Sloan-Kettering Cancer Center
  |  Weill Medical College of Cornell University
 Contact Info: http://cbio.mskcc.org/~lianos/contact



[[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.


Re: [R] install package from CRAN

2009-07-28 Thread Steve Lianoglou

Hi,

On Jul 28, 2009, at 8:36 PM, cindy Guo wrote:


Hi, Steve,

Thanks for the response.

I did the same thing:
 install.packages('mvtnorm')
-bash: syntax error near unexpected token `'mvtnorm''

I think what may cause difference is that I am using a unix cluster  
of my university, so I am not the administrator. Do I need to set  
the path?


I think I remember R installing into an alternative lib directory in  
your home directory if you didn't have access to your system's R  
library directory automatically. I believe R creates a default  
directory if you don't specify one, otherwise you can make your own R/ 
library directory somewhere you have access to and pass that into the  
install.packages function, like:


install.packages('mvtnorm', lib='/the/path/to/your/personal/R/library')

I'm not sure, though, this actually looks like a different/worse  
problem because the error your get seems to be coming from your unix  
shell .. as if R is doing something like a system call but the  
command it's sending is malformed.


-steve

--
Steve Lianoglou
Graduate Student: Computational Systems Biology
  |  Memorial Sloan-Kettering Cancer Center
  |  Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

__
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.


Re: [R] install package from CRAN

2009-07-28 Thread Nordlund, Dan (DSHS/RDA)
 -Original Message-
 From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
 Behalf Of cindy Guo
 Sent: Tuesday, July 28, 2009 5:36 PM
 To: Steve Lianoglou
 Cc: r-help@r-project.org
 Subject: Re: [R] install package from CRAN
 
 Hi, Steve,
 
 Thanks for the response.
 
 I did the same thing:
  install.packages('mvtnorm')
 -bash: syntax error near unexpected token `'mvtnorm''
 
 I think what may cause difference is that I am using a unix cluster of my
 university, so I am not the administrator. Do I need to set the path?
 
 Cindy
 
The error you are getting is from the bash shell.  Are you trying to run the 
command from the shell, or from inside R?  You need to start R and then run 
install.packages('mvtnorm') from the R terminal.  You still may have permission 
problems, and I think you will need to have installed and have access to the 
appropriate tools for building packages.

Hope this is helpful,

Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA  98504-5204
 

__
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.


Re: [R] install package from CRAN

2009-07-28 Thread Dirk Eddelbuettel

Cindy,

On 28 July 2009 at 17:15, cindy Guo wrote:
| I have a very basic question about install packages from CRAN on unix. I
| only installed on Windows before. Should I use the command install.package?
| The error message I got is
| syntax error near unexpected token `mvtnorm'
| Is it because I didn't set the path? Which path should I specify?

a)  You use install.packages() only from __inside R__. As you got an error
from bash, you must have done this from the command prompt.

b)  At the command prompt, use 'R CMD INSTALL mvtnorm' instead.

In either case, you need proper permissions to install in global directories,
so if you can run this, try either 'sudo R' to start R so that
'install.packages(mvtnorm)' will succeed, or use 'sudo R CMD INSTALL
mvtnorm.

Also, if you are on Debian / Ubuntu, you can do 
  sudo apt-get install r-cran-mvtnorm
as we provide a prebuild version.

Dirk

-- 
Three out of two people have difficulties with fractions.

__
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.


Re: [R] install package from CRAN

2009-07-28 Thread cindy Guo
Hi,

Thank you for all your replies. I got it work now.

Cindy

On Tue, Jul 28, 2009 at 6:09 PM, Dirk Eddelbuettel e...@debian.org wrote:


 Cindy,

 On 28 July 2009 at 17:15, cindy Guo wrote:
 | I have a very basic question about install packages from CRAN on unix. I
 | only installed on Windows before. Should I use the command
 install.package?
 | The error message I got is
 | syntax error near unexpected token `mvtnorm'
 | Is it because I didn't set the path? Which path should I specify?

 a)  You use install.packages() only from __inside R__. As you got an error
from bash, you must have done this from the command prompt.

 b)  At the command prompt, use 'R CMD INSTALL mvtnorm' instead.

 In either case, you need proper permissions to install in global
 directories,
 so if you can run this, try either 'sudo R' to start R so that
 'install.packages(mvtnorm)' will succeed, or use 'sudo R CMD INSTALL
 mvtnorm.

 Also, if you are on Debian / Ubuntu, you can do
  sudo apt-get install r-cran-mvtnorm
 as we provide a prebuild version.

 Dirk

 --
 Three out of two people have difficulties with fractions.


[[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.


Re: [R] install package from CRAN

2009-07-28 Thread stephen sefick
What was the problem- out of curiosity?

Stephen Sefick

On Tue, Jul 28, 2009 at 9:23 PM, cindy Guocindy.g...@gmail.com wrote:
 Hi,

 Thank you for all your replies. I got it work now.

 Cindy

 On Tue, Jul 28, 2009 at 6:09 PM, Dirk Eddelbuettel e...@debian.org wrote:


 Cindy,

 On 28 July 2009 at 17:15, cindy Guo wrote:
 | I have a very basic question about install packages from CRAN on unix. I
 | only installed on Windows before. Should I use the command
 install.package?
 | The error message I got is
 | syntax error near unexpected token `mvtnorm'
 | Is it because I didn't set the path? Which path should I specify?

 a)  You use install.packages() only from __inside R__. As you got an error
    from bash, you must have done this from the command prompt.

 b)  At the command prompt, use 'R CMD INSTALL mvtnorm' instead.

 In either case, you need proper permissions to install in global
 directories,
 so if you can run this, try either 'sudo R' to start R so that
 'install.packages(mvtnorm)' will succeed, or use 'sudo R CMD INSTALL
 mvtnorm.

 Also, if you are on Debian / Ubuntu, you can do
      sudo apt-get install r-cran-mvtnorm
 as we provide a prebuild version.

 Dirk

 --
 Three out of two people have difficulties with fractions.


        [[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.




-- 
Stephen Sefick

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

-K. Mullis

__
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.


Re: [R] install package from CRAN

2009-07-28 Thread cindy Guo
Hi,

Thank you for asking. Actually I downloaded the tar.gz file as Mark said and
used R CMD INSTALL -l  .  package.tar.gz to install. I didn't know I can
download CRAN packages from the internet.

I am not a unix person, so I struggled a lot with the commands on unix and
directories especially. I don't know how to deal with it when I don't have
enough privilege.
Cindy



On Tue, Jul 28, 2009 at 7:33 PM, stephen sefick ssef...@gmail.com wrote:

 What was the problem- out of curiosity?

 Stephen Sefick

 On Tue, Jul 28, 2009 at 9:23 PM, cindy Guocindy.g...@gmail.com wrote:
  Hi,
 
  Thank you for all your replies. I got it work now.
 
  Cindy
 
  On Tue, Jul 28, 2009 at 6:09 PM, Dirk Eddelbuettel e...@debian.org
 wrote:
 
 
  Cindy,
 
  On 28 July 2009 at 17:15, cindy Guo wrote:
  | I have a very basic question about install packages from CRAN on unix.
 I
  | only installed on Windows before. Should I use the command
  install.package?
  | The error message I got is
  | syntax error near unexpected token `mvtnorm'
  | Is it because I didn't set the path? Which path should I specify?
 
  a)  You use install.packages() only from __inside R__. As you got an
 error
 from bash, you must have done this from the command prompt.
 
  b)  At the command prompt, use 'R CMD INSTALL mvtnorm' instead.
 
  In either case, you need proper permissions to install in global
  directories,
  so if you can run this, try either 'sudo R' to start R so that
  'install.packages(mvtnorm)' will succeed, or use 'sudo R CMD INSTALL
  mvtnorm.
 
  Also, if you are on Debian / Ubuntu, you can do
   sudo apt-get install r-cran-mvtnorm
  as we provide a prebuild version.
 
  Dirk
 
  --
  Three out of two people have difficulties with fractions.
 
 
 [[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.htmlhttp://www.r-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 



 --
 Stephen Sefick

 Let's not spend our time and resources thinking about things that are
 so little or so large that all they really do for us is puff us up and
 make us feel like gods.  We are mammals, and have not exhausted the
 annoying little problems of being mammals.

-K. Mullis


[[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.