[R] adding zero to a number vector

2009-11-09 Thread anna freni sterrantino
Hi ! I'd like to create a vector that has this kind of numeration 001 002 003 . . . 099 I have looked at format help page but couldn't get any hint on how to do it. Thanks Anna Anna Freni Sterrantino Ph.D Student Department of Statistics University of Bologna, Italy via

Re: [R] Spatial Autocorrelation

2009-10-06 Thread anna freni sterrantino
s. Cheers Anna Anna Freni Sterrantino Ph.D Student Department of Statistics University of Bologna, Italy via Belle Arti 41, 40124 BO. Da: P.Branco A: r-help@r-project.org Inviato: Martedì 6 ottobre 2009, 13:28:36 Oggetto: [R] Spatial Autocorrelation

Re: [R] motif search

2008-12-09 Thread anna freni sterrantino
/2008/SeattleNov08/MatchAlign/ Best Regards Anna Anna Freni Sterrantino Ph.D Student Department of Statistics University of Bologna, Italy via Belle Arti 41, 40124 BO. Da: Alessia Deglincerti <[EMAIL PROTECTED]> A: r-help@r-project.org Inviato: Martedì 9 di

Re: [R] Significance of slopes

2008-12-09 Thread anna freni sterrantino
ed. Meaning no is not significantly different form zero. If you want to test if the estimates ( slopes or intercept) are different from a specific value as in your case different for 0.5 you can apply a test. Type on R ?t.test and you can find the all the information you need. Hope this helps Best Rega

Re: [R] Significance of slopes

2008-12-09 Thread anna freni sterrantino
ed. Meaning no is not significantly different form zero. If you want to test if the estimates ( slopes or intercept) are different from a specific value as in your case different for 0.5 you can apply a test. Type on R ?t.test and you can find the all the information you need. Hope this helps Best Rega

Re: [R] Dataframe with unequal rows

2009-01-08 Thread anna freni sterrantino
Hi Rahul, try to see ?read.table you may substitute commas with a NA and then sum the NA. I hope that it can help. Cheers Anna Anna Freni Sterrantino Ph.D Student Department of Statistics University of Bologna, Italy via Belle Arti 41, 40124 BO

Re: [R] Tinn-R

2009-01-26 Thread anna freni sterrantino
Hi, if you are on linux Emacs + ESS is quite popular too. Cheers Anna Anna Freni Sterrantino Ph.D Student Department of Statistics University of Bologna, Italy via Belle Arti 41, 40124 BO. Da: "Tibert, Brock" A: "r-help@r-project.org&qu

Re: [R] Taking the min of each row in a matrix

2009-01-29 Thread anna freni sterrantino
Hello Will, z=matrix(c(1,2,3,4,5,6), 2,byrow=T) min=apply(z,1,min) what do you need isapply ?apply and its family are very helpful. apply( matrix, columns, function) apply( matrix, rows, function) Check ?apply Cheers Anna Anna Freni Sterrantino Ph.D Student Department of Statistics

[R] Filling a logical matrices with values

2010-02-04 Thread anna freni sterrantino
ab cd e f a1 1 1 ..... b2 NA2 . c3 NANA d4 2 3 e5 3 4 .. Any suggestion , Thank you Anna Anna Freni Sterrantino Ph.D Student Department of Statistics University of Bologna, Italy via Belle Arti 41, 4012

[R] Error in example Glm rms package

2011-02-08 Thread anna freni sterrantino
packages: [1] splines stats graphics grDevices utils datasets methods [8] base other attached packages: [1] rms_3.1-0 Hmisc_3.8-3 survival_2.36-2 loaded via a namespace (and not attached): [1] cluster_1.13.2 grid_2.12.1 lattice_0.19-

Re: [R] inverse binomial in R

2012-06-19 Thread anna freni sterrantino
ran help Inviato: Giovedì 31 Maggio 2012 15:32 Oggetto: Re: [R] inverse binomial in R On 12-05-31 9:10 AM, anna freni sterrantino wrote: > Hello! > I'm having some trouble > trying to replicate in R a Stata function > >  invbinomial(n,k,p) >        Domain n:    1 to 1e+17

Re: [R] inverse binomial in R[solved]

2012-06-19 Thread anna freni sterrantino
Rcran help Inviato: Martedì 19 Giugno 2012 16:00 Oggetto: Re: [R] inverse binomial in R On Jun 19, 2012, at 11:39 , anna freni sterrantino wrote: > > > Hi Duncan and Rlist, > I've notice a different behaviour in the invbinomial > you suggest me and invbinomial in stata. > >

[R] I: ensembleBMA pit function warnings

2012-07-12 Thread anna freni sterrantino
T=en_US.UTF-8 LC_IDENTIFICATION=C        attached base packages: [1] stats     graphics  grDevices utils     datasets  methods   base      other attached packages: [1] ensembleBMA_5.0.3 chron_2.3-42      loaded via a namespace (and not attached): [1] tools_2.15.0 Any suggestion? Anna Freni S

[R] interaction testing in GAM

