Dear listers,
I am working on a time series but find that for a given non-zero time
lag correlations obtained by ccf and cor are different.
x <- c(0.85472102802704641, 1.6008990694641689, 2.5019632258894835,
2.514654801253164, 3.3359198688206368, 3.5401357138398208,
2.6304117871193538, 3.66940
not need to carry on with table
attributes).
Best,
Patrick
Le 21/04/2023 à 10:08, Ivan Krylov a écrit :
> On Fri, 21 Apr 2023 09:02:37 +0200
> Patrick Giraudoux wrote:
>
>> I meet an error with glm.nb that I cannot explain the origin (and
>> find a fix). The model I want to
Dear Listers,
I meet an error with glm.nb that I cannot explain the origin (and find a
fix). The model I want to fit is the following:
library(MASS)
glm.nb(deg~offset(log(durobs))+zone,data=db)
and the data.frame is dumped below.
Has anyone an idea about what the trouble comes from ? (except
This can be made using the TEXT (TEXTE in the French version) function
of Excel, hence:
TEXT(M2;"HH:MM")
Changes the time into text, and it can be imported from R as wanted.
Le 01/04/2022 à 08:34, Patrick Giraudoux a écrit :
> Absolutely correct ! I checked in Excel and when
Le 01/04/2022 à 08:40, Jeff Newmiller a écrit :
> Both R and Excel assume a date is associated with every time object. In
> Excel, when you show a date it is an integer number of days since 1899-12-31
> (due to a mistake made early in programming it). Whenever you show a time, it
> it merely dis
Ligges a écrit :
> That monday does not exist. FOr the week before:
>
> strptime(paste0("2020-52","-1"),format="%Y-%W-%u")
> [1] "2020-12-28"
>
> One week later is no longer in 2020, so there is no 53th week.
>
> Best,
> Uwe Ligges
&g
EST"
[41] "2020-10-12 CEST" "2020-10-19 CEST" "2020-10-26 CET" "2020-11-02 CET"
[45] "2020-11-09 CET" "2020-11-16 CET" "2020-11-23 CET" "2020-11-30 CET"
[49] "2020-12-07 CET" "2020-12-14 CET
Dear all,
I have a trouble trying to convert dates given in character to POSIX.
The date is expressed as a year then the week number e.g. "2020-01"
(first week of 2020). I thought is can be converted as following:
strptime(mydate,format="%Y-%W")
%W refering to the week of the year as decimal
Ups... Thank you both. Indeed I must repeat lessons on regular
expression... obviously forgotten...
Le 28/02/2020 à 18:32, Jeremie Juste a écrit :
Hello,
you need
dir(pattern="\\.r$",ignore.case=TRUE)
remember that the pattern is a regular expression.
so ".r" is [any single character]r. So
I have this directory contain listed at the page bottom
Can somebody tell me why with
dir(pattern = ".txt")
dir(pattern = ".dbf")
etc.
I get exactly what I want (a vector with the file names correctly
suffixed), but with
dir(pattern = ".r")
I get this:
> dir(pattern=".r") [1] "Article Pred
Would be nice to put those two way examples in the documentation of the
function 'expression' and 'bquote' in the next R version (we are in the
base) for other users ;-) I am sure many would enjoy.
Le 20/10/2019 à 19:15, Patrick Giraudoux a écrit :
> Great ! You
;km"^2)
but I think I prefer the as.expression(list()) construction.
An alternative tack is this:
e <- expression(0,0)
e[[1]] <- "sans renard"
e[[2]] <- bquote(.(densren) * " ind."/"km"^2)
plot(1:100,1:100,type="n")
legend(list(x=0,y=10
bty="n")
>
> Cheers,
> Bert
>
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
>
;- 1.25
> > plot(1:10)
> > legend (x="center", legend =bquote(.(densren) (ind./km)^2))
>
> See ?legend
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Be
t; R plot superscript in legend
>
> and the first search result was
> https://stackoverflow.com/questions/20453408/superscript-r-squared-for-legend
>
> which looks like it might address your question.
>
> On Sun, Oct 20, 2019 at 3:30 PM Patrick Giraudoux
> <mailto:patr
Dear listers,
I am trying to pass an expression inlcuding a variable and a
superpscript to a legend. What I want to obtain is e.g. with densren = 1.25
1.25 ind./km^2
I have tried many variants of the following:
legend=bquote(.(densren) (ind./km)^2)
but if not errors, do obtain
1.25 (ind./km^
ame is "Mailles_2011a.dbf"
> but in the case that fails your filename is "Mailles_2011a.shp"
> (different extensions)
>
> HTH,
> Eric
>
>
> On Sat, Apr 20, 2019 at 8:00 PM Patrick Giraudoux
> <mailto:patrick.giraud...@univ-fcomte.fr>> wrote
Dear listers,
I am using the package foreign function read.dbf and meet the following
issue:
i<-"Mailles_2011a.dbf"
dbf<-read.dbf(i)
works well BUT
if I have a vector such as
files <- c("Mailles_2011a.shp", "Mailles_2011p.shp",
"Mailles_2012a.shp", "Mailles_2012p.shp", "Mailles_2013a.shp",
Dear listers,
There is number of requests about reading Chinese characters from Excel
or text files. I had to cope with the issue and wrote a small manual
about it. It might not be an optimal solution, but at least it works :-)
One can download the pdf at:
https://chrono-environnement.univ-fco
Dear all,
I try to get a CRAN mirror repository working on my Ubuntu trusty
plateform. So, including e.g.:
deb https://mirror.ibcp.fr/pub/CRAN/bin/linux/ubuntu trusty universe
in /etc/apt/source.lst
However, on every mirror tried I get:
Err https://mirror.ibcp.fr trusty/universe amd64 Package
Le 21/03/2012 10:56, Patrick Giraudoux a écrit :
Hi,
Using lme from the package nlme 3.1-103, I meet a strange warning. I
am trying to compare to models with:
library(nlme)
lmez6=lme(lepus~vulpes,random=~1|troncon/an,data=ika_z6_test)
lmez60=lme(lepus~1,random=~1|troncon/an,data=ika_z6_test
Hi,
Using lme from the package nlme 3.1-103, I meet a strange warning. I am
trying to compare to models with:
library(nlme)
lmez6=lme(lepus~vulpes,random=~1|troncon/an,data=ika_z6_test)
lmez60=lme(lepus~1,random=~1|troncon/an,data=ika_z6_test)
Both have the same number of observations and gr
no connection reads
de csv file stored in the local directory 'doc'.
Now the info about accessibility/availability has been conveyed to the
maintainers.
Thanks again,
On 11/12/2011 17:43, Patrick Giraudoux wrote:
Dear all,
Since some weeks, look like the following CRAN mirrors
Dear all,
Since some weeks, look like the following CRAN mirrors are no longer
accessible for package update:
http://cran.univ-lyon1.fr
http://mirror.ibcp.fr/pub/CRAN/
> update.packages(ask='graphics',checkBuilt=TRUE)
Warning: unable to access index for repository
http://cran.univ-lyon1.fr/b
Hi,
I was wondering if it is possible to harmonize the ouput of symbols()
and legend() both from the graphics package.
Let us take this example:
x<-runif(10)
y<-runif(10)
z<-runif(10)
leg<-round(seq(min(z),max(z),l=4),2) # 4 values rounded up to 2 decimals
for the legend
symbols(x,y,circl
Hi,
Sorry i have put such a detailed question to the list about writing a shapefile
with projection. I realized that if i use writeOGR from rgdal and not the other
write shapefile functions i can get a shapefile with projection recognized by
ArcGIS. The command is (in case anybody wonders):
?
Dear Lister,
I have collected data in 6 geographical areas on prevalence of a
parasite in humans and in foxes. The results are expressed as a number
of positive or negative cases in human and foxes in the following
data.frame:
Pvtab <-
structure(list(posHum = c(3, 5, 3, 17, 0, 4), negHum = c
Patrick Giraudoux a écrit :
Duncan Murdoch a écrit :
On 11/11/2009 12:15 PM, Patrick Giraudoux wrote:
I am writing a rd doc, and need to use "#" in a url adress. This
would make:
\url{http://www..org/myfolder/#myanchor}
That should work.
Of course, I suppose this will not wo
Duncan Murdoch a écrit :
On 11/11/2009 12:15 PM, Patrick Giraudoux wrote:
I am writing a rd doc, and need to use "#" in a url adress. This
would make:
\url{http://www..org/myfolder/#myanchor}
That should work.
Of course, I suppose this will not work because # is a special
t
Patrick
-
cuncta stricte discussurus
-
-Ursprüngliche Nachricht-
Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im
Auftrag von Patrick Giraudoux
Gesendet: Wednesday, November 11, 2009 12:15 PM
An: r-help@r-p
I am writing a rd doc, and need to use "#" in a url adress. This would make:
\url{http://www..org/myfolder/#myanchor}
Of course, I suppose this will not work because # is a special character
starting a comment line in the rd dialect. I did not found a similar
example in "Writing R exention
Patrick Giraudoux a écrit :
Duncan Murdoch a écrit :
On 08/11/2009 12:07 PM, Patrick Giraudoux wrote:
Hi,
I am routinely compiling a package and since I have moved to R
2.10.0, it troncates some section texts in the doc:
With the following section in the rd file:
\details{
The function
Duncan Murdoch a écrit :
On 08/11/2009 12:07 PM, Patrick Giraudoux wrote:
Hi,
I am routinely compiling a package and since I have moved to R
2.10.0, it troncates some section texts in the doc:
With the following section in the rd file:
\details{
The function calls gpsbabel via the system
Hi,
I am routinely compiling a package and since I have moved to R 2.10.0,
it troncates some section texts in the doc:
With the following section in the rd file:
\details{
The function calls gpsbabel via the system. The gpsbabel program must
be present and on the user's PATH for the function
Seems the message below and the thread have reveived no attention/answer. The
output presented is quite tricky. Looks like if lmer (lme4 0.9975-10)
has accepted a negative binomial link with reasonable estimates, although it
was not designed for...
What can one think about result validity ?
B
Patrick Giraudoux a écrit :
> Dear listers,
>
> One of my former students is trying to fit a model of the negative
> binomial family with lmer. In the past (two years ago), the following
> call was working well:
>
> m1a<-lmer(mapos~ninter+saison+milieu*zone+(1|code),fa
Dear listers,
One of my former students is trying to fit a model of the negative
binomial family with lmer. In the past (two years ago), the following
call was working well:
m1a<-lmer(mapos~ninter+saison+milieu*zone+(1|code),family=neg.bin(0.451),REML=TRUE,data=manu)
But now (R version 2.9.2 a
Dear listers,
One of my former students is trying to fit a model of the negative
binomial family with lmer. In the past (two years ago), the following
call was working well:
m1a<-lmer(mapos~ninter+saison+milieu*zone+(1|code),family=neg.bin(0.451),REML=TRUE,data=manu)
But now (R version 2.9.2 a
50
> [1] 125.35
>
> HTH
>
> Peter Alspach
>
>
>> -Original Message-
>> From: r-help-boun...@r-project.org
>> [mailto:r-help-boun...@r-project.org] On Behalf Of Patrick Giraudoux
>> Sent: Tuesday, 12 May 2009 8:08 p.m.
>> To:
Dear all,
I have some trouble with the number of decimals in R (currently R
2.9.0). For instance:
> options()$digits
[1] 3
let me hope that I will get three digits where useful when a number is
printed. BUT:
> 44.25+31.1+50
[1] 125
No way to get the right result 125.35
Can anybody tell m
Patrick Burns a écrit :
Patrick Giraudoux wrote:
Bert Gunter a écrit :
Based on a simple scatterplot of pourcma vs transat, a 4 parameter
logistic
looks like wild overfitting, and that may be the source of your
problems.
Given the huge scatter, a straight line is about as much as would seem
Bert Gunter a écrit :
Based on a simple scatterplot of pourcma vs transat, a 4 parameter logistic
looks like wild overfitting, and that may be the source of your problems.
Given the huge scatter, a straight line is about as much as would seem
sensible. I think this falls into the "Why ever would
"in non linear modelling finding appropriate starting values is
something like an art"... (maybe from somewhere in Crawley , 2007) Here
a colleague and I just want to compare different response models to a
null model. This has worked OK for almost all the other data sets except
that one (dumped b
Greg Snow a écrit :
> One approach is to create your own contrasts matrix:
>
>
>> mycmat <- diag(8)
>> mycmat[ row(mycmat) == col(mycmat) + 1 ] <- -1
>> mycmati <- solve(mycmat)
>> contrasts(agefactor) <- mycmati[,-1]
>>
>
> Now when you use agefactor, the intercept will be the first age gr
Dear listers,
I would like to compare the levels of a factor with 8 age categories
(0,10] (10,20] (20,30] (30,40] (40,50] (50,60] (60,70] (70,90] (however,
the factor has not been ordered yet). The default in glm is
cont.treatment (for unordered factors) and that leads to compare each
level to th
Dear listers,
I would like to compare the levels of a factor with 8 age categories
(0,10] (10,20] (20,30] (30,40] (40,50] (50,60] (60,70] (70,90] (however,
the factor has not been ordered yet). The default in glm is
cont.treatment (for unordered factors) and that leads to compare each
level t
If you use the spatial objects provided by the
sp-package (http://cran.r-project.org/web/packages/sp/vignettes/sp.pdf)
you transform your data to other projections using the spTransform package.
Thus you will need the rgdal package in complement (it actually includes
spTransform). This functi
Probably an old moon since evoqued one year ago in this link:
http://tolstoy.newcastle.edu.au/R/e2/help/07/04/15738.html
but I have recently re-installed Tinn-R with R 2.7.0 and forgot to insert
options(warn=-1)
library(svIDE)
...
options(warn=0)
in Rprofile.site... and could see that we have
can
search the archives specifically with the REML issue...
All the best,
Patrick
On Tue, 2008-02-26 at 14:38 +0100, Patrick Giraudoux wrote:
Dear listers,
Here we have a strange result we can hardly cope with. We want to
compare a null mixed model with a mixed model with one
Dear listers,
Here we have a strange result we can hardly cope with. We want to
compare a null mixed model with a mixed model with one independent
variable.
> lmmedt1<-lme(mediane~1, random=~1|site, na.action=na.omit, data=bdd2)
> lmmedt9<-lme(mediane~log(0.0001+transat), random=~1|site,
na.
Thanks for those detailed explanation and the time taken to write them.
> The spsample methods for polygons have an iter= argument that can be
> used to make then "try harder", did you try it (with what values - the
> help page senctence you quote is from the iter= description)?
Yes sure, I went
Dear all,
I had to place points at random, one in each of larger number of
polygons (actually in objects of class 'SpatialPolygonsDataFrame' , see
sp library), and tried first to do it using spsample (from sp).
Surprisingly, every 5-15 trials, the output was a NULL value. The doc
says that '
Dear listers,
I am trying to use an old script which was working well in the previous
R version. It looks like if it no longer works in R.6.0. I have a model
of the form:
glm(nath2$Positif ~ n + yearday + x + y + I(x^2) + I(y^2) + yearday:x +
yearday:y, family = poisson, data = nath2)
and wan
Installed and tested right now. Works fine, no problem.
Thanks,
Patrick
Uwe Ligges a écrit :
>
>
> Patrick Giraudoux wrote:
>> Dear Listers,
>>
>> I have just installed R-2.6.0 and the RWinEdt package 1.7-6 under
>> Windows XP.
>
> wait for 1.7-7 wh
Dear Listers,
I have just installed R-2.6.0 and the RWinEdt package 1.7-6 under
Windows XP.
The R-WinEdt menu well appears at launching (the command
library(RWinEdt) is in .Rprofile), but WinEdt is NOT started
automatically (this was not the case in the earlier versions of R). When
WinEdt is sta
55 matches
Mail list logo