[R] installing the package Rcplex

424 views
Skip to first unread message

zheng wei

unread,
Feb 19, 2012, 5:13:35 PM2/19/12
to r-h...@r-project.org
Dear All,
 
I have difficulty in installing the package of Rcplex. Its description web is at
http://cran.r-project.org/web/packages/Rcplex/index.html
 
First, I tried
--------------------------------------------------------------------------------------------------
url <- "http://cran.r-project.org/src/contrib/Rcplex_0.3-0.tar.gz";
download.file(url, basename(url), mode="wb")
install.packages(basename(url), repos=NULL)
--------------------------------------------------------------------------------------------------
 
 
but got the error of
--------------------------------------------------------------------------------------------------
> install.packages(basename(url), repos=NULL) 
Error in gzfile(file, "r") : cannot open the connection
In addition: Warning messages:
1: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
2: In gzfile(file, "r") :
  cannot open compressed file 'Rcplex_0.3-0.tar.gz/DESCRIPTION', probable reason 'No such file or directory'
--------------------------------------------------------------------------------------------------
 
 
Then, I looked into the installation instruction of this package at http://cran.r-project.org/web/packages/Rcplex/INSTALL
Since I am using windows, I was looking at the instruction as
--------------------------------------------------------------------------------------------------
***WINDOWS***

Installation on Windows systems is done by using the provided
Makevars.win file in the src directory. It contains the following
lines:

PKG_CPPFLAGS=-I<CPLEX_DIR>/include
PKG_LIBS=-L<CPLEX_DIR>/lib/x86_windows_vs2008/stat_mda -lcplex111 -lm

where <cplex_dir> is the cplex installation directory
e.g. /c/ilog/cplex111. Please edit your Makevars.win file accordingly.

We have successfully tested this procedure with CPLEX 11.1 on 32-bit
Windows XP.
--------------------------------------------------------------------------------------------------
 
 
I do not understand what it means exactly. I do fine the file of Makevars.win, and confirmed the content as described above. But what directory should I replace "/c/ilog/cplex111", and how to proceed so as to install the package. I got no idea. One thing to note is that it is stated from the web http://cran.r-project.org/web/views/Optimization.html that
--------------------------------------------------------------------------------------------------
Interfaces to Commercial Optimizers
This section surveys interfaces to commercial solvers. Typically, the corresponding libraries have to be installed separately.
* PackagescplexAPI andRcplex provide an interface to the CPLEX solver package from IBM . CPLEX provides dual/primal simplex optimizers as well as a barrier optimizer for solving large scale linear and quadratic programs. Furthermore, it offers a mixed integer optimizer to solve difficult mixed integer programs. Note that CPLEX is not free and you have to get a license from IBM . Academics will receive a free licence upon request. [LP, IP, BP, QP, MILP, MIQP, IPM]       
--------------------------------------------------------------------------------------------------
 
 
I am not sure the above statement is relevant or not. In case there is a necessary to get the license, since I work in a university and I think I could figure out how to get it by consulting the support within my own university.
 
 
Thank you very much!
William
[[alternative HTML version deleted]]

David Winsemius

unread,
Feb 19, 2012, 6:44:29 PM2/19/12
to zheng wei, r-h...@r-project.org
Just a guess (based on evidence of failing to read other instructions
that were made available), but have you perhaps forgotten to install
Rtools for Windows?

http://cran.r-project.org/bin/windows/Rtools/

--
David.

> ______________________________________________
> R-h...@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.

David Winsemius, MD
West Hartford, CT

______________________________________________
R-h...@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.

David Winsemius

unread,
Feb 19, 2012, 7:54:17 PM2/19/12
to zheng wei, r-h...@r-project.org

On Feb 19, 2012, at 7:45 PM, zheng wei wrote:

> I did not know this before. I installed it as you suggested. what to
> do next?

Read the Installation Manual?

--
David.
>
> Best,
> Wei

zheng wei

unread,
Feb 19, 2012, 7:45:56 PM2/19/12
to David Winsemius, r-h...@r-project.org
I did not know this before. I installed it as you suggested. what to do next?
 
Best,
Wei

________________________________
From: David Winsemius <dwins...@comcast.net>

Cc: "r-h...@r-project.org" <r-h...@r-project.org>
Sent: Sunday, February 19, 2012 6:44 PM
Subject: Re: [R] installing the package Rcplex

http://cran.r-project.org/bin/windows/Rtools/

--David.

[[elided Yahoo spam]]


> William
>     [[alternative HTML version deleted]]
>
> ______________________________________________
> R-h...@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.

David Winsemius, MD
West Hartford, CT

