Re: [R] mixtools? Fitting two-normal distributions to data where one of the two normal distributions (the one corresponding to lower values of x) is a left-truncated normal distribution.

2015-07-01 Thread Denis Chabot
Hi John, I don't know how well it will handle your truncated left distribution, but I use the function Mclust from package mclust to fit a mixture of normal distribution and it works very well. Denis Le 2015-06-30 à 22:22, John Sorkin jsor...@grecc.umaryland.edu a écrit : I am trying to

Re: [R] repeated measures: multiple comparisons with pairwise.t.test and multcomp disagree

2015-06-24 Thread Denis Chabot
Tukey 2015-06-23 5:17 GMT+02:00 Denis Chabot denis.cha...@me.com: Hi, I am working on a problem which I think can be handled as a repeated measures analysis, and I have read many tutorials about how to do this with R. This part goes well, but I get stuck with the multiple comparisons

[R] repeated measures: multiple comparisons with pairwise.t.test and multcomp disagree

2015-06-22 Thread Denis Chabot
that I am doing something wrong. Thanks in advance, Denis Chabot Fisheries Oceans Canada sessionInfo() R version 3.2.0 (2015-04-16) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.10.3 (Yosemite) locale: [1] fr_CA.UTF-8/fr_CA.UTF-8/fr_CA.UTF-8/C/fr_CA.UTF-8/fr_CA.UTF-8

[R] puzzled by time zone quirk

2014-09-21 Thread Denis Chabot
secs Setting tz to Europe/Copenhagen in summer in c first appears to be the same as setting it to CEST because the output is showing CEST. But d should then be the same as c, and it is not. What is happening? Thanks in advance, Denis Chabot __ R

Re: [R] puzzled by time zone quirk

2014-09-21 Thread Denis Chabot
. But at least I now know not to use CEST. Denis Le 2014-09-21 à 10:00, Prof Brian Ripley rip...@stats.ox.ac.uk a écrit : On 21/09/2014 14:11, Denis Chabot wrote: Hi, I have to deal with time-stamped data coming from outside my own time zone, so the problem is likely poor knowledge

Re: [R] puzzled by time zone quirk

2014-09-21 Thread Denis Chabot
Hi again, With the new installation: R version 3.1.1 (2014-07-10) Platform: x86_64-apple-darwin13.1.0 (64-bit) locale: [1] fr_CA.UTF-8/fr_CA.UTF-8/fr_CA.UTF-8/C/fr_CA.UTF-8/fr_CA.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via

[R] subsetting and Dates

2013-05-23 Thread Denis Chabot
Hi, I am trying to understand why creating Date variables does not work if I subset to avoid NAs. I had problems creating these Date variables in my code and I thought that the presence of NAs was the cause. So I used a condition to avoid NAs. It turns out that NAs are not a problem and I do

Re: [R] subsetting and Dates

2013-05-23 Thread Denis Chabot
- From: Denis Chabot chabot.de...@gmail.com To: R-help@r-project.org Cc: Sent: Thursday, May 23, 2013 5:35 PM Subject: [R] subsetting and Dates Hi, I am trying to understand why creating Date variables does not work if I subset to avoid NAs. I had problems creating these Date variables

[R] puzzling Date math result

2012-04-17 Thread Denis Chabot
Hi, I cannot make a reproducible example easily for my problem, so I'll describe it as best as I can. I merged 2 dataframes but was surprised when one line on the x dataframe did not get a match in the y dataframe, because I knew such a match existed. There was only one by variable in the merge,

[R] strange convention for time zone names

