Re: [R] Monotonic interpolation

2007-09-06 Thread Vincent Goulet
Le jeu. 6 sept. à 09:45, excalibur a écrit : Hello everybody, has anyone got a function for smooth monotonic interpolation (splines ...) of a univariate function (like a distribution function for example) ? approxfun() might be what your looking for.

Re: [R] question about ar1 time series

2007-07-16 Thread Vincent Goulet
, reproducible code. --- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] CDF for pareto distribution

2007-07-11 Thread Vincent Goulet
-July/ 136137.html) you quote a negative scale parameter. The Pareto I know has strictly positive shape and scale parameters. Perhaps can you retry with functions ppareto() or pgenpareto() of package actuar. --- Vincent Goulet, Associate Professor École d'actuariat Université Laval

Re: [R] CDF for pareto distribution

2007-07-11 Thread Vincent Goulet
with the pgpd() function, you should contact the maintainer of package POT, as the Posting Guide asks. HTH Vincent Goulet wrote: Le 07-07-11 à 07:56, livia a écrit : Hi, I would like to use the following codes to plot the CDF for pareto distribution. Before doing this, I have plot

Re: [R] R Book Advice Needed

2007-06-14 Thread Vincent Goulet
@stat.math.ethz.ch 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. --- Vincent Goulet, Professeur agrégé École d'actuariat Université

[R] [R-pkgs] New version of actuar

2007-04-23 Thread Vincent Goulet
this version altogether.] Collaboration is welcome. Please contact me directly. -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca ___ R-packages mailing list

Re: [R] How to return more than one variable from function

2007-04-21 Thread Vincent Goulet
Le Vendredi 20 Avril 2007 11:23, vous avez écrit : From: Vincent Goulet Le Vendredi 20 Avril 2007 07:46, Julien Barnier a écrit : Hi, I have written a function which computes variance, sd, r^2, R^2adj etc. But i am not able to return all of them in return statement. You

Re: [R] How to return more than one variable from function

2007-04-20 Thread Vincent Goulet
, Julien -- Vincent Goulet, Professeur agrégé École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Problem installing packages

2007-04-19 Thread Vincent Goulet
code. --- Vincent Goulet, Professeur agrégé École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] An example of overloading [

2007-03-13 Thread Vincent Goulet
Package: http://vgoulet.act.ulaval.ca/actuar/ HTH -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R-help@stat.math.ethz.ch mailing list https

Re: [R] Accessing the class of an object with two elements.

2007-02-22 Thread Vincent Goulet
the warning. Executing your code piece by piece would tell you that. That said, you probably rather want to use inherit() for such purposes. HTH -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca

Re: [R] Extract NULL column in a matrix e.g. matrix[,-NULL]

2007-02-11 Thread Vincent Goulet
in -NULL : invalid argument to unary operator I know I could use ifelse, but it would complicate my model a lot. Is there a direct way to specify that the number of columns to remove is 0? Pierre Lapointe Would aa - if (n 0) aa[, -n] else aa still be too complicated? --- Vincent Goulet

Re: [R] Newbie: Acf function

2007-02-08 Thread Vincent Goulet
-- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Bayesian inference: Poisson distribution with normal (!) prior

2007-01-26 Thread Vincent Goulet
value returned by rnorm(), etc. Am I missing what you want to do? -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R-help@stat.math.ethz.ch mailing list

[R] Easy to install GNU Emacs for Windows

2007-01-24 Thread Vincent Goulet
.] -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] avoiding a loop?

2006-10-12 Thread Vincent Goulet
,Insp9 Thanks. Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax:  614-455-3265 http://www.StatisticalEngineering.com paste() will do what you want. -- Vincent Goulet, Professeur agrégé École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http

Re: [R] Best use of LaTeX listings package for pretty printing R code

2006-09-25 Thread Vincent Goulet
}, alsoletter={.\%},% alsoother={:_\$}} \lstset{language=Renhanced,extendedchars=true, basicstyle=\small\ttfamily, commentstyle=\textsl, keywordstyle=\mdseries, showstringspaces=false, index=[1][keywords], indexstyle=\indexfonction} with [EMAIL PROTECTED] -- Vincent Goulet

Re: [R] Building the call of an arbitrary function

2006-09-20 Thread Vincent Goulet
Le Dimanche 17 Septembre 2006 14:12, Duncan Murdoch a écrit : On 9/17/2006 12:36 PM, Vincent Goulet wrote: Hy all, Is there a direct way to build the complete function call of an arbitrary function? Here's what I want to do. A function will build a function which will itself call

[R] Building the call of an arbitrary function

2006-09-17 Thread Vincent Goulet
the whole thing as a character string. Would it be the only option? Thanks for any help. -- Vincent Goulet, Professeur agrégé École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R-help@stat.math.ethz.ch