[[alternative HTML version deleted]]

Uwe Ligges

unread,
Feb 20, 2012, 6:01:55 AM2/20/12
to David Winsemius, r-h...@r-project.org

On 20.02.2012 01:54, David Winsemius wrote:
>
> On Feb 19, 2012, at 7:45 PM, zheng wei wrote:
>
>> I did not know this before. I installed it as you suggested. what to
>> do next?
>
> Read the Installation Manual?
>

And don't forget this is a source package for which no CRAN Windows
binary exists, hence it may be not that straightforward to get it done
and you wil have to read the INSTALL file from the source package carefully.

Uwe Ligges

Uwe Ligges

unread,
Feb 21, 2012, 2:14:11 PM2/21/12
to zheng wei, r-h...@r-project.org

On 21.02.2012 19:57, zheng wei wrote:
> Thank you both for helping. Still could not figure out.
>
> I was contacting different supporting IT departments in my university but did not get any help.
>
> For the moment, I just want to what does the instruction of the package means. You could find this instruction on page http://cran.r-project.org/web/packages/Rcplex/INSTALL


> --------------------------------------------------------------------------------------------------
> ***WINDOWS***
> Installation on Windows systems is done by using the provided
> Makevars.win file in the src directory. It contains the following
> lines:
> PKG_CPPFLAGS=-I<CPLEX_DIR>/include
> PKG_LIBS=-L<CPLEX_DIR>/lib/x86_windows_vs2008/stat_mda -lcplex111 -lm
> where<cplex_dir> is the cplex installation directory
> e.g. /c/ilog/cplex111. Please edit your Makevars.win file accordingly.
> We have successfully tested this procedure with CPLEX 11.1 on 32-bit
> Windows XP.
> --------------------------------------------------------------------------------------------------
>
>

> I can find the file and see the codes. But what new path should I put, and what to do next?

The path to your CPLEX installation?

Uwe Ligges


>
> Thanks,
> Wei
>
>
> ________________________________
> From: Uwe Ligges<lig...@statistik.tu-dortmund.de>
> To: David Winsemius<dwins...@comcast.net>
> Cc: zheng wei<zhengw...@yahoo.com>; "r-h...@r-project.org"<r-h...@r-project.org>
> Sent: Monday, February 20, 2012 6:01 AM


> Subject: Re: [R] installing the package Rcplex
>
>
>

zheng wei

unread,
Feb 21, 2012, 1:57:09 PM2/21/12
to Uwe Ligges, David Winsemius, r-h...@r-project.org
Thank you both for helping. Still could not figure out.
 
I was contacting different supporting IT departments in my university but did not get any help.
 
For the moment, I just want to what does the instruction of the package means. You could find this instruction on page http://cran.r-project.org/web/packages/Rcplex/INSTALL
 --------------------------------------------------------------------------------------------------
***WINDOWS***
Installation on Windows systems is done by using the provided
Makevars.win file in the src directory. It contains the following
lines:
PKG_CPPFLAGS=-I<CPLEX_DIR>/include
PKG_LIBS=-L<CPLEX_DIR>/lib/x86_windows_vs2008/stat_mda -lcplex111 -lm
where <cplex_dir> is the cplex installation directory
e.g. /c/ilog/cplex111. Please edit your Makevars.win file accordingly.
We have successfully tested this procedure with CPLEX 11.1 on 32-bit
Windows XP.
--------------------------------------------------------------------------------------------------
 
 
I can find the file and see the codes. But what new path should I put, and what to do next?
 
Thanks,
Wei


________________________________
From: Uwe Ligges <lig...@statistik.tu-dortmund.de>
To: David Winsemius <dwins...@comcast.net>

oject.org>

Sent: Monday, February 20, 2012 6:01 AM

Subject: Re: [R] installing the package Rcplex

On 20.02.2012 01:54, David Winsemius wrote:


>
> On Feb 19, 2012, at 7:45 PM, zheng wei wrote:
>
>> I did not know this before. I installed it as you suggested. what to
>> do next?
>
> Read the Installation Manual?
>

And don't forget this is a source package for which no CRAN Windows
binary exists, hence it may be not that straightforward to get it done
and you wil have to read the INSTALL file from the source package carefully.

Uwe Ligges
[[alternative HTML version deleted]]

zheng wei

unread,
Feb 21, 2012, 9:33:16 PM2/21/12
to Uwe Ligges, r-h...@r-project.org
Thanks.
 
