Re: [R] Mandriva Spring 2007 and R
Thank you everyone for all of your suggestions!! I am going to try compiling R from the source- it should be the best exercise to broaden my understanding of Linux. Best. Jonathan. Roland Rau <[EMAIL PROTECTED]> wrote: Hi Jonathan, Jonathan Morse wrote: > I am new to Linux (not to R) and recently installed Mandriva Spring 2007 on > my partitioned hard drive. My next objective is to install R in the Linux > environment, unfortunately Mandriva is not one of the Linux distributions > available for download... Could someone please let me know which > distribution I should use? > One possibility is, of course, that you compile it yourself for your computer. Compiling R was my first shot at compiling programs when I was new to Linux, and it was not very difficult. It is described nicely in the R Installation Administration Manual. http://cran.r-project.org/doc/manuals/R-admin.html Basically, you only need to take care of the following steps to get you started: - did you download and unpack the source distribution (see section 1.1 of the manual)? - do you have the required tools installed (see section A.1 of the manual)? (C compiler, Fortran compiler, libreadline, libjpeg, libpng, tex/latex, Perl5, xorg-x11-dev) - compilation (see section 2.1 in the manual) I hope this helps? Best, Roland - [[alternative HTML version deleted]] __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
[R] Mandriva Spring 2007 and R
I am new to Linux (not to R) and recently installed Mandriva Spring 2007 on my partitioned hard drive. My next objective is to install R in the Linux environment, unfortunately Mandriva is not one of the Linux distributions available for download... Could someone please let me know which distribution I should use? Thanks. Jonathan - Boardwalk for $500? In 2007? Ha! [[alternative HTML version deleted]] __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
Re: [R] Trimming a Data Set
That works nicely. Thank you. jim holtman <[EMAIL PROTECTED]> wrote: try this: trim <- function(x,prop=.05) { trimlow <-quantile(x,prob=(prop)) trimhigh <- quantile(x,prob=(1 - prop)) x[(x >= trimlow) & (x <= trimhigh)] } On 3/20/07, Jonathan Morse <[EMAIL PROTECTED]> wrote: Thanks for the rapid response. The inequality with the quantile trim works great, however I am in looking for a two tailed trim. This could work if I could unite two series in a command similar to the following: trim <- function(x,prop=.05) { trimlow <- x[x < quantile(x,prob=(1-prop))] trimhigh <- x[x > quantile(x,prob=(prop))] trimx <- intersect(trimlow, trimhigh) return(trimx) } However the intersect function will not return repeated values, which is a problem. Any thoughts?? Thanks. Petr Klasterecky <[EMAIL PROTECTED]> wrote: If it is precise enough for you, you can use trim <- function(x,prop=.05) { trimx <- x[x < quantile(x,prob=(1-prop))] return(trimx) } Petr Jonathan Morse napsal(a): > Hi, > > I am trying to restrict a data set so as not to included outliers. > Specifically, I would like to specify a percentage where a fraction of > observations are eliminated from the data set, much in the same way that the > trimmed mean function works - but leaving the restricted data set intact. > > I have been using a function which will restrict the data set using: >> trim=function(x,p){ >> o=order(x) >> xo=x[o] >> n=length(xo) >> tl=round(n*p) >> print(xo[(tl+1):(n-tl)])} > > However I was wondering if anyone knew a more elegant and simple method to > get the same result. > > Thanks in advance. > > > > - > Don't pick lemons. > > [[alternative HTML version deleted]] > > __ > R-help@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 > and provide commented, minimal, self-contained, reproducible code. > -- Petr Klasterecky Dept. of Probability and Statistics Charles University in Prague Czech Republic - TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. [[alternative HTML version deleted]] __ R-help@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 and provide commented, minimal, self-contained, reproducible code. -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve? - It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. [[alternative HTML version deleted]] __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
Re: [R] Trimming a Data Set
Thanks for the rapid response. The inequality with the quantile trim works great, however I am in looking for a two tailed trim. This could work if I could unite two series in a command similar to the following: trim <- function(x,prop=.05) { trimlow <- x[x < quantile(x,prob=(1-prop))] trimhigh <- x[x > quantile(x,prob=(prop))] trimx <- intersect(trimlow, trimhigh) return(trimx) } However the intersect function will not return repeated values, which is a problem. Any thoughts?? Thanks. Petr Klasterecky <[EMAIL PROTECTED]> wrote: If it is precise enough for you, you can use trim <- function(x,prop=.05) { trimx <- x[x < quantile(x,prob=(1-prop))] return(trimx) } Petr Jonathan Morse napsal(a): > Hi, > > I am trying to restrict a data set so as not to included outliers. > Specifically, I would like to specify a percentage where a fraction of > observations are eliminated from the data set, much in the same way that the > trimmed mean function works - but leaving the restricted data set intact. > > I have been using a function which will restrict the data set using: >> trim=function(x,p){ >> o=order(x) >> xo=x[o] >> n=length(xo) >> tl=round(n*p) >> print(xo[(tl+1):(n-tl)])} > > However I was wondering if anyone knew a more elegant and simple method to > get the same result. > > Thanks in advance. > > > > - > Don't pick lemons. > > [[alternative HTML version deleted]] > > __ > R-help@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 > and provide commented, minimal, self-contained, reproducible code. > -- Petr Klasterecky Dept. of Probability and Statistics Charles University in Prague Czech Republic - Be a PS3 game guru. [[alternative HTML version deleted]] __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
Re: [R] Trimming a Data Set
Thanks for the rapid response. The inequality with the quantile trim works great, however I am in looking for a two tailed trim. This could work if I could unite two series in a command similar to the following: trim <- function(x,prop=.05) { trimlow <- x[x < quantile(x,prob=(1-prop))] trimhigh <- x[x > quantile(x,prob=(prop))] trimx <- intersect(trimlow, trimhigh) return(trimx) } However the intersect function will not return repeated values, which is a problem. Any thoughts?? Thanks. Petr Klasterecky <[EMAIL PROTECTED]> wrote: If it is precise enough for you, you can use trim <- function(x,prop=.05) { trimx <- x[x < quantile(x,prob=(1-prop))] return(trimx) } Petr Jonathan Morse napsal(a): > Hi, > > I am trying to restrict a data set so as not to included outliers. > Specifically, I would like to specify a percentage where a fraction of > observations are eliminated from the data set, much in the same way that the > trimmed mean function works - but leaving the restricted data set intact. > > I have been using a function which will restrict the data set using: >> trim=function(x,p){ >> o=order(x) >> xo=x[o] >> n=length(xo) >> tl=round(n*p) >> print(xo[(tl+1):(n-tl)])} > > However I was wondering if anyone knew a more elegant and simple method to > get the same result. > > Thanks in advance. > > > > - > Don't pick lemons. > > [[alternative HTML version deleted]] > > __ > R-help@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 > and provide commented, minimal, self-contained, reproducible code. > -- Petr Klasterecky Dept. of Probability and Statistics Charles University in Prague Czech Republic - TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. [[alternative HTML version deleted]] __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
[R] Trimming a Data Set
Hi, I am trying to restrict a data set so as not to included outliers. Specifically, I would like to specify a percentage where a fraction of observations are eliminated from the data set, much in the same way that the trimmed mean function works - but leaving the restricted data set intact. I have been using a function which will restrict the data set using: > trim=function(x,p){ > o=order(x) > xo=x[o] > n=length(xo) > tl=round(n*p) > print(xo[(tl+1):(n-tl)])} However I was wondering if anyone knew a more elegant and simple method to get the same result. Thanks in advance. - Don't pick lemons. [[alternative HTML version deleted]] __ R-help@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 and provide commented, minimal, self-contained, reproducible code.