[R] How to Install R 3.1.0 on ubuntu 12.0.4

2014-10-14 Thread madhvi
Hi, Can anyone tell me the steps to install R 3.1.0 and rstudio on ubuntu 12.0.4. Thanks Madhvi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] How to Install R 3.1.0 on ubuntu 12.0.4

2014-10-14 Thread Pascal Oettli
Hi, http://cran.r-project.org/bin/linux/ubuntu/ http://www.rstudio.com/products/rstudio/download/ Enjoy, Pascal On Tue, Oct 14, 2014 at 3:17 PM, madhvi madhvi.gu...@orkash.com wrote: Hi, Can anyone tell me the steps to install R 3.1.0 and rstudio on ubuntu 12.0.4. Thanks Madhvi

Re: [R] How to Install R 3.1.0 on ubuntu 12.0.4

2014-10-14 Thread Pascal Oettli
Please reply to the list, not only to me. RStudio is for Ubuntu 10.04+ (please note the +). About R 3.1.0, you probably will have to compile from the source. Regards, Pascal On Tue, Oct 14, 2014 at 3:31 PM, madhvi madhvi.gu...@orkash.com wrote: Hi, I have followed these links but it is

[R] Legend (guides) for point and two line graph

2014-10-14 Thread David Bourne
I’m trying to generate a plot with a series of data points and best fit lines from two stat models. I’m generating the best-fits with another program. I have the data in a csv file as: Time,Observed,Calculated,Model 0.000,0.0,13.0810,1C 0.2500,15.,12.5298,1C 0.5000,12.,12.0018,1C

[R] Storing vectors as vectors in a list without losing each individual vector

2014-10-14 Thread Patricia Seo
Hi everyone, My help request is similar to what was asked by Ken Termiso on April 18th, 2005. Link here: https://stat.ethz.ch/pipermail/r-help/2005-April/069729.html Matt Wiener answered with suggesting a vector list where you hand type each of the vectors. This is not what I want to do. What

Re: [R] How to Install R 3.1.0 on ubuntu 12.0.4

2014-10-14 Thread madhvi
Hi, How to install RStudio after downloading debian package Madhvi On Tuesday 14 October 2014 12:09 PM, Pascal Oettli wrote: Please reply to the list, not only to me. RStudio is for Ubuntu 10.04+ (please note the +). About R 3.1.0, you probably will have to compile from the source. Regards,

Re: [R] How to Install R 3.1.0 on ubuntu 12.0.4

2014-10-14 Thread Pascal Oettli
The support for RStudio is located here: https://support.rstudio.com Regards, Pascal On Tue, Oct 14, 2014 at 4:08 PM, madhvi madhvi.gu...@orkash.com wrote: Hi, How to install RStudio after downloading debian package Madhvi On Tuesday 14 October 2014 12:09 PM, Pascal Oettli wrote: Please

Re: [R] How to Install R 3.1.0 on ubuntu 12.0.4

2014-10-14 Thread madhvi
Hi, Thanks for your help.I got it installed. Madhvi On Tuesday 14 October 2014 12:50 PM, Pascal Oettli wrote: The support for RStudio is located here: https://support.rstudio.com Regards, Pascal On Tue, Oct 14, 2014 at 4:08 PM, madhvi madhvi.gu...@orkash.com wrote: Hi, How to install

[R] ggplot scale_x_date : to plot quarterly scale?

2014-10-14 Thread jpm miao
Hi, I am plotting time series by ggplot2, but I believe that my question applies to other plotting tool as well. I want to make my x-axis the quarterly scale, e.g: 2000Q1 2000Q2. However, scale_x_date and date_format(%m/%d) support all time formats BUT QUARTERs

[R] To build a new Df from 2 Df

2014-10-14 Thread Arnaud Michel
Hello I have 2 df Dem and Rap. I would want to build all the df (dfnew) by associating these two df (Dem and Rap) in the following way : For each value of Dem$Nom (dfnew$Demandeur), I associate 2 different values of Rap$Nom (dfnew$Rapporteur1 and dfnew$Rapporteur2) in such a way * for each

Re: [R] ggplot scale_x_date : to plot quarterly scale?

2014-10-14 Thread Franklin Mairura
Try this code, this may get a solution close to what you need. The advantage with this code is that you specify the text you want to appear on the xaxis. The dates have to be supplied as text formats, and located on the xaxis using the axis and at commands. the at command allows for

Re: [R] Help with a function [along columns]