2011-08-19 Thread Denis Chabot
Hi, My time zone in Montreal is Standard time zone:UTC/GMT -5 hours (see http://www.timeanddate.com/worldclock/city.html?n=165). Yet, in R (POSIXct objects) I must specify the opposite, i.e. UTC+5: dateMontreal = as.POSIXct(2011-01-15 05:00:00, tz=EST) dateMontreal2 =

[R] ifelse strips POSIXct class from object

2011-06-05 Thread Denis Chabot
Hi, I was losing my dates in a script and upon inspection, found that my recent switch from separate if and else to ifelse was the cause. But why? my.date = as.POSIXct(2011-06-04 08:00:00) default.date = seq(as.POSIXct(2011-01-01 08:00:00), as.POSIXct(2011-09-01 08:00:00), length=15) x = 4 *

Re: [R] ifelse strips POSIXct class from object

2011-06-05 Thread Denis Chabot
Thanks Duncan, I'll go back to if and else! Denis Le 2011-06-05 à 08:39, Duncan Murdoch a écrit : On 11-06-05 8:23 AM, Denis Chabot wrote: Hi, I was losing my dates in a script and upon inspection, found that my recent switch from separate if and else to ifelse was the cause. But why

Re: [R] ifelse strips POSIXct class from object

2011-06-05 Thread Denis Chabot
I did not know this function, thanks a lot Gabor. Denis Le 2011-06-05 à 08:48, Gabor Grothendieck a écrit : On Sun, Jun 5, 2011 at 8:23 AM, Denis Chabot chabot.de...@gmail.com wrote: Hi, I was losing my dates in a script and upon inspection, found that my recent switch from separate

Re: [R] ifelse strips POSIXct class from object

2011-06-05 Thread Denis Chabot
Hi Duncan, In this case they all had length 1, but I'll be careful at other occasions. Denis Le 2011-06-05 à 09:26, Duncan Murdoch a écrit : On 11-06-05 8:49 AM, Denis Chabot wrote: Thanks Duncan, I'll go back to if and else! Be careful, it might not give you the same answer. I'd use

[R] unwanted switch to DST with POSIXct objects

2011-06-05 Thread Denis Chabot
Hi, For a project I try to keep everything in normal time, not daylight saving time, to prevent problem when instruments collected data during the nights when we go from DST to normal time. But sometimes R tricks me and I do not know how to prevent it. This is one example: lights_on =

Re: [R] unwanted switch to DST with POSIXct objects

2011-06-05 Thread Denis Chabot
Thanks Jeff and Spencer, I will probably set the time zone for my session, but I had forgotten the possibility of setting the time zone attribute of a POSIXct object, which would have solved my problem also. Denis Le 2011-06-05 à 11:14, Spencer Graves a écrit : On 6/5/2011 9:30 AM, Jeff

[R] reading fixed width format data with 2 types of lines

2010-08-12 Thread Denis Chabot
this in an ascii file that will then be reopened with a read.fwf call, and do the same with lines that begin with 4. But this does not appear to me to be very elegant nor efficient… Is there a better method? Thanks in advance, Denis Chabot __ R-help@r

[R] superfluous distribution found with mclust

2010-03-22 Thread Denis Chabot
- dens(modelName = myModel$modelName, data = newx, parameters = myModel$parameters) lines(newx, Dens, col=blue) Do you know why I get this first distribution with no member? Thanks in advance, Denis Chabot

Re: [R] alternative to rbind within a loop

2009-07-24 Thread Denis Chabot
to be sure. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Denis Chabot Sent: Thursday, July 23

[R] alternative to rbind within a loop

2009-07-23 Thread Denis Chabot
, Denis Chabot __ R-help@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.

Re: [R] Problem with as.POSIXct on dates object

2009-07-20 Thread Denis Chabot
Hi, if you look at my example in recent thread Rép : [R] problem with as.POSIXct and daylight savings time, it appears that tz argument is used by as.POSIX.ct Denis Chabot Le 09-07-20 à 00:00, Remko Duursma a écrit : as.POSIXct.dates does not make use of tz: Ok, but it is supposed

[R] problem with as.POSIXct and daylight savings time

2009-07-19 Thread Denis Chabot
) Erreur dans strptime(xx, f - %Y-%m-%d %H:%M:%OS, tz = tz) : valeur 'tz' incorrecte ??? Thanks, Denis Chabot sessionInfo() R version 2.9.1 Patched (2009-07-09 r48929) x86_64-apple-darwin9.7.0 locale: fr_CA.UTF-8/fr_CA.UTF-8/C/C/fr_CA.UTF-8/fr_CA.UTF-8 attached base packages: [1] stats graphics

[R] problem with as.POSIXct and daylight savings time

2009-07-19 Thread Denis Chabot
=tzone) Erreur dans strptime(xx, f - %Y-%m-%d %H:%M:%OS, tz = tz) : valeur 'tz' incorrecte ??? Thanks, Denis Chabot sessionInfo() R version 2.9.1 Patched (2009-07-09 r48929) x86_64-apple-darwin9.7.0 locale: fr_CA.UTF-8/fr_CA.UTF-8/C/C/fr_CA.UTF-8/fr_CA.UTF-8 attached base packages: [1] stats

Re: [R] problem with as.POSIXct and daylight savings time

2009-07-19 Thread Denis Chabot
not be of much help as whether or not I use as.POSIXct or chron, there is one day of the year that has 25 h and I need to deal with that 25th hour or I'll lose one hour of data! Denis Le 09-07-19 à 11:45, Duncan Murdoch a écrit : On 19/07/2009 11:23 AM, Denis Chabot wrote: [was [R] end of daylight

Re: [R] problem with as.POSIXct and daylight savings time

2009-07-19 Thread Denis Chabot
Thanks for the suggestion, Spencer. I will take a look and will report to the list if I find this a better solution for my situation. Might take a couple of days though. Denis Le 09-07-19 à 12:42, spencerg a écrit : Have you considered the timeDate package? Spencer Denis Chabot wrote

[R] end of daylight saving time

2009-07-15 Thread Denis Chabot
) as.POSIXct(c, tz=tzone) Erreur dans strptime(xx, f - %Y-%m-%d %H:%M:%OS, tz = tz) : valeur 'tz' incorrecte ??? Thanks, Denis Chabot sessionInfo() R version 2.9.1 Patched (2009-07-09 r48929) x86_64-apple-darwin9.7.0 locale: fr_CA.UTF-8/fr_CA.UTF-8/C/C/fr_CA.UTF-8/fr_CA.UTF-8 attached base

Re: [R] puzzled by math on date-time objects

2009-03-11 Thread Denis Chabot
. - Phil On Tue, 10 Mar 2009, Denis Chabot wrote: Thanks Phil, but how does summary() finds the median of the same type of object? I would have thought the algorithm used when the vector is even would also require the SUM of the POSIX

[R] puzzled by math on date-time objects

2009-03-10 Thread Denis Chabot
:18 EST 2009-02-24 14:51:19 EST 2009-02-24 14:51:20 EST Mean 3rd Qu. Max. 2009-02-24 14:51:20 EST 2009-02-24 14:51:21 EST 2009-02-24 14:51:22 EST Thanks in advance, Denis Chabot sessionInfo() R version 2.8.1 Patched (2009-01-19

[R] handling the output of strsplit

2008-06-20 Thread Denis Chabot
Hi, Simple question, but I did not figure out how to find the answer on my own (wrong choice of keywords on my part). I have a character variable for time of day that has entries looking like 6h30, 7h40, 12h25, 23h, etc. For the sake of this message, say h = c(3h30, 6h30,

Re: [R] handling the output of strsplit

2008-06-20 Thread Denis Chabot
: times(strapply(h, ([^h]+)h(.*), ~ as.numeric(x) / 24 + sum(as.numeric(y), na.rm = TRUE)/(24*60), backref = -2, simplify = c)) [1] 03:30:00 06:30:00 09:40:00 11:25:00 14:00:00 15:55:00 23:00:00 On Fri, Jun 20, 2008 at 6:14 PM, Denis Chabot [EMAIL PROTECTED] wrote: Hi, Simple question, but I

Re: [R] Reducing the size of pdf graphics files produced with R

2008-02-07 Thread Denis Chabot
plots... And you need to buy Acrobat. Is this something the pdf device could do in a future version? I tried the million points example from the thread above and the 55 MB file was reduced to 6.9 MB, an even better shrinking I see on my usual plots. Denis Chabot

Re: [R] dates in French format

2008-01-31 Thread Denis Chabot
/07 01/02/08 01/04/08 01/07/08 01/09/08 01/11/08 01/14/08 01/16/08 [17] 01/18/08 So thanks again. I will try to reinstall R on my computer and see if I still get these errors. Denis On Jan 30, 2008 11:29 PM, Denis Chabot [EMAIL PROTECTED] wrote: Hello R users, I have to import

Re: [R] dates in French format

2008-01-31 Thread Denis Chabot
(and not attached): [1] grid_2.6.1 lattice_0.17-2 tools_2.6.1 Denis Le 31 janv. 08 à 09:46, Denis Chabot a écrit : (I've put the R Mac list in cc because of the crashes I have experienced trying some of the suggestions below) Hi Gabor and Prof Ripley, Le 31 janv. 08 à 02:11, Prof Brian

[R] dates in French format

2008-01-30 Thread Denis Chabot
Hello R users, I have to import a file with one column containing dates written in French short format, such as: 7-déc-07 11-déc-07 14-déc-07 18-déc-07 21-déc-07 24-déc-07 26-déc-07 28-déc-07 31-déc-07 2-janv-08 4-janv-08 7-janv-08 9-janv-08 11-janv-08