2012-10-10 Thread anna freni sterrantino
Hello! I'd like to know if it is correct to test with anova two models specified like this: m1=y~x1+s(x2,by=x3),family="poisson" m0=y~x1+s(x2),family="poisson" anova(m1,m0) Cheers Anna   Anna Freni Sterrantino Department of Statistics University of Bologna, Italy vi

Re: [R] GAM without intercept

2012-10-11 Thread anna freni sterrantino
pe it helps Anna Anna Freni Sterrantino Department of Statistics University of Bologna, Italy via Belle Arti 41, 40124 BO. Da: SAEC A: r-help@r-project.org Inviato: Giovedì 11 Ottobre 2012 0:22 Oggetto: [R] GAM without intercept Hi everybody, I am trying to

Re: [R] plotting principal components on geographic map

2012-10-14 Thread anna freni sterrantino
Hi Marco, a small example will be helpful to get better to the point. But I suggest you either to address this question to  R geo mailing list  https://stat.ethz.ch/mailman/listinfo/r-sig-geo and eventually take a look to GeoXp library. Cheers Anna   Anna Freni Sterrantino Department of

Re: [R] ensembleBMA pit function warnings

2012-10-30 Thread anna freni sterrantino
] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C                [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8      [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8     [7] LC_PAPER=C                 LC_NAME=C                   [9] LC_ADDRESS=C               LC_TELEPHONE=C             [11] LC_MEASUR

[R] inverse binomial in R

2012-05-31 Thread anna freni sterrantino
oku.php?id=guides:tutorials:regression:table I tried to replicate using qbinom the results obtained in  > invbinomial(10,5, 0.5) >.54830584 but with no success. Thank you Cheers Anna Anna Freni Sterrantino Department of Statistics University of Bologna, Italy via Belle A

Re: [R] Function Error

2008-07-22 Thread anna freni sterrantino
a __ 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. Anna Freni Sterrantino P

Re: [R] diff in a dataframe

2008-01-10 Thread anna freni sterrantino
Hello Vishal Maybe this is what you want? x<-c(0.34,0.36,3) y<-c(0.56,0.76,4) a<-data.frame(x,y) >a xy 1 0.34 0.56 2 0.36 0.76 3 3.00 4.00 a$diff<-(log(a$x)) a$diff2<-(log(a$y)) >a xy diff diff2 1 0.34 0.56 -1.078810 -0.5798185 2 0.36 0.76 -1.021651 -0.2744368 3 3.00

Re: [R] In chisq.test(x) : Chi-squared approximation may be incorrect

2008-01-15 Thread anna freni sterrantino
Hi! the warning you got "Chi-squared approximation may be incorrect" is because probably there are less than 5 observations in the cell. Maybe will help to try fisher.test() Cheers Anna - Messaggio originale - Da: My Coyne <[EMAIL PROTECTED]> A: [EMAIL PROTECTED] Inviato: Lunedì

Re: [R] How to change the class of data?

2008-06-12 Thread anna freni sterrantino
Hi Selina, try ?as.numeric, small example a=c(1,2,3,4,5) b=as.factor(a) class(b) c=as.numeric(b) class(c) in the case of a matrix of factor,try apply(matrix,1, as.numeric) Cheers A. - Messaggio originale - Da: Qman Fin <[EMAIL PROTECTED]> A: r-help@r-project.org Inviato: GiovedÃ

Re: [R] Loading user defined functions autometically each time I start R

2008-02-27 Thread anna freni sterrantino
Hi, an easy way, is to save your functions in a file and have it in your working directoy and sources it. i.e. source("myfile.r") otherwise you can try to build your own package, see ?package.skeleton Hope it helps Regards A - Messaggio originale - Da: Arun Kumar Saha <[EMAIL PRO

Re: [R] weibull model

2008-03-19 Thread anna freni sterrantino
the function survreg in the package "survival" should what are you looking for. Cheers Anna - Messaggio originale - Da: boshao zhang <[EMAIL PROTECTED]> A: r-help@r-project.org Inviato: Mercoledì 19 marzo 2008, 10:45:43 Oggetto: [R] weibull model Dear Helpers: If you know how to fi

Re: [R] loop? apply? I want to repeat a task through 208 itterations.

2008-04-04 Thread anna freni sterrantino
hi Stephen, you may want to check ?apply What you want is : a<-matrix(1:120,10,20) a[1:8,1:2]=NA apply(a,2, function(x) if(sum(!is.na(x)) > (length(x)-3)) shapiro.test(x) else NA ) Cheers Anna - Messaggio originale - Da: stephen sefick <[EMAIL PROTECTED]> A: r-help@r-project.org I

Re: [R] How to avoid "$ operator is invalid for atomic vectors"

2008-11-06 Thread anna freni sterrantino
ms. 2. Can get the column "x" on the matrix b as b[,1] [1] 0 2 1 just giving the position. Hope that this helps. Best Regards Anna Anna Freni Sterrantino Ph.D Student Department of Statistics University of Bologna, Italy via Belle Arti 41, 40124 BO. ___