Re: [R] Sweave and the [ function

2006-09-04 Thread Vincent Goulet
=FALSE= [(women,1) @ echo=FALSE, eval=TRUE= [(women,1) @ I often end up doing similar things. HTHVincent -- Vincent Goulet, Professeur agrégé École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R

Re: [R] Follow Up To: Splitting the left and right hand terms of a formula

2006-07-25 Thread Vincent Goulet
: f - ~ x | y + z f[[2]] x | y + z f[[2]][[2]] x f[[2]][[3]] y + z Bye!Vincent -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R-help@stat.math.ethz.ch

Re: [R] Fitting Distributions Directly From a Histogram

2006-06-18 Thread Vincent Goulet
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Vincent Goulet, Professeur agrégé École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R-help@stat.math.ethz.ch mailing

[R] Announce: Contributed Documentation

2006-01-30 Thread Vincent Goulet
prepare an English version of the document. The document is published under the GNU Free Documentation License. In the hope the document may be useful, -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca

Re: [R] sweave/help

2005-10-26 Thread Vincent Goulet
in advance ! I don't know the answer to your exact question, but: why not simply \input the LaTeX version of the help page in your document? -- Vincent Goulet, Professeur agrégé École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca

Re: [R] making an inicator variable

2005-10-25 Thread Vincent Goulet
. Can someone tell me how? Thanks so much, Jen What about x - 1 (where 'x' is a vector of 1's and 2's)? -- Vincent Goulet, Professeur agrégé École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R

Re: [R] Subsetting a list

2005-10-19 Thread Vincent Goulet
--- where the third dimension is of varying length. Wow. I agree, though, that the result of 'print' on such an object is not crystal clear (but does make sense). [...] -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http

Re: [R] How to install R 2.2.0 Debian 'unstable' package in otherwise 'sarge' system

2005-10-13 Thread Vincent Goulet
packages on my 'testing' system is to list them all in /etc/apt/preferences. It is neither convenient nor safe since I will eventually miss unlisted packages. Thanks in advance! -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http

Re: [R] shell scripts in R

2005-10-13 Thread Vincent Goulet
be redundant. (True R wizard can correct me if I,m not accurate.) When I first encountered R's man pages, I thought they were rather sparse compared to those of S-Plus. Now I find they are just to the point and so much easier to consult! -- Vincent Goulet, Professeur agrégé École d'actuariat

Re: [R] Sweave and Rnews

2005-10-11 Thread Vincent Goulet
. Is there a more elegant and automatic solution to this problem? See the Sweave FAQ: http://www.ci.tuwien.ac.at/~leisch/Sweave/FAQ.html#x1-16000A.14 -- Vincent Goulet, Professeur agrégé École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca

Re: [R] color for points

2005-10-09 Thread Vincent Goulet
, no matter the value of argument 'n'. Building also on Jim Holtman's comment, may I rather suggest csr - function(n=60) { x - cbind(runif(n), runif(n)) plot(x, col=rep(c(blue, red, green), each=20, length.out=n)) x # why not return the values... } HTH -- Vincent Goulet

Re: [R] dynamic lists (data frames?)

2005-09-27 Thread Vincent Goulet
' or 'data[[1]]'. I'd use different names... HTH. -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman

Re: [R] Add function to histogram?

2005-09-21 Thread Vincent Goulet
in proportions, not in frequencies. -- Vincent Goulet, Professeur agrégé École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

[R] Avoid Sweave from stopping on errors

2005-09-07 Thread Vincent Goulet
nothing in case of an error? Thanks in advance! -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

[R] Testing if all elements are equal in a vector/matrix

2005-08-29 Thread Vincent Goulet
, Vincent -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Testing if all elements are equal in a vector/matrix

2005-08-29 Thread Vincent Goulet
) Vincent Goulet wrote: Is there a canonical way to check if all elements of a vector or matrix are the same? Solutions below work, but look hackish to me. x - rep(1, 10) all(x == x[1]) # == operator does not provide for small differences [1] TRUE isTRUE(all.equal(x, rep(x[1], length(x

[R] Issues with convolve

2005-07-20 Thread Vincent Goulet
3.351211e-19 2.758626e-19 [6] 3.530111e-19 2.735041e-19 2.376711e-19 2.591287e-19 3.196405e-19 sum(fsc)# no impact on the sum [1] 1 -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca

Re: [R] Density curve over a histogram

2005-04-27 Thread Vincent Goulet
Le 27 Avril 2005 14:06, Paul Smith a écrit : I would like to draw a picture with the density curve of a normal distribution over a histogram of a set of random numbers extracted from the same normal distribution. Is that possible? Sure. See curve() with add=TRUE. Don't forget to use prob=TRUE

Re: [R] if(foo == TRUE) .. etc

2005-04-22 Thread Vincent Goulet
, but one cannot redefine them. In other words, TRUE and FALSE are also reserved names in S-Plus. So, using TRUE and FALSE seems to be a common denominator for R and S-Plus (and a sensible choice, for that matter). That's what I teach my students. Vincent -- Vincent Goulet, Associate Professor

Re: [R] Using R to illustrate the Central Limit Theorem

2005-04-21 Thread Vincent Goulet
-- Vincent Goulet, Professeur agrégé École d'actuariat Université Laval, Québec __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] Tool for update

2005-03-29 Thread Vincent Goulet
on Tuesdays --- by using a cron job instead. (That's assuming you're using a Unix variant, I suppose there is some equivalent way to achieve the same thing on Windows.) Regards, -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http

Re: [R] and [ESS] Starting ESS

2005-02-24 Thread Vincent Goulet
] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL

Re: [R] estimate the parameter of exponential distribution, etc.

2005-02-22 Thread Vincent Goulet
likelihood estimation, look into 'fitdistr' in package MASS. Hope this helps! -- Vincent Goulet, Professeur agrégé École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ R-help@stat.math.ethz.ch mailing

Re: [R] defining a function by branches

2004-10-14 Thread Vincent Goulet
of: u - function(x, Ed) ifelse(x 2 * Ed, 0.5 * x, 1) curve(u(x), ...) (Note that this does take the case x = Ed into account, which is not covered in your definition.) HTH -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http

Re: [R] (no subject)

2004-07-14 Thread Vincent Goulet
]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Vincent Goulet, Professeur agrégé École d'actuariat Université Laval, Québec

Re: [R] Daily time series

2004-07-07 Thread Vincent Goulet
/posting-guide.html -- Vincent Goulet, Associate Professor École d'actuariat Université Laval, Québec [EMAIL PROTECTED] http://vgoulet.act.ulaval.ca __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE