Re: [R] To transform a vector

2013-12-08 Thread Arnaud Michel
Thank you Michel Le 09/12/2013 08:14, Berend Hasselman a écrit : On 09-12-2013, at 08:04, Arnaud Michel wrote: Dear R Users I have the vector X <- c( 6 , 4 ,12 , 3) I would like to build a new vector by to transform it into Y <- c(rep(X[1], X[1]), rep(X[2], X[2]), rep(X[3], X[3]), rep(X[4],

Re: [R] To transform a vector

2013-12-08 Thread Pascal Oettli
Hello, Are you looking for Y <- rep(X, X) ? Regards, Pascal On 9 December 2013 16:04, Arnaud Michel wrote: > Dear R Users > > I have the vector > X <- c( 6 , 4 ,12 , 3) > > I would like to build a new vector by to transform it into > Y <- c(rep(X[1], X[1]), rep(X[2], X[2]), rep(X[3], X[3]), rep

Re: [R] To transform a vector

2013-12-08 Thread Berend Hasselman
On 09-12-2013, at 08:04, Arnaud Michel wrote: > Dear R Users > > I have the vector > X <- c( 6 , 4 ,12 , 3) > > I would like to build a new vector by to transform it into > Y <- c(rep(X[1], X[1]), rep(X[2], X[2]), rep(X[3], X[3]), rep(X[4], X[4])) > > Have you a more elegant answer ? Have a

[R] To transform a vector

2013-12-08 Thread Arnaud Michel
Dear R Users I have the vector X <- c( 6 , 4 ,12 , 3) I would like to build a new vector by to transform it into Y <- c(rep(X[1], X[1]), rep(X[2], X[2]), rep(X[3], X[3]), rep(X[4], X[4])) Have you a more elegant answer ? PS : Sorry for this basic question -- Michel ARNAUD Chargé de mission au

Re: [R] wmf screen resolution problem!!!

2013-12-08 Thread S Ellison
> From:Venkat Karthik [tvkarthi...@gmail.com] > We are trying to generate a wmf image with fixed pixels, fixed height & > fixed width. But the problem we are facing is that when the same code is > run on a different screen resolution the dimensions of the i

Re: [R] Problems updating packages

2013-12-08 Thread Jeff Newmiller
I recommend using a personal library directory unless you really are an administrator of a computer that multiple users of R use (very unusual for Windows). The install program offers you the opportunity to create an R/win-library/ directory. If you do this and make a habit of never updating "As

Re: [R] rJava problems

2013-12-08 Thread Xiaogang Su
I encountered the same problem a couple of days ago. I found simply re-installing JASA (the 64bit one) would straighten out the Registry entries: http://java.com/en/download/manual.jsp = Xiaogang Su, Ph.D. Associate Professor Department of Mathematical Sciences Univers

Re: [R] How to evaluate sequence of strings like this

2013-12-08 Thread kingsly
Thank you.  It is working well. On Sunday, 8 December 2013 11:13 PM, arun kirshna [via R] wrote: Hi, You could do without "eval(parse(.." mydat <- data.frame(Centercode=letters[1:5],FSUSN=letters[6:10],Round=letters[11:15],stringsAsFactors=FALSE) mydat1 <- paste(mydat$Centercode, myd

Re: [R] rJava problems

2013-12-08 Thread Tolga Uzuner
Thank you Rob. I used to have the 64-bit R also installed, but removed it and did not reinstall it. I also cleared out all rJava.dll files on my computer before reinstalling R fresh. I am running R through Rgui, not Rstudio. I will post RVersion data later once I return to my PC, apologies. Se

Re: [R] Problems updating packages

2013-12-08 Thread Uwe Ligges
On 08.12.2013 19:12, Tolga Uzuner wrote: OK thanks. The odd thing is, this just started happening. And I am an Admin on my machine. Or I think I am...hmm, let me check, maybe I did something to my own privileges recently by mistake. Right click R and "start as Administrator"? Best, Uwe L

Re: [R] Problems updating packages

2013-12-08 Thread Tolga Uzuner
OK thanks. The odd thing is, this just started happening. And I am an Admin on my machine. Or I think I am...hmm, let me check, maybe I did something to my own privileges recently by mistake. Sent from my iPhone > On 8 Dec 2013, at 01:07 pm, Uwe Ligges > wrote: > > > >> On 08.12.2013 16:3

Re: [R] Problems updating packages

2013-12-08 Thread Uwe Ligges
On 08.12.2013 16:37, Tolga Uzuner wrote: Dear R Users Ive just uninstalled R and reinstalled from scratch. I then hit Update Packages and get the following message: > update.packages(ask='graphics',checkBuilt=TRUE) --- Please select a CRAN mirror for use in this session --- Warning: package '

Re: [R] subest a data set on two conditions

2013-12-08 Thread arun
Hi, Try: #Eitherindx <- which(df$pvalue <0.05)  indx1 <- sort(c(indx,ifelse(!indx%%2,indx-1,indx+1))) df[indx1,] #or  df[!!with(df,ave(pvalue,((seq-1)%/%2)+1,FUN= function(x) any(x <0.05))),] A.K. How can I subset the example data set based on pvalue ( <0.05) and also include the set of each pa

Re: [R] rJava problems

2013-12-08 Thread Robert Baer
You don't really provide enough information like R.Version() but my guess is that you are running 64-bit R either directly or through R Studio but that you have only 32-bit Java installed. I am doing fine on Windows with Java 7 update 45 but had some 64-bit run issues with only Java 7 updat

[R] R, RStudio, Rcpp Appreciation

2013-12-08 Thread Thell Fowler
Many times we [devs & users] get into a zone and go on extended binges into our own projects neglecting the niceties of society. Then, while either still on a particular path or even when we reach our destination, we don't directly state our appreciation for those special individuals whose project

Re: [R] rJava problems

2013-12-08 Thread patrick . toche
same problem I'm having... https://groups.google.com/forum/#!topic/shiny-discuss/ivJzaaUIZcQ On Sunday, December 8, 2013 10:55:02 PM UTC+8, neo wrote: > > A small follow-on to this: I uninstalled the package, restarted my > machine, and reinstalled the package. Now, when I try and load the >

Re: [R] How to evaluate sequence of strings like this

2013-12-08 Thread arun
Hi, You could do without "eval(parse(.." mydat <- data.frame(Centercode=letters[1:5],FSUSN=letters[6:10],Round=letters[11:15],stringsAsFactors=FALSE) mydat1 <- paste(mydat$Centercode, mydat$FSUSN,mydat$Round,sep="")  mydat2 <- as.character(interaction(mydat,sep=""))  identical(mydat1,mydat2) #[1]

[R] growth curve estimation

2013-12-08 Thread Dániel Kehl
Dear Community, I am struggling with a growth curve estimation problem. It is a classic BMI change with age calculation. I am not an expert of this field but have some statistical experience in other fields. Of course I started reading classical papers related to the topic and understood the co

[R] Problems updating packages

2013-12-08 Thread Tolga Uzuner
Dear R Users Ive just uninstalled R and reinstalled from scratch. I then hit Update Packages and get the following message: > update.packages(ask='graphics',checkBuilt=TRUE) --- Please select a CRAN mirror for use in this session --- Warning: package 'foreign' in library 'C:/Program Files/R/R-

Re: [R] rJava problems

2013-12-08 Thread Tolga Uzuner
A small follow-on to this: I uninstalled the package, restarted my machine, and reinstalled the package. Now, when I try and load the package, I get an entirely different error message: > library("rJava") Error : .onLoad failed in loadNamespace() for 'rJava', details: call: inDL(x, as.logical

Re: [R] How to evaluate sequence of strings like this

2013-12-08 Thread Peter Alspach
Tena koe Try apply(mydat, 1, paste, collapse='') HTH Peter Alspach From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of kingsly [ecoking...@yahoo.co.in] Sent: Monday, December 09, 2013 12:22 AM To: r-help@r-project.org Sub

Re: [R] Why daisy() in cluster library failed to exclude NA when computing dissimilarity

2013-12-08 Thread Sarah Goslee
Hi, Please don't cross-post. It's also not necessary to post more than once to the same list if you don't get an immediate response, especially if you've posted on the weekend. On Sunday, December 8, 2013, Gundala Viswanath wrote: > Hi, > > > According to daisy function from cluster documentatio

[R] rJava problems

2013-12-08 Thread Tolga Uzuner
Dear R Users Have run into a problem with the rJava package recently. I do not seem to be able to load the package. I am on R 3.0.2 and updated the rJava package this morning from the Pennsylvania mirrors. I get the following error: package ‘mnormt’ successfully unpacked and MD5 sums che

[R] How to evaluate sequence of strings like this

2013-12-08 Thread kingsly
Hello Dear R community,  This is my problem.  I have a data set (dataframe) called "mydat". It consist of 3 numerical variable.  They are Centrecode, FSUSN and Round. I want to create unique ID by combining these 3 variables. Follwing commands gives me what I need. mydat1 <- paste(mydat$Cen