2014-10-14 Thread Jim Lemon
On Mon, 13 Oct 2014 08:54:51 PM Kate Ignatius wrote: Just an update to this: gtal - function(d) { alleles - sapply(d, function(.) strsplit(as.character(.), /)) gt - unlist(lapply(alleles, function(x) ifelse(identical(x[[1]], vcf[,3]) identical(x[[2]], vcf[,3]), 'RR',

Re: [R] Storing vectors as vectors in a list without losing each individual vector

2014-10-14 Thread Henrik Bengtsson
On Oct 13, 2014 11:58 PM, Patricia Seo p...@stanford.edu wrote: Hi everyone, My help request is similar to what was asked by Ken Termiso on April 18th, 2005. Link here: https://stat.ethz.ch/pipermail/r-help/2005-April/069729.html Matt Wiener answered with suggesting a vector list where you

[R] how to ajust y-axis values in plot() ?

2014-10-14 Thread PO SU
Dear helpeRs,   I want to plot( 11:20 ) in a plot.  if i just type the code above, the y value  will be from 11 to 20, now i want the value from a given range like  0 to 40, how can i do it? I read ?plot  for a while but  still can't solve it. Actually, the qustion is founded when i already

[R] ggplot - start axis label with superscript

2014-10-14 Thread Tom Walker
Dear help, I’m stuck trying to begin an axis label in ggplot with a superscript. While I’m fine using expression to insert them in between normal text in an axis label, this doesn’t appear to work at the start of an expression. For example: mydata - data.frame(x = 1:10, y = 10:1) # this

[R] evaluate NA to FALSE instead of NA?

2014-10-14 Thread Rainer M Krug
Hi I want to evaluate NA and NaN to FALSE (for indexing) so I would like to have the result as indicated here: , | p - c(1:10/100, NA, NaN) | p | [1] 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10 NA NaN | p[p=0.05] | [1] 0.01 0.02 0.03 0.04 0.05 NA NA | p[sapply(p=0.05,

Re: [R] ggplot scale_x_date : to plot quarterly scale?

2014-10-14 Thread Franklin Mairura
Dear jpm, have attached a simpler example, hope this helps. Regards. plot(0:100,pch=,xaxt=n,) axis(1, at=1,lab=c(abcd),cex.axis=1,font=4) axis(1, at=20,lab=c(efgh),cex.axis=1,font=4) axis(1, at=60,lab=c(ijkl),cex.axis=1,font=4) On Tuesday, October 14, 2014 11:48 AM, Franklin Mairura

Re: [R] evaluate NA to FALSE instead of NA?

2014-10-14 Thread Sven E. Templer
use: which(p=.05) this will not yield logical, but integer indices without NA On 14 October 2014 11:51, Rainer M Krug rai...@krugs.de wrote: Hi I want to evaluate NA and NaN to FALSE (for indexing) so I would like to have the result as indicated here: , | p - c(1:10/100, NA, NaN) |

Re: [R] evaluate NA to FALSE instead of NA?

2014-10-14 Thread Pascal Oettli
Hi Rainer, As complete.cases() does? p - c(1:10/100, NA, NaN) complete.cases(p) [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE Regards, Pascal On Tue, Oct 14, 2014 at 6:51 PM, Rainer M Krug rai...@krugs.de wrote: Hi I want to evaluate NA and NaN to FALSE (for

Re: [R] evaluate NA to FALSE instead of NA?

2014-10-14 Thread Joshua Wiley
Hi, Perhaps still not as short as you want, but I normally use which(): p - c(1:10/100, NA, NaN) p[which(p = .05)] [1] 0.01 0.02 0.03 0.04 0.05 Cheers, Josh On Tue, Oct 14, 2014 at 8:51 PM, Rainer M Krug rai...@krugs.de wrote: Hi I want to evaluate NA and NaN to FALSE (for indexing) so

[R] SOLVED: evaluate NA to FALSE instead of NA?

2014-10-14 Thread Rainer M Krug
Thanks Joshua and Sven - I completely forgot about which() . Pascal - I never new about complete.cases - interesting function. Thanks, Rainer Rainer M Krug rai...@krugs.de writes: Hi I want to evaluate NA and NaN to FALSE (for indexing) so I would like to have the result as indicated

Re: [R] ggplot - start axis label with superscript

2014-10-14 Thread S Ellison
I'm stuck trying to begin an axis label in ggplot with a superscript. For a crude work-round, you could try ggplot(mydata) + aes(x = x, y = y) + geom_line() + ylab(expression(paste(' '^{14}, C, sep = ))) S Ellison ***

Re: [R] SOLVED: evaluate NA to FALSE instead of NA?

2014-10-14 Thread S Ellison
Thanks Joshua and Sven - I completely forgot about which() . Also na.omit(p[p=0.05]) #and p[p=0.05 !is.na(p)] S. *** This email and any attachments are confidential. Any use...{{dropped:8}}

Re: [R] how to ajust y-axis values in plot() ?

2014-10-14 Thread Rui Barradas
Hello, Use the argument ylim. See ?par instead of plot. plot(11:20, ylim = c(0, 40)) abline(h=40) Hope this helps, Rui Barradas Em 14-10-2014 10:33, PO SU escreveu: Dear helpeRs, I want to plot( 11:20 ) in a plot. if i just type the code above, the y value will be from 11 to 20, now

Re: [R] how to ajust y-axis values in plot() ?

2014-10-14 Thread S Ellison
  I want to plot( 11:20 ) in a plot.  if i just type the code above, the y value  will be from 11 to 20, now i want the value from a given range like  0 to 40, how can i do it? See the ylim= argument to plot.default; eg plot(x, y, ylim=c(0,40)) Also look at ?par and note that plot() and

Re: [R] ggplot scale_x_date : to plot quarterly scale?

2014-10-14 Thread Gabor Grothendieck
On Tue, Oct 14, 2014 at 3:36 AM, jpm miao miao...@gmail.com wrote: Hi, I am plotting time series by ggplot2, but I believe that my question applies to other plotting tool as well. I want to make my x-axis the quarterly scale, e.g: 2000Q1 2000Q2. However, scale_x_date and

Re: [R] To build a new Df from 2 Df

2014-10-14 Thread David.Kaethner
Hello, here's a draft of a solution. I hope it's not overly complicated. # find all possible combinations combi - expand.grid(Dem$Nom, Rap$Nom); names(combi) - c(Dem, Rap) # we need the corresponding departments and units combi$DemDep - apply(combi, 1, function(x) Dem$Departement[x[1] ==

Re: [R] Storing vectors as vectors in a list without losing each individual vector

2014-10-14 Thread David L Carlson
If you just want to plot the various combinations of a set of variables/columns, you don't need a list, just another data frame/matrix with the combinations of the column numbers you want to plot: df - matrix(rnorm(100), 10, 10) df - data.frame(df) comb - expand.grid(7:10, 7:10) comb -

[R] grep won't work finding one column

2014-10-14 Thread Kate Ignatius
I'm having an issue with grep: I have numerous columns that end with .at... when I use grep like so: df[,grep(.at,colnames(df))] it works fine. When I have one column that ends with .at, it does not work. Why is that? As this is loop with varying number of columns ending in .at I would like

Re: [R] grep won't work finding one column

2014-10-14 Thread John McKown
On Tue, Oct 14, 2014 at 9:23 AM, Kate Ignatius kate.ignat...@gmail.com wrote: I'm having an issue with grep: I have numerous columns that end with .at... when I use grep like so: df[,grep(.at,colnames(df))] it works fine. When I have one column that ends with .at, it does not work. Why

Re: [R] grep won't work finding one column

2014-10-14 Thread Kate Ignatius
For example, DF will usually have numerous columns with sample1.at sample1.dp sample1.fg sample2.at sample2.dp sample2.fg and so on I'm running this code in R as part of a shell script which runs over several different file sizes so sometimes it will come across a file with one sample in it:

Re: [R] grep won't work finding one column

2014-10-14 Thread Jeff Newmiller
Your question is missing a reproducible example, and you don't say how it does not work, so we cannot tell what is going on. Two things do come to mind, though. A) Data frame subsets with only one column by default return a vector, which is a different type of object than a single-column data

[R] package installation failure virtualisation environment

2014-10-14 Thread rl
Subscribers, A version of R is installed in a virtual machine, which has complete internet access via the host. The following error occurs when a package is selected: install.packages([packagename], dependencies=TRUE) --- Please select a CRAN mirror for use in this session --- Killed The

Re: [R] grep won't work finding one column

2014-10-14 Thread Ivan Calandra
Shouldn't it be grep(\\.at$,colnames(df)) with double back slash? Ivan -- Ivan Calandra University of Reims Champagne-Ardenne GEGENA² - EA 3795 CREA - 2 esplanade Roland Garros 51100 Reims, France +33(0)3 26 77 36 89 ivan.calan...@univ-reims.fr https://www.researchgate.net/profile/Ivan_Calandra

Re: [R] grep won't work finding one column

2014-10-14 Thread John McKown
AT and at are not the same. If you want an case insensitive compare for the characters at you need the ignore.case=TRUE added. E.g.: df[,grep(.at,colnames(df),ignore.case=TRUE) That should match the column name you gave. Which does not match your initial description which said ending with .at.

Re: [R] grep won't work finding one column

2014-10-14 Thread John McKown
You're right. I don't use regexps in R very much. In most other languages, a single \ is needed. The R parser is different and I forgot. Thanks for the heads up. On Tue, Oct 14, 2014 at 10:01 AM, Ivan Calandra ivan.calan...@univ-reims.fr wrote: Shouldn't it be grep(\\.at$,colnames(df)) with

Re: [R] grep won't work finding one column

2014-10-14 Thread Kate Ignatius
In the sense - it does not work. it works when there are 50 samples in the file, but it does not work when there is one. The usual headings are: sample1.at sample1.dp sample1.fg sample2.at sample2.dp sample2.fg and so on to a max of sample50.at sample50.dp sample50.fg using this greps out

Re: [R] package installation failure virtualisation environment

2014-10-14 Thread Sven E. Templer
Prevent graphic menues with: options(menu.graphics = FALSE) or and define repositories: options(repos = c(CRAN = http://cran.r-project.org;)) On 14 October 2014 17:00, r...@openmailbox.org wrote: Subscribers, A version of R is installed in a virtual machine, which has complete internet

[R] Help with functions - printing a variables name

2014-10-14 Thread Evan Kransdorf
Hello Everyone, I was wondering if someone could help me implement a function in R. I want to pass a vector x to my function, peform some math, then output the data. However, I want the output for x to be the *name of the vector I am *using as input. For example, data-c(1,5,10)

[R] apply function to multiple list arguments

2014-10-14 Thread Carlos Nasher
Hi R helpers, I'm struggling how to apply a function to multiple lists. My function uses a dataframe, a list of parameters and a fixed value as arguments. Now I want to apply that function to several dataframes contained in list, with several lists of parameters (also contained in a list) and the

Re: [R] Help with functions - printing a variables name

2014-10-14 Thread Rui Barradas
Hello, Maybe something like data-c(1,5,10) func1-function(x) { nm - deparse(substitute(x)) y-x^2 z-x^3 out-data.frame(nm,y,z) return(out) } #function func1(data[1]) Hope this helps, Rui Barradas Em 14-10-2014 19:12, Evan Kransdorf escreveu: Hello Everyone, I was

Re: [R] apply function to multiple list arguments

2014-10-14 Thread Rui Barradas
Hello, Have you tried mapply(f, list_df, list_par, MoreArgs = list(z = fix), SIMPLIFY = FALSE) ? Hope this helps, Rui Barradas Em 14-10-2014 19:42, Carlos Nasher escreveu: Hi R helpers, I'm struggling how to apply a function to multiple lists. My function uses a dataframe, a list of

Re: [R] grep won't work finding one column

2014-10-14 Thread Rolf Turner
On 15/10/14 04:09, Kate Ignatius wrote: In the sense - it does not work. it works when there are 50 samples in the file, but it does not work when there is one. The usual headings are: sample1.at sample1.dp sample1.fg sample2.at sample2.dp sample2.fg and so on to a max of sample50.at

[R] Ternary Plots Do Not Display Ellipses in PDF

2014-10-14 Thread Rich Shepard
A rather strange situation here and I've not found the source of the problem. The point is to print a ternary plot matrix of compositional data with ellipses enclosing 95% of the variance in each plot. The ellipses display on the monitor, dev = x11cairo, but not when sent directly to a file,

Re: [R] Ternary Plots Do Not Display Ellipses in PDF

2014-10-14 Thread Rolf Turner
In all probability this is FAQ 7.22. I.e. use: print(ellipses(mean=mn, var=vr, r=r, steps=72, thinRatio=NULL, aspanel=FALSE,col='red', lwd=2)) cheers, Rolf Turner P. S. See also fortune(123). R. T. On 15/10/14 11:00, Rich Shepard wrote: A rather strange situation here

Re: [R] Ternary Plots Do Not Display Ellipses in PDF

2014-10-14 Thread Rich Shepard
On Wed, 15 Oct 2014, Rolf Turner wrote: In all probability this is FAQ 7.22. I.e. use: print(ellipses(mean=mn, var=vr, r=r, steps=72, thinRatio=NULL, aspanel=FALSE,col='red', lwd=2)) Rolf, Thank you. Didn't occur to me to look in the FAQ for this issue. P. S. See also

[R] r-help@r-project.org

2014-10-14 Thread Rolf Turner
[I sent this email to Rich and to the list after some private communication with Rich. However it got held up for being too big, presumably because of the pdf attachment. So I am re-sending it to the list *without* the attachment.] I resorted to actually trying the expedient of installing