I was just reminded by the tech support in my university that cplex is an independent software owned by ILOG, which in turn is now owned by IBM. I suceeded in installing the software cplex under the directory of "C:/Program Files/IBM/ILOG/CPLEX_Studio_Academic124/cplex"
I guess Rcplex is an R package to utilize the software cplex. I have changed the path "/c/ilog/cplex111" to the above path. My question is how to finally and effectively install the package of Rcplex?
 
Thanks,
Wei

________________________________
From: Uwe Ligges <lig...@statistik.tu-dortmund.de>

Cc: David Winsemius <dwins...@comcast.net>; "r-h...@r-project.org" <r-h...@r-project.org>
Sent: Tuesday, February 21, 2012 2:14 PM


Subject: Re: [R] installing the package Rcplex

On 21.02.2012 19:57, zheng wei wrote:


> Thank you both for helping. Still could not figure out.
>
> I was contacting different supporting IT departments in my university but did not get any help.
>
> For the moment, I just want to what does the instruction of the package means. You could find this instruction on page http://cran.r-project.org/web/packages/Rcplex/INSTALL
>  --------------------------------------------------------------------------------------------------
> ***WINDOWS***
> Installation on Windows systems is done by using the provided
> Makevars.win file in the src directory. It contains the following
> lines:
> PKG_CPPFLAGS=-I<CPLEX_DIR>/include
> PKG_LIBS=-L<CPLEX_DIR>/lib/x86_windows_vs2008/stat_mda -lcplex111 -lm
> where<cplex_dir>  is the cplex installation directory
> e.g. /c/ilog/cplex111. Please edit your Makevars.win file accordingly.
> We have successfully tested this procedure with CPLEX 11.1 on 32-bit
> Windows XP.
> --------------------------------------------------------------------------------------------------
>
>
> I can find the file and see the codes. But what new path should I put, and what to do next?

The path to your CPLEX installation?

Uwe Ligges


>
> Thanks,
> Wei
>
>
> ________________________________
> From: Uwe Ligges<lig...@statistik.tu-dortmund.de>
> To: David Winsemius<dwins...@comcast.net>

oject.org>


> Sent: Monday, February 20, 2012 6:01 AM
> Subject: Re: [R] installing the package Rcplex
>
>
>
> On 20.02.2012 01:54, David Winsemius wrote:
>>
>> On Feb 19, 2012, at 7:45 PM, zheng wei wrote:
>>
>>> I did not know this before. I installed it as you suggested. what to
>>> do next?
>>
>> Read the Installation Manual?
>>
>
> And don't forget this is a source package for which no CRAN Windows
> binary exists, hence it may be not that straightforward to get it done
> and you wil have to read the INSTALL file from the source package carefully.
>
> Uwe Ligges

[[alternative HTML version deleted]]

Uwe Ligges

unread,
Feb 22, 2012, 4:04:14 AM2/22/12
to zheng wei, r-h...@r-project.org

On 22.02.2012 03:33, zheng wei wrote:
> Thanks.
>
> I was just reminded by the tech support in my university that cplex is an independent software owned by ILOG, which in turn is now owned by IBM. I suceeded in installing the software cplex under the directory of "C:/Program Files/IBM/ILOG/CPLEX_Studio_Academic124/cplex"
> I guess Rcplex is an R package to utilize the software cplex. I have changed the path "/c/ilog/cplex111" to the above path. My question is how to finally and effectively install the package of Rcplex?

You have been asked alreeady to read the R Installation and
Administration manual.

Uwe Ligges

>
> Thanks,
> Wei
>
>
>
> ________________________________
> From: Uwe Ligges<lig...@statistik.tu-dortmund.de>

> To: zheng wei<zhengw...@yahoo.com>

>> Sent: Monday, February 20, 2012 6:01 AM
>> Subject: Re: [R] installing the package Rcplex
>>
>>
>>
>> On 20.02.2012 01:54, David Winsemius wrote:
>>>
>>> On Feb 19, 2012, at 7:45 PM, zheng wei wrote:
>>>
>>>> I did not know this before. I installed it as you suggested. what to
>>>> do next?
>>>
>>> Read the Installation Manual?
>>>
>>
>> And don't forget this is a source package for which no CRAN Windows
>> binary exists, hence it may be not that straightforward to get it done
>> and you wil have to read the INSTALL file from the source package carefully.
>>
>> Uwe Ligges

______________________________________________

zheng wei

unread,
Feb 22, 2012, 3:04:24 PM2/22/12
to Uwe Ligges, r-h...@r-project.org
Based on my understanding of the manual, I moved upziped the file and put the folder of Rcplex under the directory of c:/temp
Then I use cmd under windows to go to the director of C:\Program
Files\R\R-2.13.0\bin, where my R is installed
and typed R CMD INSTALL
"c:/temp/Rcplex"
I got the error of configuration failed for package "Rcplex" 
 
