Dear List, I have acquired a new desktop and wanted to put a free OS on it. I am trying Fedora Core 1, but not sure what the best Linux OS is for using R 2.0.1? Thank you in advance for your input, Tom Volscho ************************************ Thomas W. Volscho Graduate Student Dept. of Sociology U-2068 University of Connecticut Storrs, CT 06269 Phone: (860) 486-3882 http://vm.uconn.edu/~twv00001
El dom, 12-12-2004 a las 15:23 -0500, Thomas W Volscho escribi??:> Dear List, > I have acquired a new desktop and wanted to put a free OS on it. I am trying Fedora Core 1, but not sure what the best Linux OS is for using R 2.0.1? > > Thank you in advance for your input, > Tom Volscho >I used R in the susseccive Fedora Core release (at the moment I use R 2.0.0 + FC3) with satisfaction. best, Juan Antonio ************************************> Thomas W. Volscho > Graduate Student > Dept. of Sociology U-2068 > University of Connecticut > Storrs, CT 06269 > Phone: (860) 486-3882 > http://vm.uconn.edu/~twv00001 > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html-- Juan Antonio Caballero Molina /"\ ASCII Ribbon Campaign Universidad de C??rdoba \ / Respect for open standards Looking for fine software X No HTML/RTF in email and/or writing? / \ No M$ Word docs in email http://counter.li.org Linux user number 346272
Hi, recently, i installed Gentoo in addition to SuSE on my Laptop. In order to see whether it was worth the effort, i did a small benchmark for R under SuSE and Gentoo. I guess, that the benchmarks under SuSE are also approximately valid for other binary distributions. As a consequence, depending on your Unix/Linux experience, i would recommend Gentoo for optimal performance. If you are new to Linux and want to avoid the relatively complicated Gentoo setup, i recommend that you should least compile R from source, which should be easy also for a Linux newbie. The benchmark (see below for the script) consisted of i) Generating random normals and plotting density plots. ii) Cox model iii) Inverting random 200x200 matrices. I used different versions of R, since 2.0.1 is not yet included in the Gentoo portage tree. Here are my results: A) SuSE 9.2, R 2.0.1 (from i586 rpm): benchmark cpu.user cpu.system 1 benchmark.density 222.22 6.76 11 benchmark.survival 133.69 0.27 12 benchmark.linearalgebra 365.25 3.64 B) R 1.9.0 compiled under SuSE 9.2, without additional CFLAGS (i.e. using CFLAGS from the configure script): benchmark cpu.user cpu.system 1 benchmark.density 217.31 6.12 11 benchmark.survival 101.77 0.14 12 benchmark.linearalgebra 165.49 3.34 C) R 1.9.0 compiled under SuSE 9.2, using the same CFLAGS as in Gentoo (see below for my CFLAGS): benchmark cpu.user cpu.system 1 benchmark.density 199.16 5.96 11 benchmark.survival 94.26 0.15 12 benchmark.linearalgebra 159.17 4.93 D) R 1.9.0-r1 under Gentoo, using the CFLAGS for the whole system, not just for R. benchmark cpu.user cpu.system 1 benchmark.density 176.08 6.10 11 benchmark.survival 84.20 0.14 12 benchmark.linearalgebra 134.72 6.54 My CFLAGS (for a centrino) are: CFLAGS="-pipe -O3 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse,387 -maccumulate-outgoing-args -mno-align-stringops -fomit-frame-pointer -ffast-math -fsched-spec-load -fprefetch-loop-arrays -ftracer -fmove-all-movables" Question to the Gurus: Would it be allowed, to use -funsafe-math-optimizations? Here is my benchmark script: -------------------------------------------------- require(survival) benchmark.density <- function() { for (i in 1:1000) { x <- rnorm(100000) plot(density(x), type="l", xlim=c(-10,10), main=i) } } benchmark.survival <- function() { for (i in 1:1000) { time <- c(rexp(800, 1), rexp(800, 0.8), rexp(800, 0.9), rexp(800, 0.7), rexp(800, 0.5)) time <- round(time, digits=2) # introduce ties event <- as.integer(time <= 1) time[time > 1] <- 1 group <- c(rep(0, 800), rep(1, 800), rep(2, 800), rep(3, 800), rep(4, 800)) plot(survfit(Surv(time,event) ~ group), xlim=c(0,1)) title(main=i) dummy <- coxph(Surv(time,event) ~ group) } } benchmark.linearalgebra <- function() { for (i in 1:1000) { A <- matrix(rnorm(200*200), nrow=200, ncol=200) AI <- solve(A) residual <- A %*% AI - diag(1, 200) hist(residual, main=i) } } my.benchmark <- function(func) { funcname <- (as.character(sys.call()[[2]])) cat(funcname, "\n") times <- system.time(func()) return(data.frame(benchmark=funcname, cpu.user=times[1], cpu.system=times[2])) } result <- my.benchmark(benchmark.density) result <- rbind(result, my.benchmark(benchmark.survival)) result <- rbind(result, my.benchmark(benchmark.linearalgebra)) sink("benchmark.out") cat(Sys.info(), "\n") print(result) sink() -------------------------------------------------------------- Christian> Dear List, > I have acquired a new desktop and wanted to put a free OS on it. I am > trying Fedora Core 1, but not sure what the best Linux OS is for using R > 2.0.1? > > Thank you in advance for your input, > Tom Volscho > > ************************************ > Thomas W. Volscho > Graduate Student > Dept. of Sociology U-2068 > University of Connecticut > Storrs, CT 06269 > Phone: (860) 486-3882 > http://vm.uconn.edu/~twv00001 > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html >
Have you tried Qunatian? http://dirk.eddelbuettel.com/quantian.html Not only does it have R 2.0.1, but it's got a whole bunch of other programs already installed, including emacs, TeX, kile, and many more apps. It's debian and based on clusterKnoppix. You can run it "live" or install it to hard drive. - Mohamed -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Thomas W Volscho Sent: 12 December 2004 15:24 To: r-help at stat.math.ethz.ch Subject: [R] switching to Linux, suggestions? Dear List, I have acquired a new desktop and wanted to put a free OS on it. I am trying Fedora Core 1, but not sure what the best Linux OS is for using R 2.0.1? Thank you in advance for your input, Tom Volscho ************************************ Thomas W. Volscho Graduate Student Dept. of Sociology U-2068 University of Connecticut Storrs, CT 06269 Phone: (860) 486-3882 http://vm.uconn.edu/~twv00001 ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
I have both desktop and laptop with Fedora core 3. R 2.0.1 are working well on all PCs. There is a problem with Fedora core 3 on HP nx500 laptop. The display resolution is 1024x768 according to HP's description. However, during the installation, there were only two options on display resolution "800x600" "640x480". I tried various ways, but can't set it to 1024x768. any one have fix for this. Yuandan On Sun, 12 Dec 2004 15:23:40 -0500 Thomas W Volscho <THOMAS.VOLSCHO at huskymail.uconn.edu> wrote:> Dear List, > I have acquired a new desktop and wanted to put a free OS on it. I am trying Fedora Core 1, but not sure what the best Linux OS is for using R 2.0.1? > > Thank you in advance for your input, > Tom Volscho > > ************************************ > Thomas W. Volscho > Graduate Student > Dept. of Sociology U-2068 > University of Connecticut > Storrs, CT 06269 > Phone: (860) 486-3882 > http://vm.uconn.edu/~twv00001 > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Hello, Thomas W Volscho schrieb:> Dear List, > I have acquired a new desktop and wanted to put a free OS on it. I am trying Fedora Core 1, but not sure what the best Linux OS is for using R 2.0.1?R is developed on Linux, so there shouldn't be too much restrictions on whatever distri you're going to use! If running a new shiny Desktop you might consider other aspects than using R, which should run with every Linux distribution. If you're looking for something comfortable to install and maintain you might give Quatian a try (http://dirk.eddelbuettel.com/quantian.html). This is a somewhat modified Knoppix trimmed to statistical analysis (not entirely, though) regards Thomas
Before choosing a GNU/Linux distribution look into the package management issue. http://distrowatch.com/ I would suggest that you avoid all RPM-based distributions (Mandrake, Fedora, SuSE), and consider Debian (+ those based on it) & the source-based distributions (such as Gentoo). I've been using Mandrake for a couple of years but got tired of RPM. HTH, b. -----Original Message----- From: Thomas W Volscho [mailto:THOMAS.VOLSCHO at huskymail.uconn.edu] Sent: Sunday, December 12, 2004 3:24 PM To: r-help at stat.math.ethz.ch Subject: [R] switching to Linux, suggestions? Dear List, I have acquired a new desktop and wanted to put a free OS on it. I am trying Fedora Core 1, but not sure what the best Linux OS is for using R 2.0.1? Thank you in advance for your input, Tom Volscho ************************************ Thomas W. Volscho Graduate Student Dept. of Sociology U-2068 University of Connecticut Storrs, CT 06269 Phone: (860) 486-3882 http://vm.uconn.edu/~twv00001 ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __________________________________ Dress up your holiday email, Hollywood style. Learn more.
Dear all: I have the following (simple?) problem: Consider a dataframe where the first column contains integers used as index, e.g. index 24 13 46 32 Now I have the following vector used to sort the dataframe: x <- c(13,24,32,46) Sorting the dataframe can be done by using order. However consider the following vector: x <- c(13,32,13,24,46,24,24) Now I want to get the dataframe in the order of the rows defined in x, i.e. the dataframe contains duplicate rows. One way to achieve this would be to use rbind in a for-loop. My question is: Is there an easier and - more important - faster way to obtain the dataframe as defined in x? Thank you in advance. Best regards Christian _._._._._._._._._._._._._._._._ C.h.i.s.t.i.a.n S.t.r.a.t.o.w.a V.i.e.n.n.a A.u.s.t.r.i.a _._._._._._._._._._._._._._._._
Hi Christian, cstrato wrote:> Dear all: >*snip*> > However consider the following vector: > x <- c(13,32,13,24,46,24,24) > Now I want to get the dataframe in the order of the rows > defined in x, i.e. the dataframe contains duplicate rows. > One way to achieve this would be to use rbind in a for-loop. > > My question is: > Is there an easier and - more important - faster way to > obtain the dataframe as defined in x??unique ?sort HTH Olaf
?match ix<-df$index ## just for clarity df[match(x,ix),] -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA "The business of the statistician is to catalyze the scientific learning process." - George E. P. Box> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of cstrato > Sent: Monday, December 13, 2004 11:03 AM > To: r-help at stat.math.ethz.ch > Subject: [R] How to duplicate rows in dataframe? > > Dear all: > > I have the following (simple?) problem: > Consider a dataframe where the first column contains > integers used as index, e.g. > index > 24 > 13 > 46 > 32 > > Now I have the following vector used to sort the dataframe: > x <- c(13,24,32,46) > Sorting the dataframe can be done by using order. > > However consider the following vector: > x <- c(13,32,13,24,46,24,24) > Now I want to get the dataframe in the order of the rows > defined in x, i.e. the dataframe contains duplicate rows. > One way to achieve this would be to use rbind in a for-loop. > > My question is: > Is there an easier and - more important - faster way to > obtain the dataframe as defined in x? > > Thank you in advance. > Best regards > Christian > _._._._._._._._._._._._._._._._ > C.h.i.s.t.i.a.n S.t.r.a.t.o.w.a > V.i.e.n.n.a A.u.s.t.r.i.a > _._._._._._._._._._._._._._._._ > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html >
Christian: You should be able to do this with the command: dataframe[order(dataframe$x),] See order or sort in the R help for optional arguments that can customize the way you want to deal with ties. Mike ----- Original Message ----- From: "cstrato" <cstrato at aon.at> To: <r-help at stat.math.ethz.ch> Sent: Monday, December 13, 2004 2:02 PM Subject: [R] How to duplicate rows in dataframe?> Dear all: > > I have the following (simple?) problem: > Consider a dataframe where the first column contains > integers used as index, e.g. > index > 24 > 13 > 46 > 32 > > Now I have the following vector used to sort the dataframe: > x <- c(13,24,32,46) > Sorting the dataframe can be done by using order. > > However consider the following vector: > x <- c(13,32,13,24,46,24,24) > Now I want to get the dataframe in the order of the rows > defined in x, i.e. the dataframe contains duplicate rows. > One way to achieve this would be to use rbind in a for-loop. > > My question is: > Is there an easier and - more important - faster way to > obtain the dataframe as defined in x? > > Thank you in advance. > Best regards > Christian > _._._._._._._._._._._._._._._._ > C.h.i.s.t.i.a.n S.t.r.a.t.o.w.a > V.i.e.n.n.a A.u.s.t.r.i.a > _._._._._._._._._._._._._._._._ > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html
Thank you all (Olaf Mersmann, Berton Gunter, James Holtman, Peter Aspach) for your fast reply. The solutions: df[match(x,ix),] and df[c(1,2,2,3,3),] are exactly what I was looking for. Best regards Christian Berton Gunter wrote:> ?match > > ix<-df$index ## just for clarity > > df[match(x,ix),] > > -- Bert Gunter > Genentech Non-Clinical Statistics > South San Francisco, CA > > "The business of the statistician is to catalyze the scientific learning > process." - George E. P. Box > > > > >>-----Original Message----- >>From: r-help-bounces at stat.math.ethz.ch >>[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of cstrato >>Sent: Monday, December 13, 2004 11:03 AM >>To: r-help at stat.math.ethz.ch >>Subject: [R] How to duplicate rows in dataframe? >> >>Dear all: >> >>I have the following (simple?) problem: >>Consider a dataframe where the first column contains >>integers used as index, e.g. >> index >> 24 >> 13 >> 46 >> 32 >> >>Now I have the following vector used to sort the dataframe: >> x <- c(13,24,32,46) >>Sorting the dataframe can be done by using order. >> >>However consider the following vector: >> x <- c(13,32,13,24,46,24,24) >>Now I want to get the dataframe in the order of the rows >>defined in x, i.e. the dataframe contains duplicate rows. >>One way to achieve this would be to use rbind in a for-loop. >> >>My question is: >>Is there an easier and - more important - faster way to >>obtain the dataframe as defined in x? >> >>Thank you in advance. >>Best regards >>Christian >>_._._._._._._._._._._._._._._._ >>C.h.i.s.t.i.a.n S.t.r.a.t.o.w.a >>V.i.e.n.n.a A.u.s.t.r.i.a >>_._._._._._._._._._._._._._._._ >> >>______________________________________________ >>R-help at stat.math.ethz.ch mailing list >>https://stat.ethz.ch/mailman/listinfo/r-help >>PLEASE do read the posting guide! >>http://www.R-project.org/posting-guide.html >> > > > > >