Maxwell, John McFarland jmmaxwell at wsu.edu writes:
Hello,
I'm trying to find a solver that will work for the mixed complementarity
problem (MCP). I've searched the CRAN task view page on optimization and
mathematical programming as well as many google searches to no avail.
Does anyone
Dear useRs,
I am more than happy to announce the next meeting of the Hungarian RUG that
will take place on the 24th of October, and Zoltán Tóth, senior data
engineer at Prezi.com, will speak about Hadley's awesome ggplot2 package.
More details (HUN):
On 13.10.2013 02:52, srecko joksimovic wrote:
ok, ok... thanks.
I'll try with R-sig-ME
Or for short, you are trying to estimate more coefficients than you have
degrees of freedom which is what
rank of X = 1660 ncol(X) = 1895
tries to tell us.
Best,
Uwe Ligges
On Sat, Oct 12, 2013 at
Just a further suggestion:
vec - c(3,2,5,0,1)
mat - t(sapply(vec,=,1:max(vec)))
ifelse(mat,1,0)
Cheers,
Christoph
2013/10/11 arun smartpink...@yahoo.com:
Hi,
In the example you showed:
m1- matrix(0,length(vec),max(vec))
1*!upper.tri(m1)
#or
m1[!upper.tri(m1)] -
Also:
mat+0
#or
mat*1
#However, sapply() based solutions would be slower in large matrices.
#Speed
makeMat3 - function(x,n){
if(is.numeric(x)){
x - as.integer(round(x))
x}
stopifnot(is.integer(x))
if(length(x)=n max(x)=n){
indx-rep(rep(c(1,0),max(length(x),n)),rbind(x,n-x))
m1-
Thanks Uwe,
I wasn't quite sure about that one... when I build model with that
particular variable, that is what happen. have to check why...
Best,
Srecko
On Sun, Oct 13, 2013 at 5:45 AM, Uwe Ligges lig...@statistik.tu-dortmund.de
wrote:
On 13.10.2013 02:52, srecko joksimovic wrote:
ok,
Hi,
Try:
a - matrix(0,100,3)
a1- a
a2 - a
somerows- 1:5
b1- t(replicate(length(somerows),b))
a[somerows,]- b1
head(a)
#or
b2- rep(b,each=length(somerows))
a1[somerows,]- b2
head(a1)
identical(a,a1)
#[1] TRUE
somerows2- c(2,4,7,8,11,14)
b3 - rep(b,each=length(somerows2))
a2[somerows2,] -
iODBC appears no longer to come standard with OSX, so I installed unixodbc and
set it up following instructions here:
http://www.boriel.com/en/2013/01/16/postgresql-odbc-connection-from-mac-os-x/
I connected to my remote database with isql -v mydsn. No problem. Then I tried
from R:
Due to convention a script l - $$\ell$$ (LaTeX \ell) is used to represent a
certain quantity in something I'm working on. I'm unable to figure out how to
use it in R. It's not included in the list on ?plotmath.
Can anyone tell me how to use it? Its unicode is U+2113. This page has a list
of
On 13/10/2013 18:53, Byron Dom wrote:
Due to convention a script l - $$\ell$$ (LaTeX \ell) is used to represent a
certain quantity in something I'm working on. I'm unable to figure out how to use it in
R. It's not included in the list on ?plotmath.
Can anyone tell me how to use it? Its
lm(height ~ ., data=X)
works fine.
However
nnn - height ; lm(nnn ~ . ,data=X)
fails
How do I write such a formula, which depends on the value of a string variable
like nnn above?
A typical application might be a program that takes a data frame containing
only numerical data, and figures out
This being R, there are likely other ways, but I use:
lm(as.formula(paste(nnn, ~ .)),data=X)
Sarah
On Sun, Oct 13, 2013 at 5:04 PM, David Epstein
david.epst...@warwick.ac.uk wrote:
lm(height ~ ., data=X)
works fine.
However
nnn - height ; lm(nnn ~ . ,data=X)
fails
How do I write such
Hi,
May be:
set.seed(24)
X -
data.frame(weight=sample(100:250,20,replace=TRUE),height=sample(140:190,20,replace=TRUE))
Others - colnames(X)[!colnames(X)%in%height]
nnn - height
res - lm(formula(paste(nnn,~,paste(Others, sep=+))),data=X)
res1- lm(height~.,data=X)
#or
res2-
Sorry, a mistake in the code:
#should be collapse instead of sep
res - lm(formula(paste(nnn,~,paste(Others, collapse=+))),data=X)
A.K.
On Sunday, October 13, 2013 5:55 PM, arun smartpink...@yahoo.com wrote:
Hi,
May be:
set.seed(24)
X -
On 2013-10-14 10:04, David Epstein wrote:
lm(height ~ ., data=X)
works fine.
However
nnn - height ; lm(nnn ~ . ,data=X)
fails
How do I write such a formula, which depends on the value of a string
variable like nnn above?
as.formula() with paste() could work, but from where you are now, try
You'll need to tell us what class you time variable is in, e.g. the output of
str(AB), but the following might work:
for (i in unique(as.character(AB$time)) {
Intervall - AB[as.character(AB$time) ==i, ]
...
}
Depending on the format, as.numeric( ) might work too.
Regards
Mikkel
On Saturday,
Hi,
I am getting this:
#Using an example dataset:
set.seed(24)
X -
data.frame(weight=sample(100:250,20,replace=TRUE),height=sample(140:190,20,replace=TRUE))
nnn - height
res - lm(as.formula(paste(nnn, ~.)),data=X)
res2 - lm(get(nnn) ~ . ,data=X)
coef(res)
(Intercept) weight
You might want to try:
assign(d[1], read.csv(yourfile.csv))
...
write.csv(d1, yourfile.csv, append = FALSE)
Regards
Mikkel
On Friday, October 11, 2013 2:53 PM, Dan Abner dan.abne...@gmail.com wrote:
Hi everybody,
I thought I was using the get() fn correctly here to loop over multiple
data
iODBC appears no longer to come standard with OSX, so I installed unixodbc and
set it up following instructions here:
http://www.boriel.com/en/2013/01/16/postgresql-odbc-connection-from-mac-os-x/
I connected to my remote database with isql -v mydsn. No problem. Then I tried
from R:
You'll need to tell us what class you time variable is in, e.g. the output of
str(AB), but the following might work: for (i in unique(as.character(AB$time)) {
Intervall - AB[as.character(AB$time) ==i, ]
...
} Depending on the format, as.numeric( ) might work too. Regards
Mikkel
On Saturday,
Hello,
I am a post-doc of the Federal University of Santa Catarina State
(UFSC). Last year, used EnQuireR for hirarchical cluster analisis and
end up very well. I formated my computer couple months ago and
installed R again as
version x64 3.0.2. have new data which ENMCA function of
Hi Ben,
It looks like the condition is not met in majority of the split elements. So,
when you create a dataframe with the a column with 0 element and another column
with an element, it shows the Error message.
data.frame(dt2=NULL,group=1)
#Error in data.frame(dt2 = NULL, group = 1) :
#
Hi
This seems to work:
spdata$color - ifelse(spdata$change 0, red, green)
plot(spdata$date, log(spdata$close), col = spdata$color)
Regards
Mikkel
On Friday, October 11, 2013 5:14 PM, Mubar simon.keu...@student.unisg.ch
wrote:
Hi
I have a question regarding plots in R. I have data from the
Dear,
I want to use for loop and if..else condition together for
finding such value from a two column in a spreadsheet.
Thanks Regards
Shameem Akhtar
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
24 matches
Mail list logo