Any idea?
 

  

________________________________
From: Uwe Ligges <lig...@statistik.tu-dortmund.de>

Cc: David Winsemius <dwins...@comcast.net>; "r-h...@r-project.org" <r-h...@r-project.org>
Sent: Wednesday, February 22, 2012 4:04 AM


Subject: Re: [R] installing the package Rcplex

On 22.02.2012 03:33, zheng wei wrote:
> Thanks.
>
> I was just reminded by the tech support in my university that cplex is an independent software owned by ILOG, which in turn is now owned by IBM. I suceeded in installing the software cplex under the directory of "C:/Program Files/IBM/ILOG/CPLEX_Studio_Academic124/cplex"
> I guess Rcplex is an R package to utilize the software cplex. I have changed the path "/c/ilog/cplex111" to the above path. My question is how to finally and effectively install the package of Rcplex?

You have been asked alreeady to read the R Installation and
Administration manual.

Uwe Ligges

>
> Thanks,
> Wei
>
>
>
> ________________________________
> From: Uwe Ligges<lig...@statistik.tu-dortmund.de>

> Cc: David Winsemius<dwins...@comcast.net>; "r-h...@r-project.org"<r-h...@r-project.org>

roject.org>


>> Sent: Monday, February 20, 2012 6:01 AM
>> Subject: Re: [R] installing the package Rcplex
>>
>>
>>
>> On 20.02.2012 01:54, David Winsemius wrote:
>>>
>>> On Feb 19, 2012, at 7:45 PM, zheng wei wrote:
>>>
>>>> I did not know this before. I installed it as you suggested. what to
>>>> do next?
>>>
>>> Read the Installation Manual?
>>>
>>
>> And don't forget this is a source package for which no CRAN Windows
>> binary exists, hence it may be not that straightforward to get it done
>> and you wil have to read the INSTALL file from the source package carefully.
>>
>> Uwe Ligges

[[alternative HTML version deleted]]

zheng wei

unread,
Feb 23, 2012, 2:06:32 AM2/23/12
to Uwe Ligges, r-h...@r-project.org
I suspect one possible reason is that while I unzip the file .tar.gz, it destroys the structure between files as the manual indicated. But there seems no unix-like environment. I tried the cmd command, but it does not recognize tar command. Section 6.3 of the manual said that install.packages can install a source package from a local '.tar.gz' file by setting argument repos to NULL. But the manual did not tell me where to put this .tar.gz file in the first place. How do R find this file?
 
Another idea is that I saw four .R files under the folder of R in the zip file. I suspect all necessary functions is defined in these four .R documents. So I ran them and tried a mini example of applying the function
---------------------------------------------------------------------
cvec <- c(1,2,3)
Amat <- matrix(c(-1,1,1,-1,3,-1),byrow=TRUE,nc=3)
bvec <- c(20,-30)
ub <- c(40,Inf,Inf)
res <- Rcplex(cvec,Amat,bvec,ub=ub,objsense="max",sense=c('L','G'))
print(res)
------------------------------------------------------------------------
 
