Re: [R] Assist on R-2.0.0 /64 bit AMD/SuSE 9.1
What is Assist-0.1.0? It's not part of R and it is not a CRAN nor Bioconductor package. There is a CRAN package `assist', and if you mean that please follow the advice in the posting guide and contact the maintainer. Now, that package says Title: A Suite of S-Plus Functions Implementing Smoothing Splines and S-PLUS functions don't run on 64-bit versions of R. I suggest you and the maintainer look for the use of `long *' in .C calls: S-PLUS uses `long *' where R uses `int *'. On Thu, 21 Oct 2004, Simon Frost wrote: I compiled and installed Assist-0.1.0; I'm using R-2.0.0 running on SuSe Linux, on a dual AMD64 machine. However, I (apparently randomly) get segmentation faults when I use cubic2. Any ideas? -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
: [R] How to draw x-axis time label.
Thank you for helping me. I have modified this part of code. Time - c(2004-08-05 09:08:48, 2004-08-13 20:53:38, 2004-08-14 13:57:23, 2004-08-12 16:17:41, 2004-08-12 16:15:27, 2004-08-11 21:38:24, 2004-08-12 14:28:41, 2004-08-18 18:04:47, 2004-08-13 15:23:14, 2004-08-14 02:36:33) Time - as.POSIXct(Time) x - data.frame(main.name=AAA, fruit.name=rep(c(Apply,Watermelon),each=5), x.name=Time, y.name=(1:10)) par(las=3,mai=c(1,.7,.5,.3)) plot(x$x.name,as.character(x$y.name),pch=26, xlab=Process Time, xaxt = 'n') axis.POSIXct(1, at=seq(min(x$x.name), max(x$x.name), days),format=%d /%m) fruit.class - table(x$fruit.name) color.code - c(611,552,656,121,451,481,28,652,32,550,90,401,150,12,520,8) for(j in 1:length(fruit.class)) { fruit - names(fruit.class)[j] lines(smooth.spline(x[x$fruit.name==fruit, x.name], x[x$fruit.name==fruit, y.name],df=5), col=colors()[color.code[j]],lwd=5) } Run above code , you will find the Process Time is close to the x-label, I want to move it down . And How can I reduce font? Thank you very much! Best Regards! Ivy Li YMS in Production Testing Semiconductor Manufactory International(ShangHai) Corporation #18 ZhangJiang Road, PuDong New Area, Shanghai, China Tel: 021-5080-2000 *11754 Email: [EMAIL PROTECTED] -- : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] : 20041019 18:17 : Ivy_Li : Re: : : : [R] How to draw x-axis time label. In this case, don't draw x-axis: plot(x$x.name,as.character(x$y.name),pch=26, xaxt = 'n') Then check out functin mtext() (to draw the xaxis yourself. It's not diffucult but you have to try). Luck Huang Huan Internet [EMAIL PROTECTED] - 10/19/2004 10:23 AM To:Huan HUANG cc:r-help Subject:: : : [R] How to draw x-axis time label. Thank you ! I run your code. It have a graph with time(date) on x-axis. Thank you very much! Well, Would you like to do me a favor again? Most of times, the x-axis time data is lasted about 3 months. They are too much. I must select some of them marking in x-axis,and they are must reasonable and human-readable. Now I have tried the pretty function, But as soon as I run it, the format of data changed to numeric ,I don't know what should I do. Is there exist other functions can get the same result? Best Regards! Ivy Li YMS in Production Testing Semiconductor Manufactory International(ShangHai) Corporation #18 ZhangJiang Road, PuDong New Area, Shanghai, China Tel: 021-5080-2000 *11754 Email: [EMAIL PROTECTED] -- : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] : 20041019 16:43 : Ivy_Li : Re: : : [R] How to draw x-axis time label. Hi Li chen, I mean you should run the code I sent you in my first email. It's here again: plot(x$x.name,as.character(x$y.name),pch=26) By running this you should have a graph with time(date) on x-axis. Give it a go? Let me know if it is not working. Huang Huan Internet [EMAIL PROTECTED] - 10/19/2004 02:18 AM To:Huan HUANG cc: Subject:: : [R] How to draw x-axis time label. Put *time* on x-axis? Like this: plot(time(x$x.name),as.character(x$y.name),pch=26) but the x-axis is not real time , just some number. I forgot your question in your previous mail. :-) My chinese name is Li Chen hello! Best Regards! Ivy Li YMS in Production Testing Semiconductor Manufactory International(ShangHai) Corporation #18 ZhangJiang Road, PuDong New Area, Shanghai, China Tel: 021-5080-2000 *11754 Email: [EMAIL PROTECTED] -- : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] : 20041018 18:35 : Ivy_Li : Re: : [R] How to draw x-axis time label. Come on, Ivy. Did you try the line in my previous email? That will put *time* on x-axis. Give it a go? Internet [EMAIL PROTECTED] - 10/18/2004 10:24 AM To:Huan HUANG cc: Subject:: [R] How to draw x-axis time label. Thank you ! I know the oddness number are time calulated since 1970, but i need them to be x-axis . What should I do ? Best Regards! Ivy Li YMS in Production Testing Semiconductor Manufactory International(ShangHai) Corporation #18 ZhangJiang Road, PuDong New Area, Shanghai, China Tel: 021-5080-2000 *11754 Email: [EMAIL PROTECTED] -- : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] : 20041018 16:50 : Ivy_Li : Re: [R] How to draw x-axis time label. Hi Ivy (any chinese name?) I ran your codes. I found if I try: plot(x$x.name,as.character(x$y.name),pch=26,) It would put time as the x axis. The *odd* numbers showed in yoru graph as the moment are numbers of seconds of those dates since the beginning of 1970. Hope it helps. Huang Huan Internet [EMAIL PROTECTED]@stat.math.ethz.ch - 10/18/2004 07:26 AM Sent by:[EMAIL PROTECTED] To:r-help cc: Subject:[R] How to draw x-axis time label. Hi everybody, Could I consult one problem? It is about plot Now I do some analysis in plot . I need to draw a plot which x-axis is time . But when I run the funtion of
Re: : [R] How to draw x-axis time label.
On Fri, 22 Oct 2004, Ivy_Li wrote: Thank you for helping me. I have modified this part of code. Time - c(2004-08-05 09:08:48, 2004-08-13 20:53:38, 2004-08-14 13:57:23, 2004-08-12 16:17:41, 2004-08-12 16:15:27, 2004-08-11 21:38:24, 2004-08-12 14:28:41, 2004-08-18 18:04:47, 2004-08-13 15:23:14, 2004-08-14 02:36:33) Time - as.POSIXct(Time) x - data.frame(main.name=AAA, fruit.name=rep(c(Apply,Watermelon),each=5), x.name=Time, y.name=(1:10)) par(las=3,mai=c(1,.7,.5,.3)) plot(x$x.name,as.character(x$y.name),pch=26, xlab=Process Time, xaxt = 'n') axis.POSIXct(1, at=seq(min(x$x.name), max(x$x.name), days),format=%d /%m) fruit.class - table(x$fruit.name) color.code - c(611,552,656,121,451,481,28,652,32,550,90,401,150,12,520,8) for(j in 1:length(fruit.class)) { fruit - names(fruit.class)[j] lines(smooth.spline(x[x$fruit.name==fruit, x.name], x[x$fruit.name==fruit, y.name],df=5), col=colors()[color.code[j]],lwd=5) } Run above code , you will find the Process Time is close to the x-label, I want to move it down . And How can I reduce font? Thank you Process Time *is* the x-label! You will find all this discussed in An Introduction to R: you need to change the margins and to use title(xlab=, line=) to place the x-label in another position. And the font *size* is set by cex*: see ?par and the An Introduction to R manual. [Many, many unneeded lines removed.] -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] 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] p-values for the dip test
Hmm, this is rather about reading the (Hartigan)^2 paper ... Kylie == Kylie Lange [EMAIL PROTECTED] on Fri, 22 Oct 2004 11:17:34 +0930 writes: Kylie Hi all, Kylie I am using Hartigan Hartigan's [1] dip test of Kylie unimodality via the diptest package in R. The Kylie function dip() returns the value of the test Kylie statistic but I am having problems calculating the Kylie p-value associated with that value. I'm hoping Kylie someone here is familiar with this process and can Kylie explain it. Kylie In the original article there is an example using Kylie n=63 and a dip value of 0.059 - which I am able to Kylie replicate using dip(). However the article then Kylie states: Kylie The dip illustrated in Figure 1 is 0.059 which has a Kylie tail probability about 10% from Table 1. ( Kylie sqrt(63)*D*F(63) is distributed approximately as Kylie sqrt(100)*D*F(100) which has 90% point 0.474. Thus Kylie D*F(63) has 90% point 0.060. ) note: sqrt(100) * D(F_100) = 10 * D(F_100) i.e. D(F_100) would have 90* point 0.0474 but the second 4 is a simple typo, (not the only one in the paper, IIRC!); s/4/1/ -- you get the correct 0.0471 Kylie It is the value of 0.474 that I am unable to Kylie get. Table 1 is a table of percentage points for Kylie various sample sizes. The same table is provided in Kylie the diptest package as 'qDiptab' (but at greater Kylie accuracy). n=63 is not tabled but n=50 and 100 Kylie are. In the table for n=100 the value given for 90% Kylie is 0.0471 so where does the 0.474 come from? (see above). Kylie Any help appreciated! you're welcome. Martin Maechler, ETH Zurich ('diptest' maintainer) Kylie [1] Hartigan JA Hartigan PM. The Dip Test of Kylie Unimodality, The Annals of Statistics, v13(1):70-84, 1985. __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Vector and String
Hi everybody, I'm using a vector to strore some strings. I create a vector named seq2 : seq2-vector(length=0) I have a string named b b [1] CATGGTAGGAATAC I put b in the vector seq2-c(seq2,b) Finally I edit seq2 seq2 [1] 14760 My question is why I obtained a number (14760) when I add a string (CATGGTAGGAATAC) I have an idea : when I edit b, I see ( [1] CATGGTAGGAATAC ) and not ([1] CATGGTAGGAATAC) How can I convert b to a true string with Thank you very much __ [EMAIL PROTECTED] 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] Vector and String
On Fri, 22 Oct 2004 [EMAIL PROTECTED] wrote: Hi everybody, I'm using a vector to strore some strings. I create a vector named seq2 : seq2-vector(length=0) typeof(seq2) [1] logical so you created a *logical vector*. See ?vector. I have a string named b b [1] CATGGTAGGAATAC I think you have a factor, not a `string'. What does str(b) say? I put b in the vector seq2-c(seq2,b) Finally I edit seq2 seq2 [1] 14760 My question is why I obtained a number (14760) when I add a string (CATGGTAGGAATAC) I have an idea : when I edit b, I see ( [1] CATGGTAGGAATAC ) and not ([1] CATGGTAGGAATAC) How can I convert b to a true string with seq2 - character() seq2 - c(seq2, as.character(b)) -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] 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] Vector and String
Hello, I'm looking for a procedure to detect trend changes or significant signals in time series as in the attached example. Could you point me to a library or reference I can start with? Thanks, Marc Mamin__ [EMAIL PROTECTED] 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: libraries and references (was `[R] Vector and String')
Have you read the R-posting guide which specifically asks you *not* to tack completely separate questions on to other threads, and to use a relevant subject line? What has this to do with `[R] Vector and String'? On Fri, 22 Oct 2004, Marc Mamin wrote: I'm looking for a procedure to detect trend changes or significant signals in time series as in the attached example. Could you point me to a library or reference I can start with? Two good references are the R posting guide at http://www.r-project.org/posting-guide.html and the R FAQ at http://cran.r-project.org/doc/FAQ/R-FAQ.html which lists some very relevant R packages (and which the posting guide asks you to consult). Please do start with those. There are lots of good libraries in the world, but you need to visit one which will admit you. They will probably insist that you read their usage conditions first. So does this list. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] 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: libraries and references (was `[R] Vector and String')
I'm looking for a procedure to detect trend changes or significant signals in time series as in the attached example. Dear Marc, it seems that your example have been removed, as stated in the posting guide. Hence, I can only guess what your problem is and offer: help.search(Goldfeld) help.search(Chow) help.search(structural change) May be you can provide your example directly in a mail? HTH, Bernhard Could you point me to a library or reference I can start with? Two good references are the R posting guide at http://www.r-project.org/posting-guide.html and the R FAQ at http://cran.r-project.org/doc/FAQ/R-FAQ.html which lists some very relevant R packages (and which the posting guide asks you to consult). Please do start with those. There are lots of good libraries in the world, but you need to visit one which will admit you. They will probably insist that you read their usage conditions first. So does this list. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html The information contained herein is confidential and is inte...{{dropped}} __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] building an R package : where and how should my fortran library be loaded ?
Hi , I'm currently trying to make available a few fortran subroutines and R functions (which make interface to these subroutines), as an R package. I'm doing it under linux with R 1.9.0 (but hope to do it for windows too). I have trouble for loading my fortran code. Here are the steps involved : 1) In R: # Create tree for package # and include my R functions in it R package.skeleton(name=Geneland, list=c(mcmcFmodel, simFmodel, rdiscr, tessel.post), path=/home/guillot/projets/flux/package/, force=T) # copy my fortran code in the tree Rsystem(cp /home/guillot/projets/flux/package/fortran/*.f /home/guillot/projets/flux/package/Geneland/src/) R q() 2) In a Unix shell $ R CMD build Geneland $ R CMD check Geneland $ R CMD build Geneland $ R CMD INSTALL Geneland 3) Back to R R library(Geneland) So far, it's OK, pure R functions work fine. But R functions calling some Fortran via .Fortran do not work, I get an error message like : Error in .Fortran(mcmc, ... Fortran function name not in load table If I make R dyn.load(/usr/lib/R/library/Geneland/libs/Geneland.so) then it works . I was thinking that my Geneland.so was loaded automatically by the command library(Geneland) Obviously, it's not. Where and how should the library loaded ? Gilles _ Gilles GUILLOT INRA -Département Mathématiques et Informatique Appliquées Unité de Mixte de Recherche INRA - INAPG - ENGREF Institut National Agronomique de Paris-Grignon 16 rue Claude Bernard 75231 Paris cedex 5 Aile Claude Bernard Niveau cours +3 étages tel : +33 (0)1 44 08 72 71 fax : +33 (0)1 44 08 16 66 http://www.inapg.fr/ens_rech/mathinfo/personnel/guillot/welcome.html __ -- _ Gilles GUILLOT INRA -Département Mathématiques et Informatique Appliquées Unité de Mixte de Recherche INRA - INAPG - ENGREF Institut National Agronomique de Paris-Grignon 16 rue Claude Bernard 75231 Paris cedex 5 Aile Claude Bernard Niveau cours +3 étages tel : +33 (0)1 44 08 72 71 fax : +33 (0)1 44 08 16 66 http://www.inapg.fr/ens_rech/mathinfo/personnel/guillot/welcome.html __ [EMAIL PROTECTED] 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] building an R package : where and how should my fortran library be loaded ?
On Fri, 22 Oct 2004, Gilles GUILLOT wrote: I'm currently trying to make available a few fortran subroutines and R functions (which make interface to these subroutines), as an R package. I'm doing it under linux with R 1.9.0 Please update, as few of us have such an old system in use. (but hope to do it for windows too). I have trouble for loading my fortran code. [...] I was thinking that my Geneland.so was loaded automatically by the command library(Geneland) `Thinking'? `Hoping', perhaps, but where did you read that? Obviously, it's not. Where and how should the library loaded ? By your R code, via library.dynam. A common `spell' is for package foo to include in foo/src/zzz.R .First.lib - function(libpath, pkgname) library.dynam(foo, pkgname, libpath) and it described in `Writing R Extensions'. That also explains the different rules for packages with namespaces. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] cor, cov, method pairwise.complete.obs
Hi UseRs, I don't want to die beeing idiot... I dont understand the different results between: cor() and cov2cov(cov()). See this little example: x=matrix(c(0.5,0.2,0.3,0.1,0.4,NA,0.7,0.2,0.6,0.1,0.4,0.9),ncol=3) cov2cor(cov(x,use=pairwise.complete.obs)) [,1] [,2] [,3] [1,] 1.000 0.4653400 -0.1159542 [2,] 0.4653400 1.000 -0.7278728 [3,] -0.1159542 -0.7278728 1.000 cor(x,use=pairwise.complete.obs) [,1] [,2] [,3] [1,] 1.000 0.3973597 -0.1159542 [2,] 0.3973597 1.000 -0.9736842 [3,] -0.1159542 -0.9736842 1.000 My question arises in a context where cor(mydata, use=pairwise.complete.obs) returns correlations on diagonal that are near 0.95 (where as my data do have 100 observations and only 12 missing values...). Do cor() and cov() handle the same way the argument pairwise.complete.obs? Eric R.version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major2 minor0.0 year 2004 month10 day 04 language R Eric Lecoutre UCL / Institut de Statistique Voie du Roman Pays, 20 1348 Louvain-la-Neuve Belgium tel: (+32)(0)10473050 [EMAIL PROTECTED] http://www.stat.ucl.ac.be/ISpersonnel/lecoutre If the statistics are boring, then you've got the wrong numbers. -Edward Tufte __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Convert a list in a dataframe
Hi, I've a list containing parameters (intercepts coefficients) of 12 regressions fitted coeff [[1]] (Intercept) anno -427017.1740 217.0588 [[2]] (Intercept) anno -39625.82146 21.78025 . [[12]] (Intercept)anno 257605.0343 -129.7646 I want create a data frame with two columns (intercept and anno)using data in these list. Any help will be appreciated. Best Vito = Diventare costruttori di soluzioni The business of the statistician is to catalyze the scientific learning process. George E. P. Box Visitate il portale http://www.modugno.it/ e in particolare la sezione su Palese http://www.modugno.it/archivio/cat_palese.shtml __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] grouping for lme with nested repeated measurements
I am using lme to handle repeated measurements. So far i can follow the examples from the book from pinheiro and bates. Now i get the problem , that i have nested repeated measuremnts, and i cant find out how to do the grouping part of the lme formula. 1.The simple problem ist that i have different Samples , from which i make repeated measurements (each sample is measured 6 times) and i repeat this experiment over several Days, so i get the lme grouping term random=~1|Days/Sample. 2. Now i am measuring with 2 different measuring Apparatus the same Sample each 6 times, to see how big the difference from the appratus is. Because Apparatus is on the level of repeated measurements i cant write Days/Sample/Apparatus. the lme function offers a list() feature to design the grouping, but i didnt understand this, if it is the solution to the problem. Maybe somebody had the same Problem? best greetings N.Busscher -- #--- ##!! Achtung neue E-Mail adresse: [EMAIL PROTECTED] ## Neue Telephon Nummer #--- Dr.Nicolaas Busscher Universität GH Kassel Nordbahnhofstrasse: 1a, D-37213 Witzenhausen Phone: 0049-(0)5542-98-1721, Fax: 0049-(0)5542-98-1713 __ [EMAIL PROTECTED] 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] Convert a list in a dataframe
Try something like: as.data.frame(do.call(rbind, coeff)) HTH, Andy From: Vito Ricci Hi, I've a list containing parameters (intercepts coefficients) of 12 regressions fitted coeff [[1]] (Intercept) anno -427017.1740 217.0588 [[2]] (Intercept) anno -39625.82146 21.78025 . [[12]] (Intercept)anno 257605.0343 -129.7646 I want create a data frame with two columns (intercept and anno)using data in these list. Any help will be appreciated. Best Vito = Diventare costruttori di soluzioni The business of the statistician is to catalyze the scientific learning process. George E. P. Box Visitate il portale http://www.modugno.it/ e in particolare la sezione su Palese http://www.modugno.it/archivio/cat_palese.shtm l __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] 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] Convert a list in a dataframe
Vito Ricci [EMAIL PROTECTED] writes: Hi, I've a list containing parameters (intercepts coefficients) of 12 regressions fitted coeff [[1]] (Intercept) anno -427017.1740 217.0588 [[2]] (Intercept) anno -39625.82146 21.78025 . [[12]] (Intercept)anno 257605.0343 -129.7646 I want create a data frame with two columns (intercept and anno)using data in these list. data.frame(do.call(rbind,coeff)) Did this result from an lapply() construct? If so, consider using sapply(); then you can just do data.frame(t(coeff)) -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] 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] Convert a list in a dataframe
Vito Ricci wrote: Hi, I've a list containing parameters (intercepts coefficients) of 12 regressions fitted coeff [[1]] (Intercept) anno -427017.1740 217.0588 [[2]] (Intercept) anno -39625.82146 21.78025 . [[12]] (Intercept)anno 257605.0343 -129.7646 I want create a data frame with two columns (intercept and anno)using data in these list. coeffD - as.data.frame(t(matrix(unlist(coeff), , 2))) names(coeffD) - names(coeff[[1]]) Uwe Ligges Any help will be appreciated. Best Vito = Diventare costruttori di soluzioni The business of the statistician is to catalyze the scientific learning process. George E. P. Box Visitate il portale http://www.modugno.it/ e in particolare la sezione su Palese http://www.modugno.it/archivio/cat_palese.shtml __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] confidence interval
I used a dataset to fit a linear model. For each new sample, a precition can be obtained using the fitted model. Now I wonder is there any way to calculate the confidence interval of the precition for new samples? Any suggestion or pointing to a reference would be very appreciated. Lu - [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] bquote inside a legend
I am trying to automate an outide of the plot region table that has the correlation coef. of the various variables in the plot. I am currently using bquote to get the greek/latex representation of $\rho$. what I want so what I have is the following rhoa - cor(x, data1$No.Msa.Hosp) rhon - cor(x, data1$N.Not.Profit.msa) rhop - cor(x, data1$N.Profit.msa) temp - bquote(list(rho[Not-profit]==.(rhon),rho[Profit]==.(rhop), rho[All]==.(rhoa))) everything works fine but the problem is that the following legend call legend(par(usr)[2]-a1,3*par(usr)[3]-b1,ex12, ncol=2) does not respect the ncol argument. I am guessing it is respecting it but bquote is of dimension 1 i.e just a big string. Does anyone know of a way to break this into two columns Thank you __ [EMAIL PROTECTED] 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] confidence interval
lu kan wrote: I used a dataset to fit a linear model. For each new sample, a precition can be obtained using the fitted model. Now I wonder is there any way to calculate the confidence interval of the precition for new samples? Any suggestion or pointing to a reference would be very appreciated. Lu You already found predict(), so read ?predict.lm carefully and find that there is a argument interval. Uwe Ligges __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Incompatibility between R-2.0.0 and Rggobi_1.0-0.
Hello, I was trying to install Rggobi in the latest version of R and it gave me a compilation error for R CMD INSTALL Rggobi_1.0-0.tar.gz RSGGobi.C: In function RS_GGOBI_init (R_IsNaNorNA) undeclared (line 77) I searched for this function in R src files and it was abandoned in ~/R-2.0.0/src/include/R_ext/Arith.h file. Only functions int R_IsNA(double);/* True for R's NA only */ int R_IsNaN(double);/* True for special NaN, *not* for NA */ are declared leaving out R_IsNaNorNA. This funcion was declared in R-1.9.1. So I changed (R_IsNaNorNA) to (R_IsNA) in ~/Rggobi/src. Then I built Rggobi and installed it using R CMD Can anyone tell me if there is any other way to do it? Was I right? Thanks, Sincerely, Aruna Buddana, Intern, Statistics and Data Sciences Oak Ridge National Laboratories. __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] ave gives unexpected NA's
[R 2.0.0 on Linux] I tried: df - data.frame( grp1=factor( c('A' ,'A' ,'A' ,'D', 'D' ) ) , grp2=factor( c('a1','a2','a2','d1','d1') ) ) df grp1 grp2 val 1A a1 1 2A a2 2 3A a2 4 4D d1 8 5D d1 16 I got: with( df, ave( val, grp1, grp2, FUN=sum ) ) [1] 1 24 24 NA NA I have expected to get: [1] 1 6 24 Do I misunderstand something with `ave' or is there a bug? Thanks - Wolfram __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Interval Arithmetic Queueing Models
I want to do two things in R and have searched the mail archive and packages to see if they have been done before. I could not see anything. If anyone has tackled these problem domains before I would be grateful for help. 1. Has anyone implemented interval arithmetic (see generally http://www.cs.utep.edu/interval-comp/ ) either directly in R code or by linking in an external C++/Fortran library? 2. Has anyone implemented queueing modelling ( see e.g the software at http://www.perfdynamics.com/ ). I would be grateful for pointers. Please include me as an addressee on any response as I am not on this mailing list. regards Dominic __ [EMAIL PROTECTED] 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] Incompatibility between R-2.0.0 and Rggobi_1.0-0.
This is discussed in 200update.txt file on developer.r-project.org, which tells you the right way to do it. BTW, the incompatility is of Rggobi_1.0-0 with R-2.0.0 and not the other way round. On Fri, 22 Oct 2004, Aruna Buddana wrote: Hello, I was trying to install Rggobi in the latest version of R and it gave me a compilation error for R CMD INSTALL Rggobi_1.0-0.tar.gz RSGGobi.C: In function RS_GGOBI_init (R_IsNaNorNA) undeclared (line 77) I searched for this function in R src files and it was abandoned in ~/R-2.0.0/src/include/R_ext/Arith.h file. Only functions int R_IsNA(double);/* True for R's NA only */ int R_IsNaN(double);/* True for special NaN, *not* for NA */ are declared leaving out R_IsNaNorNA. This funcion was declared in R-1.9.1. So I changed (R_IsNaNorNA) to (R_IsNA) in ~/Rggobi/src. Then I built Rggobi and installed it using R CMD Can anyone tell me if there is any other way to do it? Was I right? No. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] 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] bquote inside a legend
Jean Eid wrote: I am trying to automate an outide of the plot region table that has the correlation coef. of the various variables in the plot. I am currently using bquote to get the greek/latex representation of $\rho$. what I want so what I have is the following rhoa - cor(x, data1$No.Msa.Hosp) rhon - cor(x, data1$N.Not.Profit.msa) rhop - cor(x, data1$N.Profit.msa) temp - bquote(list(rho[Not-profit]==.(rhon),rho[Profit]==.(rhop), rho[All]==.(rhoa))) everything works fine but the problem is that the following legend call legend(par(usr)[2]-a1,3*par(usr)[3]-b1,ex12, ncol=2) does not respect the ncol argument. I am guessing it is respecting it but bquote is of dimension 1 i.e just a big string. Does anyone know of a way to break this into two columns There is an example how to work with mathematical annotation in legend() in the Help Desk in R News 2/3. Please specify easily reproducible examples (not examples with data we do not have) - according to the posting guide! What you are probably going to do is something like: plot(1:10) rhoa - 1 rhon - 2 rhop - 3 exprhoa - substitute(rho[All]==.(rhoa), list(rhoa = rhoa)) exprhon - substitute(rho[Not-profit]==.(rhon), list(rhon = rhon)) exprhop - substitute(rho[Profit]==.(rhop), list(rhop = rhop)) legend(2, 8, do.call(expression, list(exprhon, exprhop, exprhoa)), ncol = 2) Uwe Ligges Thank you __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] 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] console under Mandrake
On Fri, 22 Oct 2004, Adrian Dusa wrote: I recently compiled R 2.0.0 under Mandrake 9, but it won't run unless in a terminal; is there a way to run it in a console, like in Windows? Yes. Did you read the manual the INSTALL file pointed you to? See appendix B.6 in the version I am looking at. Or see `An Introduction to R' appendix B.1 and look for --gui. [To run the GNOME console I think you need R-patched, not 2.0.0 as distributed.] Another approach is to run John Fox's Rcmdr package that provides a console. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] 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] ave gives unexpected NA's
Wolfram Fischer [EMAIL PROTECTED] writes: [R 2.0.0 on Linux] I tried: df - data.frame( grp1=factor( c('A' ,'A' ,'A' ,'D', 'D' ) ) , grp2=factor( c('a1','a2','a2','d1','d1') ) ) df grp1 grp2 val 1A a1 1 2A a2 2 3A a2 4 4D d1 8 5D d1 16 I got: with( df, ave( val, grp1, grp2, FUN=sum ) ) [1] 1 24 24 NA NA I have expected to get: [1] 1 6 24 Do I misunderstand something with `ave' or is there a bug? Both. You should have expected 1 6 6 24 24. Apparently the culprit is this line inside ave() unlist(lapply(split(x, g), FUN))[g] which acts up if there are empty levels of g. It works with unlist(lapply(split(x, g), FUN))[as.character(g)] but that doesn't strike me as the right solution. -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] 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] confidence interval
Is there the similar thing for non-linear 'nls'? Lu Uwe Ligges [EMAIL PROTECTED] wrote: lu kan wrote: I used a dataset to fit a linear model. For each new sample, a precition can be obtained using the fitted model. Now I wonder is there any way to calculate the confidence interval of the precition for new samples? Any suggestion or pointing to a reference would be very appreciated. Lu You already found predict(), so read ?predict.lm carefully and find that there is a argument interval. Uwe Ligges - vote.yahoo.com - Register online to vote today! [[alternative HTML version deleted]] __ [EMAIL PROTECTED] 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] console under Mandrake
Prof Brian Ripley [EMAIL PROTECTED] writes: On Fri, 22 Oct 2004, Adrian Dusa wrote: I recently compiled R 2.0.0 under Mandrake 9, but it won't run unless in a terminal; is there a way to run it in a console, like in Windows? Yes. Did you read the manual the INSTALL file pointed you to? See appendix B.6 in the version I am looking at. Or see `An Introduction to R' appendix B.1 and look for --gui. [To run the GNOME console I think you need R-patched, not 2.0.0 as distributed.] Another approach is to run John Fox's Rcmdr package that provides a console. Actually, that one is more of a script submission device. (It has nowhere to just type and press Enter, you need to edit, select, and press Submit. Which is a good thing for some modes of operation.) You'll find that the Linux consoles are not nearly as developed as the Windows one and hardly anyone is using --gui. There are two good reasons: 1) It's really not that horrible to use the command line in a terminal window on Linux. 2) Many people like to use ESS (see the FAQ) and run everything from Emacs. and of course the bad reason: That there isn't much there. However, had there been a real need, someone would likely have put in the relevant improvements. -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] invalid for factors not really working
Dear all, I have the impression that the function invalid from gtools is not really working as I would expect it to do for factors: Browse[1] invalid(as.factor(NA)) [1] FALSE Browse[1] invalid(as.numeric(NA)) [1] TRUE I would exptect that invalid(as.factor(NA)) is also TRUE. Maybe this should be changed in a consistent way which also works in similar cases for other classes. One could possibly use else return(all(is.na(as.vector(x Any better suggestions? Best regards, Stefan [[alternative HTML version deleted]] __ [EMAIL PROTECTED] 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] confidence interval
No, but this question has been asked fairly recently and work-around posted. Please search the archive. Andy From: lu kan Is there the similar thing for non-linear 'nls'? Lu Uwe Ligges [EMAIL PROTECTED] wrote: lu kan wrote: I used a dataset to fit a linear model. For each new sample, a precition can be obtained using the fitted model. Now I wonder is there any way to calculate the confidence interval of the precition for new samples? Any suggestion or pointing to a reference would be very appreciated. Lu You already found predict(), so read ?predict.lm carefully and find that there is a argument interval. Uwe Ligges - vote.yahoo.com - Register online to vote today! [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] 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] Assist on R-2.0.0 /64 bit AMD/SuSE 9.1
Dear Brian, Apologies;I do mean 'assist' rather than 'Assist'; there are versions for R and for SPlus. I doubt whether it's to do with calling conventions; the functions sometimes work, sometimes they don't, and cause a segmentation fault. Thanks Simon -- Simon D.W. Frost, MA DPhil Adjunct Assistant Professor Department of Pathology University of California, San Diego UCSD Antiviral Research Center 150 W. Washington St. San Diego, CA 92103 USA Tel: +1 619 543 8080 Ext 275 Fax: +1 619 298 0177 Email: [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] R
Hi, Everyone: We are installing R package in our Sun Solaris 9, and falling in trouble. We downloaded all package from bioconductor, the R can not be installed in Sun Solaris 9. We greatly appreciated if you could give us any suggestions. Thanks. Yours Song __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] How to save a complete image of the current state of R ?
Hello, I like to save the complete state of R, i.e. including all environments, objects/workspaces, loaded packages etc.. This wish has arisen since I am not able to reproduce an error which occurs when running R CMD check. Many thanks for your advice in advance. Best Regards Andreas __ [EMAIL PROTECTED] 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] How to save a complete image of the current state of R ?
Andreas Buness wrote: Hello, I like to save the complete state of R, i.e. including all environments, objects/workspaces, loaded packages etc.. This wish has arisen since I am not able to reproduce an error which occurs when running R CMD check. Many thanks for your advice in advance. Best Regards Andreas __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Does save.image meet your needs? Kevin __ [EMAIL PROTECTED] 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] confidence interval
On Fri, 22 Oct 2004, lu kan wrote: Is there the similar thing for non-linear 'nls'? Do read the documentation for predict.nls, which also has an argument interval, which is what you asked. And this time, read even more carefully. Then look in the recent archives, as the posting guide asks, for this question was discussed recently. Uwe Ligges [EMAIL PROTECTED] wrote: lu kan wrote: I used a dataset to fit a linear model. For each new sample, a precition can be obtained using the fitted model. Now I wonder is there any way to calculate the confidence interval of the precition for new samples? Any suggestion or pointing to a reference would be very appreciated. You already found predict(), so read ?predict.lm carefully and find that there is a argument interval. PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] 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] How to save a complete image of the current state of R ?
Andreas Buness wrote: Hello, I like to save the complete state of R, i.e. including all environments, objects/workspaces, loaded packages etc.. I think what you are going to do is not available. You can save the workspace, attach the data and load formerly loaded packages again, of course. Uwe Ligges This wish has arisen since I am not able to reproduce an error which occurs when running R CMD check. Many thanks for your advice in advance. Best Regards Andreas __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] 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] not-mentioned problems on installing R under Solaris; was: R
[EMAIL PROTECTED] wrote: Hi, Everyone: We are installing R package in our Sun Solaris 9, and falling in trouble. We downloaded all package from bioconductor, the R can not be installed in Sun Solaris 9. We greatly appreciated if you could give us any suggestions. Thanks. Yours Song __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Please read the line above which is appended at each R-help message for very well reasons. So PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html;! Please use a sensible subject! Please tell us about your problems. Many users have installed both R and Bioconductor packages under Solaris. So please specify the error messages that appear when you try to install R. And provide all information about versions and compiler you are using. Also, please send Bioconductor related messages to the Bioconductor list. (BTW: people on that list - and every list I am aware of - also will appreciate messages compose along the guidlines of the posting guide.) Uwe Ligges __ [EMAIL PROTECTED] 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] R
You will need to get R working first before installing BioConductor packages. Please provide a more useful output (like the error message) if you want useful help. Have you tried reading the R manual or searching the mail archives [2]. [1] http://cran.r-project.org/doc/manuals/R-admin.pdf [2] http://cran.r-project.org/search.html On Fri, 2004-10-22 at 17:58, [EMAIL PROTECTED] wrote: Hi, Everyone: We are installing R package in our Sun Solaris 9, and falling in trouble. We downloaded all package from bioconductor, the R can not be installed in Sun Solaris 9. We greatly appreciated if you could give us any suggestions. Thanks. Yours Song __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] 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] How to save a complete image of the current state of R ?
Perhaps save.image(file=lala.rda, compress=T) followed by load(lala.rda) to re-load it. On Fri, 2004-10-22 at 18:05, Andreas Buness wrote: Hello, I like to save the complete state of R, i.e. including all environments, objects/workspaces, loaded packages etc.. This wish has arisen since I am not able to reproduce an error which occurs when running R CMD check. Many thanks for your advice in advance. Best Regards Andreas __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] [R-pkgs] New Package for Multivariate and Propensity Score Matching
Matching version 0.48 is now available on CRAN. Matching provides functions for estimating causal effects by multivariate and propensity score matching. The package includes a variety of univariate and multivariate tests to determine if balance has been obtained by the matching procedure. These tests can also be used to determine if an experiment or quasi-experiment is balanced on baseline covariates. The functions provide valid standard errors and allow one to estimate various estimands. For documentation and further details see: http://jsekhon.fas.harvard.edu/matching Cheers, Jas. == Jasjeet S. Sekhon Associate Professor Harvard University Center for Basic Research in the Social Sciences [EMAIL PROTECTED] http://jsekhon.fas.harvard.edu/ Office: 617.496.2426 Fax: 617.507.5524 ___ R-packages mailing list [EMAIL PROTECTED] https://stat.ethz.ch/mailman/listinfo/r-packages __ [EMAIL PROTECTED] 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] R
i think install.packages may help. for example,if i want package car from www.cran.r-project.org i can use install.packages(car) you can use ?install.packages to see more details. ÔÚ 2004Äê10ÔÂ23ÈÕ ÐÇÆÚÁù 00:[EMAIL PROTECTED] дµÀ£º Hi, Everyone: We are installing R package in our Sun Solaris 9, and falling in trouble. We downloaded all package from bioconductor, the R can not be installed in Sun Solaris 9. We greatly appreciated if you could give us any suggestions. Thanks. Yours Song __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] 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] console under Mandrake
Thank you for your both answers, As you might have guessed, I am initiating myself in the Linux wizardry. I have absolutely nothing against command line, I was just heavily used to the Windows console mode; a terminal window is just fine. Actually, I only used the console to install packages from CRAN, anyway; I'm sure I'll find the commands for this. I read the manuals; it probably didn't work for me because I do not use GNOME but KDE. So command line it is... and most probably ESS. Best regards, Adrian -Original Message- From: Peter Dalgaard [mailto:[EMAIL PROTECTED] Sent: 22 octombrie 2004 19:11 To: Adrian Dusa; [EMAIL PROTECTED] Subject: Re: [R] console under Mandrake Prof Brian Ripley [EMAIL PROTECTED] writes: On Fri, 22 Oct 2004, Adrian Dusa wrote: I recently compiled R 2.0.0 under Mandrake 9, but it won't run unless in a terminal; is there a way to run it in a console, like in Windows? Yes. Did you read the manual the INSTALL file pointed you to? See appendix B.6 in the version I am looking at. Or see `An Introduction to R' appendix B.1 and look for --gui. [To run the GNOME console I think you need R-patched, not 2.0.0 as distributed.] Another approach is to run John Fox's Rcmdr package that provides a console. Actually, that one is more of a script submission device. (It has nowhere to just type and press Enter, you need to edit, select, and press Submit. Which is a good thing for some modes of operation.) You'll find that the Linux consoles are not nearly as developed as the Windows one and hardly anyone is using --gui. There are two good reasons: 1) It's really not that horrible to use the command line in a terminal window on Linux. 2) Many people like to use ESS (see the FAQ) and run everything from Emacs. and of course the bad reason: That there isn't much there. However, had there been a real need, someone would likely have put in the relevant improvements. -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] $B%a%C%;!<%8$rG[?.$G$-$^$;$s(B
(B[$B$3$N%a!<%k$O!"7HBSEEOC$J$Ie!":FEYAw?.$7$F$/[EMAIL PROTECTED](B $B"#(B[business-ipr-seminar]$B%0%k!<%W$K$D$$$F$N$*Ld$$9g$o$;(B $B%0%k!<%W4IM}JN,$5$l$F$$$^$9(B]__ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] R2HTML installation on R 1.9.1
Hello, I am trying to install R2HTML version 1.4-3, but am getting errors when I try to use it. I am running R 1.9.1 on Redhat Linux Ent 3 AS x86_64. I installed R2HTML using the following command R CMD INSTALL R2HTML_1.4-3.tar.gz. I did not get any errors when installing it. When I launch R and type library('R2HTML'), I get the following error: library('R2HTML') Error in loadNamespace(i, c(lib.loc, .libPaths()), keep.source) : There is no package called 'grDevices' Error in library(R2HTML) : package/namespace load failed Is there a dependency that I need to install prior to using R2HTML? I could not find any dependencies in any of the R2HTML documentation. I also could not find a package called grDevices on CRAN. Thanks for your help, Mark [[alternative HTML version deleted]] __ [EMAIL PROTECTED] 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] R2HTML installation on R 1.9.1
Threefoot, Mark wrote: Hello, I am trying to install R2HTML version 1.4-3, but am getting errors when I try to use it. I am running R 1.9.1 on Redhat Linux Ent 3 AS x86_64. I installed R2HTML using the following command R CMD INSTALL R2HTML_1.4-3.tar.gz. I did not get any errors when installing it. When I launch R and type library('R2HTML'), I get the following error: library('R2HTML') Error in loadNamespace(i, c(lib.loc, .libPaths()), keep.source) : There is no package called 'grDevices' Error in library(R2HTML) : package/namespace load failed Is there a dependency that I need to install prior to using R2HTML? I could not find any dependencies in any of the R2HTML documentation. I also could not find a package called grDevices on CRAN. Thanks for your help, Mark grDevices is new for R-2.0.0. Either upgrade R or find an older version of R2HTML. http://cran.r-project.org/src/contrib/Archive/ --sundar __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Evaluate a function for various value of parameters
Hello list, I have a problem ... and do not know how to solve it. I would like create a function that estimate the quality of the fit of different functions with different values of parameters. This problem is related to the following one: I would like to create a function evaluatemyfunction which evaluate a function f for different values of parameters. For instance, if f=function(a,b) a*b evaluatemyfunction(f,1:10,5) would return: 5 10 15... I would like that f could have a variable number of arguments. I have begin to write a function: evaluatemyfunction=function(f,...){ b=match.call(expand.dot=F)$... myg=expand.grid(lapply(b,eval)) #contains all combinations of parameters for (i in 1:nrow(myg)){ argsasname=paste(paste(names(myg),myg[1,],sep==),collapse=,) # ?? } } I have try to construct arguments of the function as character, then parse and pass it to f but parse doesn't work: parse(text=paste(paste(names(myg),myg[i,],sep==),collapse=,)) Error in parse(file, n, text, prompt) : parse error Any ideas ?? Thanks in advance, sincerely Stéphane DRAY -- Département des Sciences Biologiques Université de Montréal, C.P. 6128, succursale centre-ville Montréal, Québec H3C 3J7, Canada Tel : (514) 343-6111 poste 1233 Fax : (514) 343-2293 E-mail : [EMAIL PROTECTED] -- Web http://www.steph280.freesurf.fr/ __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] dotplot lattice problems: y axis values and bg color output in jpg
I have a linux system with Fedora Core 2 and R-2.0. I was comparing plots made with plot() and dotplot() and discovered a problem. Although the dots are positioned correctly, the numerical labels in the dotplot y axis are not correct. I put copies here: http://lark.cc.ku.edu/~pauljohn/R/plotTrouble1.jpg That is the correct one from plot, with the higest value on y showing at 18. http://lark.cc.ku.edu/~pauljohn/R/plotTrouble2.jpg That is the dotplot one. The picture is basically the same, except the numbers on the y axis only go up to 8. But the dots are in the correct spots and the x axis is labeled correctly. On the screen, the plots have white backgrounds, but the picture from the dotplot turns out gray. Why is that? Sometimes, if I run another lattice plot in the same session, the colors change to the dark background, and I suppose the same trouble is happening. Isn't trellis.par.set() going to remain in place for all following trellis plots? Here's the code I used to make these 2 graphs. x11(height=6.5,width=6.5) data2003- subset(elaine1,POLCYEAR==2003) plot(data2003$OLDCRASH,data2003$RENUCYC) modall - lm(RENUCYC~OLDCRASH,data=data2003) abline(modall) dev.copy(device=jpeg,file=plotTrouble1.jpg) dev.off() dev.off() trellis.par.set(theme=col.whitebg(),height=9,width=6.5) dotplot (RENUCYC~OLDCRASH, data=elaine1, xlab=ECR, as.table=T,subset=POLCYEAR==2003, panel=function(x,y) { panel.dotplot(x,y,cex=0.2); panel.lmline(x,y); } ) jpeg(file=plotTrouble2.jpg,bg=white,height=480,width=480) trellis.last.object() dev.off() dev.off() I tried to force the ylim on the dotplot up to 18, but it just produced this even uglier result. http://lark.cc.ku.edu/~pauljohn/R/plotTrouble3.jpg -- Paul E. Johnson email: [EMAIL PROTECTED] Dept. of Political Sciencehttp://lark.cc.ku.edu/~pauljohn 1541 Lilac Lane, Rm 504 University of Kansas Office: (785) 864-9086 Lawrence, Kansas 66044-3177 FAX: (785) 864-5700 __ [EMAIL PROTECTED] 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] Evaluate a function for various value of parameters
Hi Stephane, * Stephane DRAY [EMAIL PROTECTED] [041023 00:20]: Hello list, I have a problem ... and do not know how to solve it. I would like create a function that estimate the quality of the fit of different functions with different values of parameters. This problem is related to the following one: I would like to create a function evaluatemyfunction which evaluate a function f for different values of parameters. For instance, if f=function(a,b) a*b evaluatemyfunction(f,1:10,5) would return: 5 10 15... I would like that f could have a variable number of arguments. I have begin to write a function: That function has already been written for you. Lookup 'mapply' in the online help. HTH Olaf __ [EMAIL PROTECTED] 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] dotplot lattice problems: y axis values and bg color output in jpg
Paul Johnson wrote: I have a linux system with Fedora Core 2 and R-2.0. I was comparing plots made with plot() and dotplot() and discovered a problem. Although the dots are positioned correctly, the numerical labels in the dotplot y axis are not correct. I put copies here: http://lark.cc.ku.edu/~pauljohn/R/plotTrouble1.jpg That is the correct one from plot, with the higest value on y showing at 18. http://lark.cc.ku.edu/~pauljohn/R/plotTrouble2.jpg That is the dotplot one. The picture is basically the same, except the numbers on the y axis only go up to 8. But the dots are in the correct spots and the x axis is labeled correctly. On the screen, the plots have white backgrounds, but the picture from the dotplot turns out gray. Why is that? Sometimes, if I run another lattice plot in the same session, the colors change to the dark background, and I suppose the same trouble is happening. Isn't trellis.par.set() going to remain in place for all following trellis plots? Here's the code I used to make these 2 graphs. x11(height=6.5,width=6.5) data2003- subset(elaine1,POLCYEAR==2003) plot(data2003$OLDCRASH,data2003$RENUCYC) modall - lm(RENUCYC~OLDCRASH,data=data2003) abline(modall) dev.copy(device=jpeg,file=plotTrouble1.jpg) dev.off() dev.off() trellis.par.set(theme=col.whitebg(),height=9,width=6.5) dotplot (RENUCYC~OLDCRASH, data=elaine1, xlab=ECR, as.table=T,subset=POLCYEAR==2003, panel=function(x,y) { panel.dotplot(x,y,cex=0.2); panel.lmline(x,y); } ) jpeg(file=plotTrouble2.jpg,bg=white,height=480,width=480) trellis.last.object() dev.off() dev.off() I tried to force the ylim on the dotplot up to 18, but it just produced this even uglier result. http://lark.cc.ku.edu/~pauljohn/R/plotTrouble3.jpg Paul, dotplot is not doing what you think it's doing. RENUCYC is being forced to a factor with 9 levels. I think what you intending to use is xyplot. Just trellis.par.set(theme=col.whitebg(),height=9,width=6.5) xyplot(RENUCYC~OLDCRASH, data=elaine1, xlab=ECR, as.table=T,subset=POLCYEAR==2003, panel=function(x,y) { panel.dotplot(x,y,cex=0.2) #; no need for semi-colons panel.lmline(x,y) }) As for your second question, when you call jpeg a new device is called. You need to reset the theme after opening the device, or just use trellis.device: trellis.device(jpeg, file=plotTrouble2.jpg, theme = col.whitebg(),height=480,width=480) trellis.last.object() dev.off() --sundar __ [EMAIL PROTECTED] 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] dotplot lattice problems: y axis values and bg color output in jpg
Hi Paul. * Paul Johnson [EMAIL PROTECTED] [041023 00:24]: *snip* That is the dotplot one. The picture is basically the same, except the numbers on the y axis only go up to 8. But the dots are in the correct spots and the x axis is labeled correctly. Unless RENUCYC is a factor, a dotplot makes little sense. Afaik you're looking for an xyplot. On the screen, the plots have white backgrounds, but the picture from the dotplot turns out gray. Why is that? It's the default lattice color sheme which makes for easier viewing on computer screens. Sometimes, if I run another lattice plot in the same session, the colors change to the dark background, and I suppose the same trouble is happening. Isn't trellis.par.set() going to remain in place for all following trellis plots? To quote the manual: Once a device is open, it's settings can be modified. When another instance of the same device is opened later using trellis.device, the settings for that device are reset to its defaults, unless otherwise specified in the call to trellis.device. HTH Olaf __ [EMAIL PROTECTED] 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] dotplot lattice problems: y axis values and bg color output in jpg
On Friday 22 October 2004 17:16, Paul Johnson wrote: I have a linux system with Fedora Core 2 and R-2.0. I was comparing plots made with plot() and dotplot() and discovered a problem. Although the dots are positioned correctly, the numerical labels in the dotplot y axis are not correct. That's comparing apples and oranges, sort of. You should use xyplot instead of dotplot if you want the equivalent of plot (more precisely, plot.default). Although it's not obvious from your code, I'll bet your Y variable is numeric with 9 unique values. dotplot treats one of its variables as a factor. If neither variable are factors, it by default chooses the Y variable is a factor. If it is numeric, as in your case, it converts it into a 'shingle' (see ?shingle). This has almost the same effect as coercion to a factor, except the Y values are labeled 1,2,... instead of the levels. I put copies here: http://lark.cc.ku.edu/~pauljohn/R/plotTrouble1.jpg That is the correct one from plot, with the higest value on y showing at 18. http://lark.cc.ku.edu/~pauljohn/R/plotTrouble2.jpg That is the dotplot one. The picture is basically the same, except the numbers on the y axis only go up to 8. But the dots are in the correct spots and the x axis is labeled correctly. They are not the same. The Y-spacing between the unique values are all equal in dotplot, unlike in the plot output. On the screen, the plots have white backgrounds, but the picture from the dotplot turns out gray. Why is that? Sometimes, if I run another lattice plot in the same session, the colors change to the dark background, and I suppose the same trouble is happening. Isn't trellis.par.set() going to remain in place for all following trellis plots? Trellis settings are very much device-specific, and trellis.par.set only affects the currently open device (much like par). You call it to change the x11 settings, but you haven't changed the jpeg settings anywhere, so the defaults are used. What happens for new instances of the same device is a bit more subtle. Once you change settings for a particular device type (say x11), lattice remembers these settings. However, if you open a new instance of this device with, say trellis.device(x11) the x11 settings revert back to the x11 defaults (this behaviour can be suppressed by an argument to trellis.device). Now, even if you don't do this explicitly, any attempt to create a Trellis plot while there's no currently active device results in a call to trellis.device, and hence results in a new instance with the settings reset to defaults. However, the settings are NOT reset if the device is already open. An example to make things a bit less confusing (hopefully): p - xyplot(1~1) x11() p ## default (grey) background trellis.par.set(col.whitebg()) p ## 'white' (actually transparent) background dev.off() x11() p ## still white background, settings retained dev.off() p ## new instance of x11 started, settings reset, ## hence grey background If you find this surprising, it's basically because lattice has no way of knowing that a new device has been opened unless it's done through trellis.device. Otherwise, the idea is to be similar to par and reset the defaults everytime. Deepayan __ [EMAIL PROTECTED] 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] How to calculate a double integral ...?
Gabor Grothendieck [EMAIL PROTECTED] writes: cjlu cjlu at mail.ncku.edu.tw writes: : How can I calculate a double integral like : : \int_a^b \int_c^y g(x, y) dx dy : : where a, b, c are constants, g(x, y), e.g., : g(x, y) = tan(x + y). : Integrate g2 - function(x, y) g(x, y) * (x y) over (a,b) x (a,c). Thanks Gabor for your prompt and helpful response! Later on, I realized that such an integration can be done by the following way, provided function g(x, y) takes vector input, e.g., g(x, y) = tan(x + y) integrate(function(y) { + sapply(y, function(y) { + integrate(function(x) tan(x + y), -.5, y)$value + }) + }, 0, .5) 0.07238855 with absolute error 1.1e-15 if g(x, y) can only take scalar input, we can do integrate(function(y) { + sapply(y, function(y) { + integrate(function(x) { + sapply(x, function(x) tan(x + y)) + }, -.5, y)$value + }) + }, 0, .5) 0.07238855 with absolute error 1.1e-15 Best regards, C. Joseph Lu Department of Statistics National Cheng-Kung University Tainan Taiwan, ROC - This mail sent through Seednet Webmail http://webmail.seed.net.tw __ [EMAIL PROTECTED] 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] Evaluate a function for various value of parameters
Stephane DRAY dray at biomserv.univ-lyon1.fr writes: : I would like to create a function evaluatemyfunction which evaluate a : function f for different values of parameters. For instance, if : f=function(a,b) a*b : evaluatemyfunction(f,1:10,5) would return: : 5 : 10 : 15... : This is not a general solution (Olaf has already provided that) but in some cases you may simply be able to write your function f so that it takes vector arguments. For example, with the f you have above one could write f(1:10,5) . __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] JDBC DB access in R
Hello, i see packages referencing using ODBC access to databases via R, are there any packages that use JDBC to submit SQL to a database and return into a data frame? -zubin __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html