Displaying 20 results from an estimated 400 matches similar to: "constrained optimization"
2009 Apr 29
3
legend with small colored boxes
Hi all,
I tried to a nice legend with small boxes filled with the colors used
for the plots. But it does nor work, boxes are always filled with black.
An example is here
plot(1:4,1:4)
lines(1:4,4:1, col="blue")
legend("top",leg=c("a","b"),col=c("black","blue"), fill=TRUE)
How could I specify the colors? the argument col.box is the
2009 Sep 19
1
generic methods - in particular the summary function
Hi all,
I'm currently working on the fitdistrplus package (that basically fit
distributions). There is something I do not understand about the
generic function summary.
In the current version on CRAN, there is no NAMESPACE saying
S3method(summary, fitdist)
.
However if we use summary on an object send by fitdist function it
works fine...
According to R-lang, we have
"
The most
2009 May 10
2
Vignettes with missing or empty \VignetteIndexEntry:
Hi,
I have a problem when checking the package 'probdistr' (on probability
distributions).
I got this warning
* checking index information ... WARNING
Vignettes with missing or empty \VignetteIndexEntry:
[1] "probdistr-chi" "probdistr-contextra" "probdistr-discrete"
[4] "probdistr-discrextra" "probdistr-exp"
2009 May 15
3
drawing arrows
Hi,
I would like to draw arrows in a classic 2D plot. Which package should I
use? is there R base functions that do job?
On google, I could not find any useful discussion about this topic, except a
link to the function 'grid.arrows' of the grid package.
My problem is I would like to draw arrows at the edge of circles drawn by
the 'symbols' function. Maybe there is already a
2009 Nov 13
2
AR(2) modelling
Hi useRs,
I'm trying to fit a basic AR(2) model with the 'ar' function. And when
I try to check the value of the coefficients, I could not find the
same value as the 'ar' function.
Here is my example:
myserie <- c(212, 205, 210, 213, 217, 222, 216, 218, 220, 212, 215, 236)
#plot(myserie, type="l")
myserieminus0 <- tail(myserie, -2)
myserieminus1 <-
2009 Nov 13
2
AR(2) modelling
Hi useRs,
I'm trying to fit a basic AR(2) model with the 'ar' function. And when
I try to check the value of the coefficients, I could not find the
same value as the 'ar' function.
Here is my example:
myserie <- c(212, 205, 210, 213, 217, 222, 216, 218, 220, 212, 215, 236)
#plot(myserie, type="l")
myserieminus0 <- tail(myserie, -2)
myserieminus1 <-
2009 Jul 30
1
rowSums, rowMean and rowCumSums?
Dear list,
Don't you think it could be useful to have in R base a function
rowCumSums, that compute cumulative sums for each row of a matrix?
My implementation of rowCumSums is
rowCumSums <- function(x) t(mapply(function(row)cumsum(x[row,]),
1:NROW(x)))
I'm sure it can be improved to have other arguments like na.rm or dims.
Is there any hope to have this function in R?
2011 Apr 19
1
An update of the Distribustions man page
Dear list,
I would like to suggest a small update the ?Distributions man page of the
stats package. The current version contains the following line.
The CRAN package \pkg{SuppDists} for additional distributions.
I think it would be better to put in this man page a link to the CRAN task
view on Distributions
http://cran.r-project.org/web/views/Distributions.html. It is not true
that the
2009 Apr 27
1
problem with symbol function
Hi all,
I use the symbol functions to draw circles. But the argument lty does
not work on windows but works correctly on my macbook:
x <- -4:4
y <- -4:4
plot(x,y,type="n")
symbols(0, 0, add = TRUE, circles = 1, inches = 1, fg="black",
lty="solid")
symbols(0, 0, add = TRUE, circles = 1, inches = 2, fg="black",
lty="dashed")
The
2009 Jul 21
1
thousands separator
Dear useRs,
I was wondering how to deal with data where thousands separator is a space
or a comma? with google, I thought I found the answer but the thread (
http://tolstoy.newcastle.edu.au/R/help/06/04/25524.html) just focuses on
decimal separator.
Is there any function to numbers written like this in a csv file?
Thanks in advance
Christophe
--
Christophe DUTANG
Ph. D. student at ISFA
2010 Aug 06
1
on the optim function
Dear useRs,
I have just discovered that the R optim function does not return the number of iterations.
I still wonder why line 632-634 of optim C, the iter variable is not returned (for the BFGS method for example) ?
Is there any trick to compute the iteration number with function call number?
Kind regards
Christophe
--
Christophe Dutang
Ph.D. student at ISFA, Lyon, France
website:
2010 Feb 08
2
the hat ^ in regular expression
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20100208/52a6d080/attachment.pl>
2009 Oct 10
2
[R-SIG-Mac] rnorm.halton
Hi all,
I need to transform classic 32bit Fortran code to 64bit Fortran code,
see the discussion [R-SIG-Mac] rnorm.halton. But I'm clearly a
beginner in Fortran...
Does someone already do this for his package?
From here, http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=linux&db=bks&fname=/SGI_Developer/Porting_Guide/ch03.html
, I identify the following changes
2011 Jun 22
2
First package submission to CRAN
I'm preparing to submit my first package to CRAN, thanks to the help of too
many people to mention.
I've built and checked the package on Windows ( making a zip) and my path
points to the 64 bit version of R.
Everything builds and checks and the final warnings have been fixed. My
package is pure R with no source from
other languages. My questions are as follows. I've read the
2012 May 22
1
Patch to add Beta binomial distribution. Mentor needed!
Hello,
I implemented the Beta binomial distribution following the patterns of the
binomial distribution code and inspired by JAGS' code [1]. I have studied
the code carefully but it's my first run in the R internals.
Can somebody review the code and if everything it's ok commit to the
repository?
[1]
2009 Mar 10
1
dger_ in BLAS definition
I'm developing some software and running into compiling warning:
conditionals.c:104: warning: passing argument 4 of 'dger_' discards
qualifiers from pointer target type
conditionals.c:104: warning: passing argument 6 of 'dger_' discards
qualifiers from pointer target type
the netlib documentation states that the arguments x and y should be
unchanged on exit. Should should
2012 Mar 16
1
Beta binomial and Beta negative binomial
Hi,
I need Beta binomial and Beta negative binomial functions but in R there is
only SuppDists package which provide this distributions using a limited
parameter space of the generalized hypergeometric distribution (dghyper & Co.)
which provide a limited parameter space for Beta binomial and Beta negative
binomial functions (e.g. alpha + beta <1 in the Beta negative binomial).
I've
2009 Feb 22
2
R tutorial
Dear all,
I have just found a 'good' tutorial R for datamining. I think it
should be on the contributed docs.
http://cran.r-project.org/other-docs.html
Here is the link
http://www.liaad.up.pt/~ltorgo/DataMiningWithR/
What do you think?
Kind regards
Christophe
--
Christophe Dutang
Ph. D. student at ISFA, Lyon, France
website: http://dutangc.free.fr
2011 May 12
1
Maximization of a loglikelihood function with double sums
Dear R experts,
Attached you can find the expression of a loglikelihood function which I
would like to maximize in R.
So far, I have done maximization with the combined use of the
mathematical programming language AMPL (www.ampl.com) and the solver
SNOPT (http://www.sbsi-sol-optimize.com/manuals/SNOPT%20Manual.pdf).
With these tools, maximization is carried out in a few seconds. I wonder
if that
2010 Nov 02
2
on the usage of do.call
Hello all,
I don't know if it is possible, but I would like to use do.call in C code in
my package. The function do.call is defined as
> do.call
function (what, args, quote = FALSE, envir = parent.frame())
{
if (!is.list(args))
stop("second argument must be a list")
if (quote) {
enquote <- function(x) as.call(list(as.name("quote"),