This gives me the error message of
----------------------------------------------------------------------
Error in .Call("Rcplex", as.integer(numcols), as.integer(numrows), as.integer(objsensei),  :
  C symbol name "Rcplex" not in load table
Error in .C("Rcplex_free") :
  C symbol name "Rcplex_free" not in load table

------------------------------------------------------------------------------
 


________________________________
From: Uwe Ligges <lig...@statistik.tu-dortmund.de>

Cc: David Winsemius <dwins...@comcast.net>; "r-h...@r-project.org" <r-h...@r-project.org>
Sent: Wednesday, February 22, 2012 4:04 AM


Subject: Re: [R] installing the package Rcplex

On 22.02.2012 03:33, zheng wei wrote:
> Thanks.
>
> I was just reminded by the tech support in my university that cplex is an independent software owned by ILOG, which in turn is now owned by IBM. I suceeded in installing the software cplex under the directory of "C:/Program Files/IBM/ILOG/CPLEX_Studio_Academic124/cplex"
> I guess Rcplex is an R package to utilize the software cplex. I have changed the path "/c/ilog/cplex111" to the above path. My question is how to finally and effectively install the package of Rcplex?

You have been asked alreeady to read the R Installation and
Administration manual.

Uwe Ligges

>
> Thanks,
> Wei
>
>
>
> ________________________________
> From: Uwe Ligges<lig...@statistik.tu-dortmund.de>

> Cc: David Winsemius<dwins...@comcast.net>; "r-h...@r-project.org"<r-h...@r-project.org>

roject.org>


>> Sent: Monday, February 20, 2012 6:01 AM
>> Subject: Re: [R] installing the package Rcplex
>>
>>
>>
>> On 20.02.2012 01:54, David Winsemius wrote:
>>>
>>> On Feb 19, 2012, at 7:45 PM, zheng wei wrote:
>>>
>>>> I did not know this before. I installed it as you suggested. what to
>>>> do next?
>>>
>>> Read the Installation Manual?
>>>
>>
>> And don't forget this is a source package for which no CRAN Windows
>> binary exists, hence it may be not that straightforward to get it done
>> and you wil have to read the INSTALL file from the source package carefully.
>>
>> Uwe Ligges

[[alternative HTML version deleted]]

Uwe Ligges

unread,
Feb 23, 2012, 5:07:56 AM2/23/12
to zheng wei, r-h...@r-project.org

On 22.02.2012 21:04, zheng wei wrote:
> Based on my understanding of the manual, I moved upziped the file and put the folder of Rcplex under the directory of c:/temp
> Then I use cmd under windows to go to the director of C:\Program
> Files\R\R-2.13.0\bin, where my R is installed
> and typed R CMD INSTALL
> "c:/temp/Rcplex"

I'd

1. install a recent version of R

2. add R's bin directory to the PATH and go to c:\temp and say

R CMD build Rcplex

followed by

R CMD INSTALL Rcplex_version.tar.gz


3. When it fails, I'd try to find out if the ERROR message is helpful.

4. If 3 fails, I'd ask the maintainer for help - including relevant
information, like the error message, install paths, version information etc.


Uwe Ligges

> I got the error of configuration failed for package "Rcplex"
>
> Any idea?
>
>
>
>
> ________________________________
> From: Uwe Ligges<lig...@statistik.tu-dortmund.de>

> To: zheng wei<zhengw...@yahoo.com>


> Cc: David Winsemius<dwins...@comcast.net>; "r-h...@r-project.org"<r-h...@r-project.org>
> Sent: Wednesday, February 22, 2012 4:04 AM
> Subject: Re: [R] installing the package Rcplex
>
>
>
> On 22.02.2012 03:33, zheng wei wrote:
>> Thanks.
>>
>> I was just reminded by the tech support in my university that cplex is an independent software owned by ILOG, which in turn is now owned by IBM. I suceeded in installing the software cplex under the directory of "C:/Program Files/IBM/ILOG/CPLEX_Studio_Academic124/cplex"
>> I guess Rcplex is an R package to utilize the software cplex. I have changed the path "/c/ilog/cplex111" to the above path. My question is how to finally and effectively install the package of Rcplex?
>
> You have been asked alreeady to read the R Installation and
> Administration manual.
>
> Uwe Ligges
>
>
>
>>
>> Thanks,
>> Wei
>>
>>
>>
>> ________________________________
>> From: Uwe Ligges<lig...@statistik.tu-dortmund.de>

>> To: zheng wei<zhengw...@yahoo.com>

>>> Sent: Monday, February 20, 2012 6:01 AM
>>> Subject: Re: [R] installing the package Rcplex
>>>
>>>
>>>
>>> On 20.02.2012 01:54, David Winsemius wrote:
>>>>
>>>> On Feb 19, 2012, at 7:45 PM, zheng wei wrote:
>>>>
>>>>> I did not know this before. I installed it as you suggested. what to
>>>>> do next?
>>>>
>>>> Read the Installation Manual?
>>>>
>>>
>>> And don't forget this is a source package for which no CRAN Windows
>>> binary exists, hence it may be not that straightforward to get it done
>>> and you wil have to read the INSTALL file from the source package carefully.
>>>
>>> Uwe Ligges

______________________________________________

Uwe Ligges

unread,
Feb 23, 2012, 9:29:21 AM2/23/12
to zheng wei, r-h...@r-project.org
I give up.

Uwe Ligges

On 23.02.2012 15:01, zheng wei wrote:
> Thanks.
>

> I do not understand item 2, what do you mean by add R's bin directory to path?
>
> While directly use to c:\temp and type the commands, it says 'R' is not recognized as an internal or external command.
>
> While I use previous approach by going into the bin directory and type R CMD INSTALL "c:/temp/Rcplex", it told me that configuration failed for package 'Rcplex'


>
>
> ________________________________
> From: Uwe Ligges<lig...@statistik.tu-dortmund.de>
> To: zheng wei<zhengw...@yahoo.com>
> Cc: David Winsemius<dwins...@comcast.net>; "r-h...@r-project.org"<r-h...@r-project.org>

> Sent: Thursday, February 23, 2012 5:07 AM

zheng wei

unread,
Feb 23, 2012, 9:01:36 AM2/23/12
to Uwe Ligges, r-h...@r-project.org
Thanks.
 
I do not understand item 2, what do you mean by add R's bin directory to path?
 
While directly use to c:\temp and type the commands, it says 'R' is not recognized as an internal or external command.
 
While I use previous approach by going into the bin directory and type R CMD INSTALL "c:/temp/Rcplex", it told me that configuration failed for package 'Rcplex'

________________________________
From: Uwe Ligges <lig...@statistik.tu-dortmund.de>

Cc: David Winsemius <dwins...@comcast.net>; "r-h...@r-project.org" <r-h...@r-project.org>
Sent: Thursday, February 23, 2012 5:07 AM


Subject: Re: [R] installing the package Rcplex

On 22.02.2012 21:04, zheng wei wrote:
> Based on my understanding of the manual, I moved upziped the file and put the folder of Rcplex under the directory of c:/temp
> Then I use cmd under windows to go to the director of C:\Program
> Files\R\R-2.13.0\bin, where my R is installed
> and typed R CMD INSTALL
> "c:/temp/Rcplex"

I'd

1. install a recent version of R

2. add R's bin directory to the PATH and go to c:\temp and say

R CMD build Rcplex

followed by

R CMD INSTALL Rcplex_version.tar.gz


3. When it fails, I'd try to find out if the ERROR message is helpful.

4. If 3 fails, I'd ask the maintainer for help - including relevant
information, like the error message, install paths, version information etc.


Uwe Ligges

> I got the error of configuration failed for package "Rcplex"
>
> Any idea?
>
>
>
>
> ________________________________
>  From: Uwe Ligges<lig...@statistik.tu-dortmund.de>

> Cc: David Winsemius<dwins...@comcast.net>; "r-h...@r-project.org"<r-h...@r-project.org>


> Sent: Wednesday, February 22, 2012 4:04 AM
> Subject: Re: [R] installing the package Rcplex
>
>
>
> On 22.02.2012 03:33, zheng wei wrote:
>> Thanks.
>>
>> I was just reminded by the tech support in my university that cplex is an independent software owned by ILOG, which in turn is now owned by IBM. I suceeded in installing the software cplex under the directory of "C:/Program Files/IBM/ILOG/CPLEX_Studio_Academic124/cplex"
>> I guess Rcplex is an R package to utilize the software cplex. I have changed the path "/c/ilog/cplex111" to the above path. My question is how to finally and effectively install the package of Rcplex?
>
> You have been asked alreeady to read the R Installation and
> Administration manual.
>
> Uwe Ligges
>
>
>
>>
>> Thanks,
>> Wei
>>
>>
>>
>> ________________________________
>> From: Uwe Ligges<lig...@statistik.tu-dortmund.de>

>> Cc: David Winsemius<dwins...@comcast.net>; "r-h...@r-project.org"<r-h...@r-project.org>

project.org>


>>> Sent: Monday, February 20, 2012 6:01 AM
>>> Subject: Re: [R] installing the package Rcplex
>>>
>>>
>>>
>>> On 20.02.2012 01:54, David Winsemius wrote:
>>>>
>>>> On Feb 19, 2012, at 7:45 PM, zheng wei wrote:
>>>>
>>>>> I did not know this before. I installed it as you suggested. what to
>>>>> do next?
>>>>
>>>> Read the Installation Manual?
>>>>
>>>
>>> And don't forget this is a source package for which no CRAN Windows
>>> binary exists, hence it may be not that straightforward to get it done
>>> and you wil have to read the INSTALL file from the source package carefully.
>>>
>>> Uwe Ligges

[[alternative HTML version deleted]]

zheng wei

unread,
Feb 23, 2012, 11:54:03 AM2/23/12
to Uwe Ligges, r-h...@r-project.org
You can tell me what do you mean by add R's bin directory to path.
 
Thanks


________________________________
From: Uwe Ligges <lig...@statistik.tu-dortmund.de>

Cc: David Winsemius <dwins...@comcast.net>; "r-h...@r-project.org" <r-h...@r-project.org>
Sent: Thursday, February 23, 2012 9:29 AM


Subject: Re: [R] installing the package Rcplex

I give up.

Uwe Ligges

On 23.02.2012 15:01, zheng wei wrote:
> Thanks.
>
> I do not understand item 2, what do you mean by add R's bin directory to path?
>
> While directly use to c:\temp and type the commands, it says 'R' is not recognized as an internal or external command.
>
> While I use previous approach by going into the bin directory and type R CMD INSTALL "c:/temp/Rcplex", it told me that configuration failed for package 'Rcplex'
>
>
> ________________________________
>  From: Uwe Ligges<lig...@statistik.tu-dortmund.de>

> Cc: David Winsemius<dwins...@comcast.net>; "r-h...@r-project.org"<r-h...@r-project.org>


> Sent: Thursday, February 23, 2012 5:07 AM
> Subject: Re: [R] installing the package Rcplex
>
>
>
> On 22.02.2012 21:04, zheng wei wrote:
>> Based on my understanding of the manual, I moved upziped the file and put the folder of Rcplex under the directory of c:/temp
>> Then I use cmd under windows to go to the director of C:\Program
>> Files\R\R-2.13.0\bin, where my R is installed
>> and typed R CMD INSTALL
>> "c:/temp/Rcplex"
>
> I'd
>
> 1. install a recent version of R
>
> 2. add R's bin directory to the PATH and go to c:\temp and say
>
> R CMD build Rcplex
>
> followed by
>
> R CMD INSTALL Rcplex_version.tar.gz
>
>
> 3. When it fails, I'd try to find out if the ERROR message is helpful.
>
> 4. If 3 fails, I'd ask the maintainer for help - including relevant
> information, like the error message, install paths, version information etc.
>
>
> Uwe Ligges
>
>
>
>> I got the error of configuration failed for package "Rcplex"
>>
>> Any idea?
>>
>>
>>
>>
>> ________________________________
>>    From: Uwe Ligges<lig...@statistik.tu-dortmund.de>

>> Cc: David Winsemius<dwins...@comcast.net>; "r-h...@r-project.org"<r-h...@r-project.org>


>> Sent: Wednesday, February 22, 2012 4:04 AM
>> Subject: Re: [R] installing the package Rcplex
>>
>>
>>
>> On 22.02.2012 03:33, zheng wei wrote:
>>> Thanks.
>>>
>>> I was just reminded by the tech support in my university that cplex is an independent software owned by ILOG, which in turn is now owned by IBM. I suceeded in installing the software cplex under the directory of "C:/Program Files/IBM/ILOG/CPLEX_Studio_Academic124/cplex"
>>> I guess Rcplex is an R package to utilize the software cplex. I have changed the path "/c/ilog/cplex111" to the above path. My question is how to finally and effectively install the package of Rcplex?
>>
>> You have been asked alreeady to read the R Installation and
>> Administration manual.
>>
>> Uwe Ligges
>>
>>
>>
>>>
>>> Thanks,
>>> Wei
>>>
>>>
>>>
>>> ________________________________
>>> From: Uwe Ligges<lig...@statistik.tu-dortmund.de>

>>> Cc: David Winsemius<dwins...@comcast.net>; "r-h...@r-project.org"<r-h...@r-project.org>

-project.org>


>>>> Sent: Monday, February 20, 2012 6:01 AM
>>>> Subject: Re: [R] installing the package Rcplex
>>>>
>>>>
>>>>
>>>> On 20.02.2012 01:54, David Winsemius wrote:
>>>>>
>>>>> On Feb 19, 2012, at 7:45 PM, zheng wei wrote:
>>>>>
>>>>>> I did not know this before. I installed it as you suggested. what to
>>>>>> do next?
>>>>>
>>>>> Read the Installation Manual?
>>>>>
>>>>
>>>> And don't forget this is a source package for which no CRAN Windows
>>>> binary exists, hence it may be not that straightforward to get it done
>>>> and you wil have to read the INSTALL file from the source package carefully.
>>>>
>>>> Uwe Ligges

[[alternative HTML version deleted]]

zheng wei

unread,
Feb 23, 2012, 4:47:32 PM2/23/12
to David Winsemius, r-h...@r-project.org
I appreciate all your help.
 
But I think it is not fair to blame me for not knowing enough about R.
 
You kept telling me to read the R installation manual, and I have read it through for several times and it is not easy for a beginner. It is even hard for a windows user since the whole manual is not quite windows-friendly. In the manual, everything explained in very detail for unix-like command, but every limited explanation for windows user. I think it would be a lot easier for me to grab a unix system even I know nothing about unix now, since the manual is so in detail for unix. The same issue in your responses. This is fine that you only provide help for non-windows users, but you should let me know about this so I would not "persist in multiple departures".
 
Anyway, there are so many windows users.


________________________________
From: David Winsemius <dwins...@comcast.net>

Sent: Thursday, February 23, 2012 1:03 PM


Subject: Re: [R] installing the package Rcplex


On Feb 23, 2012, at 11:54 AM, zheng wei wrote:

> You can tell me what do you mean by add R's bin directory to path.

I think you will find that the R experts expect users to have a higher level of knowledge about your system's workings than you are displaying. Here you are apparently asking them to give  step by step education about how to do a basic Windows software management task. That' not what R-help offers. You could ask this sort of question on a Windows help forum .... or get yourself a book ..... or read the MS documentation.

I'm not a Windows user so don't ask me.

And you really should read the Posting Guide more carefully. You persist in multiple departures from its requested posting style.

--David.

>
> Thanks
>
> From: Uwe Ligges <lig...@statistik.tu-dortmund.de>

@r-project.org>


> >>>> Sent: Monday, February 20, 2012 6:01 AM
> >>>> Subject: Re: [R] installing the package Rcplex
> >>>>
> >>>>
> >>>>
> >>>> On 20.02.2012 01:54, David Winsemius wrote:
> >>>>>
> >>>>> On Feb 19, 2012, at 7:45 PM, zheng wei wrote:
> >>>>>
> >>>>>> I did not know this before. I installed it as you suggested. what to
> >>>>>> do next?
> >>>>>
> >>>>> Read the Installation Manual?
> >>>>>
> >>>>
> >>>> And don't forget this is a source package for which no CRAN Windows
> >>>> binary exists, hence it may be not that straightforward to get it done
> >>>> and you wil have to read the INSTALL file from the source package carefully.
> >>>>
> >>>> Uwe Ligges
>
>

David Winsemius, MD

William Dunlap

unread,
Feb 23, 2012, 9:19:21 PM2/23/12
to zheng wei, David Winsemius, r-h...@r-project.org
One way to set PATH on Windows is to fire up a cmd.exe ("Command Prompt") window
and type something like
set PATH=e:\Rtools-2.13\bin;e:\Rtools-2.13\MinGW\bin;%PATH%;e:\Program Files\R\R-2.14.1\bin
Change it to reflect where you put R and Rtools. I put mine in
e:\Program Files\R\R-2.14.1
and
e:\Rtools-2.13
respectively. While in that cmd.exe window you should be able to use
R CMD INSTALL yourPackage
There are some other 3rd party things like MikTeX that might be nice
to install and have in your path also.

You can also alter PATH by right-clicking on My Computer and selecting
Properties...\Advanced\Environment Variables. Changes there affect
all future runs of programs.

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com

______________________________________________

zheng wei

unread,
Feb 28, 2012, 2:00:25 PM2/28/12
to r-h...@r-project.org
Hello,

I have posted this question earlier and got a lot of helps. Appreciate all those helps. After intensive learning and researching, this is to summurize what I have now.

Target: Install the package Rcplex
OS: windows 7 64bit
The Story:
Installed the Rtool, and setted the path to all relevant directories. Downloaded the tar.gz file to directory of "c:/temp" and rename it to be Rcplex.tar.gz and then used tar command to unzip it under the same directory. Also installed the software of cplex from IBM with license under the directory of c:/IBM, and edited the file of makevars.win in the R package folder as the following

PKG_CPPFLAGS=-I "C:/IBM/ILOG/CPLEX_Studio_Academic124/cplex/include"
PKG_LIBS=-L "C:/IBM/ILOG/CPLEX_Studio_Academic124/cplex/lib/x64_windows_vs2010/stat_mda" -l cplex124 -lm

Then I go to directory of "{installation path for R}\bin\x64" under cmd and typed

R CMD INSTALL -l "{the path to my personal library}" "c:/temp/Rcplex"

I got the error message with a bunch of lines similar to 
 
Rcplex_QCP.o:Rcplex_QCP.c:<.text+0x217> undefined reference to '_imp_CPXcreateprob@12'
Rcplex_QCP.o:Rcplex_QCP.c:<.text+0x217> undefined reference to '_imp_CPXcopylp@60'
.....
.....

Some suspects:
Not sure the following information would be relevant
Originally, I used the command of

R CMD INSTALL "c:/temp/Rcplex"

directly and was told I have no permission to install to the main library. So I used the personal library which was automatically created while I installed other packages. I googled about this error message of "undefined reference to" and some people said "The problem may occur when the library (a file with the .h extension) in which the function is defined is missing or mislocated". I checked the "include" folder for software cplex and it has files cplex.h and ilocplex.h which I thought to be needed.

Any ideas? 
[[alternative HTML version deleted]]

Reply all
Reply to author
Forward
0 new messages