Displaying 20 results from an estimated 300 matches similar to: "lpSolve space problem in R 2.4.1 on Windows XP"
2007 Jul 12
1
sub-function default arguments
Hi.
I have defined a function, f1, that calls another function, f2. Inside f1
an intermediate variable called nm1 is created; it is a matrix. f2 takes a
matrix argument, and I defined f2 (schematically) as follows:
f2<-function(nmArg1=nm1,...){nC<-ncol(nmArg1); ... }
so that it expects nm1 as the default value of its argument. f1 is defined
(schematically) as:
2009 Sep 20
4
correlation help
Dear group,
I have a matrix like the following:
Name Sample1 sample2 sample3 sample4 ..... sample(n)
nm1 10.5 13.5 30 31
nm2 8 11 34 29
nm3 9 10.3 27.8 35
nm(j)
I want to be able to calculate correlation between all pairs of names.
For example (nm1,nm2),
2009 Mar 13
2
Taking diff of character vectors
Hello, everybody
Say I have
nm1 <- c(rep(1,10), rep(0,10))
then I can do:
diff(nm1)
to see where I have shift in value
but what if I have
nm2 <- c(rep("SPZ8", 10), rep("SPX9", 10))
how can I produce the same ouput as diff(nm1) does, that is zeros
everywhere except for one place where SPZ8 changes to SPX9 (there
should be 1 there)?
What if I have a matrix of characters
2016 Dec 20
2
colnames for data.frame could be greatly improved
Hello,
colnames seems to be not optimized well for data.frame. It escapes
processing for data.frame in
if (is.data.frame(x) && do.NULL)
return(names(x))
but only when do.NULL true. This makes huge difference when do.NULL
false. Minimal edit to `colnames`:
if (is.data.frame(x)) {
nm <- names(x)
if (do.NULL || !is.null(nm))
return(nm)
else
2016 Jun 07
1
How to prevent users from deleting directories
Hello All,
I am new to Samba and having to learn it fast as I have taken over for someone who left staff. I have been asked if we can prevent users from removing directories and sub directories under a Samba share while still allowing them to read and write files to these directories. For instance we have a share defined as follows:
[Baskets_Out]
comment = NGP Test Baskets Out
2011 Oct 17
1
plotting issues with PCA
Hi Listers,
This has a simple answer but it has been eluding me nonetheless.
I have been building a PCA plot from scratch with the ability to plot
predefined groups in different colors. This has worked fine but when I try
to get a polygon drawn around each of the groups it is not recognising my
colour file correctly and is only printing the first colour in the
file....code is below
2004 Jun 22
0
semi-continuous variables in lpSolve package
Hi,
I am working with lpSolve "R" package by Sam Buttrey, buttrey at nps.navy.mil ,
which is interface to lp_solve linear/integer programming system.
You can find information about lp_solve at http://groups.yahoo.com/group/lp_solve/ (free registration required).
lpSolve (R package) supports linear and integer programming but it does not support semi-continuous variables
2009 Sep 17
0
lpSolve constraints don't seem to have an effect
Dear R users,
I would like to optimize a linear approximation of a quadratic function
using lpSolve. My code runs without any error or warning message but the
constraints that I set don't seem to work properly.
Nevertheless, I am certain that my code is somewhere wrong.
I would like to solve the following problem:
max 2x-x^2+y
subject to
2x^2 + 3y^2 <= 6
2>= x,y >= 0
I would
2004 Jun 09
1
Re: R equivalent of Splus rowVars function
Mark Leeds <mleeds at mlp.com> wrote (to S-News):
> does anyone know the R equivalent of the SPlus rowVars function ?
Andy Liaw <andy_liaw at merck.com> replied:
> More seriously, I seem to recall David Brahms at one time had created an R
> package with these dimensional summary statistics, using C code. (And I
> pointed him to the `two-pass' algorithm for variance.)
2009 Sep 22
2
Semi continous variable- define bounds using lpsolve
How to define bounds for a semi continous variable in lp_solve.
Min 5x1 +9x2 +7.15x3 +0.1x4
subject to
x1+x2+x3+x4=6.7
x1+x4 <= 6.5
And x3 can be 0 or greater than 3.6
hence x3 is a semi continous variable
how to define bounds as well as semicontinous function because using
set.semicont and set. bound simantaneously doesn't seem to work.Thanks in
advance for the help
--
View this
2007 Oct 01
1
lpSolve doesn't compile because of a malloc.h error
Under freebsd 6.2-p7 i386, R 2.5.1,gcc-4.2.2 I'm unable to compile package
lpSolve because:
hpbsd# R CMD INSTALL lpSolve_5.5.8.tar.gz
* Installing to library '/usr/local/lib/R/library'
* Installing *source* package 'lpSolve' ...
** libs
cc -std=gnu99 -I/usr/local/lib/R/include -I/usr/local/lib/R/include -I . -DINTEGERTIME -DPARSER_LP -DBUILDING_FOR_R -DYY_NEVER_INTERACTIVE
2010 Mar 19
0
lpSolve
Hey,
Anyone who knows what the following error report when calling lp() in
package lpSolve means?
Error: status 3
JT
--
View this message in context: http://n4.nabble.com/lpSolve-tp1599380p1599380.html
Sent from the R help mailing list archive at Nabble.com.
2010 Jul 06
1
question about lpSolve package
Hello R users,
I have two quick questions while using "lpSolve" package for linear programming. (1) the result contains both characters and numbers, e.g., Success: the objective function is 40.5, but I only need the number, can I only store the number? (2) How to set boundaries for variables? e.g., all variable are positive.
Thanks a lot!
Xiaoxi
2016 Dec 27
0
colnames for data.frame could be greatly improved
Hi there,
Any update on this?
Should I create bugzilla ticket and submit patch?
Regards
Jan Gorecki
On 20 December 2016 at 01:27, Jan Gorecki <J.Gorecki at wit.edu.pl> wrote:
> Hello,
>
> colnames seems to be not optimized well for data.frame. It escapes
> processing for data.frame in
>
> if (is.data.frame(x) && do.NULL)
> return(names(x))
>
> but
2010 Jan 28
0
lpSolve API - add Vs set
Hi,
Using the package lpSolve API, I need to build a 2000*100000 constraint matrix.
I wonder which method is faster:
(a)
model = make.lp(0,0)
add.constraint(model, ...)
or
(b)
model = make.lp(2000,100000)
set.constraint(model,...)
Thanks
------------
KC
2004 Oct 28
0
About lp.assign in lpSolve package
Hi.
I've tried to execute "example(lp.assign)" in
lpSolve package.
However, this solution seemed not to return correct
answer, all matrix elements were zeros.
Could you give me any "solution" about this?
Regards.
2013 Apr 23
0
lp.transport in package lpSolve
Dear all,
I'm working on a very complex linear optimization problem using the
lp.transport function in lpSolve. My PC has 10 cores, but by default R uses
only one of them.
Is there a straightforward way to make lp.transport use all cores
available? I had a look at "High-performance and parallel computing in R" (
http://cran.r-project.org/web/views/HighPerformanceComputing.html),
2009 Jun 17
0
lpSolve lp const.dir
Hi. In the help page for "lp" in package lpSolve, regarding
"const.dir" it says:
const.dir: Vector of character strings giving the direction of the
constraint: each value should be one of "<," "<=," "=," "==," ">," or
">=". (In each pair the two values are identical.)
I am having trouble understanding
2005 Oct 14
0
arguments of lpSolve
Dear all,
I am a beginner with lpSolve package (and not an expert in the others).
I can not understand why I am doing wrong, and I would be very grateful if
anyone could please help me on this.
I am trying to optimize ("min") the sum of columns/variables, constrained to
>=1. Each column/variables has its weight - given by values at f.obj.
The matrix for numeric constraint
2009 Jul 02
1
lpSolve: how to allow variables to become negative
Dear all,
I am interested in solving a MIP problem with binary outcomes and
continuous variables, which ARE NOT RESTRICTED TO BE NEGATIVE. In
particular,
Max {z1,z2,z3,b1} z1 + z2 + z3
(s.t.)
# 7 z1 + 0 z2 + 0 z3 + b1 <= 5
# 0 z1 + 8 z2 + 0 z3 - b1 <= 5
# 0 z1 + 0 z2 + 6 z3 + b1 <= 7
# z1, z2, z3 BINARY {0,1}
# -5<= b1 <=5 (i.e. b1 <= 5; -b1 <= 5 )
Using