Re: [R] Error in file.exists(swf.file) : invalid 'file' argument

2014-07-08 Thread David Winsemius
On Jul 8, 2014, at 5:49 PM, Jeff Newmiller wrote: > Code is corrupted. Please post in plain text as the Posting Guide indicates > is expected of you. To explain a bit further Making text BOLD in formatted email adds extraneous asterisks in what some of us see in a plain text mail client. W

Re: [R] reorder a list

2014-07-08 Thread arun
You may also try: library(reshape2)  A2 <- melt(A1) split(A2[,2],A2[,1]) A.K. On Tuesday, July 8, 2014 12:57 PM, Lorenzo Alfieri wrote: Hi, I'm trying to find a way to reorder the elements of a list. Let's say I have a list like this: A1<-list(c(1:4),c(2,4,5),23,c(4,5,13)) > A1 [[1]] [1] 1 2

Re: [R] Error in file.exists(swf.file) : invalid 'file' argument

2014-07-08 Thread Jeff Newmiller
Code is corrupted. Please post in plain text as the Posting Guide indicates is expected of you. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

[R] Error in file.exists(swf.file) : invalid 'file' argument

2014-07-08 Thread Cheryl Johnson
*I am receiving the error message “*Error in file.exists(swf.file) : invalid 'file' argument*” from my swf2html command. In addition, there is a command that says the Flash file was created: “*Flash has been created at: C:\Users\CHERYL\AppData\Local\Temp\Rtmp6n6FXw\file2.swf*”* *Below is t

[R] unable to install rJava in centos R

2014-07-08 Thread Harish Nair
Iam unable to install rJava in centos R, its the base to install rhdfs. Please help and look at the output i got while installing rJava. > install.packages( c("rJava")) Installing package into ‘/home/training/R/x86_64-redhat-linux-gnu-library/3.1’ (as ‘lib’ is unspecified) --- Please select

Re: [R] Seprate last name and first name into two columns

2014-07-08 Thread farnoosh sheikhi
It actually worked perfectly. Thank you so much. I always learn a lot from you:).   Farnoosh On Monday, July 7, 2014 6:51 PM, arun wrote: Not sure this helps as you provided only very little info. library(stringr) str1 <- c("TE MA CRUZ  ABEL","JOSE  AN    ANDRA","AL    MIGUEL","

Re: [R] [R-es] Consulta paquetización con versión R 3.1.0

2014-07-08 Thread Eva Prieto Castro
Thank you, Frede. People like you make me feel a very good person. I am from Spain and my English is not good; moreover I did not go to school the day of insults lesson, so fortunately I do not understand most of your words in this mail. Conclusion: Ignorance is bliss (in this case...) I am sure

Re: [R] reorder a list

2014-07-08 Thread William Dunlap
f <- function (x) { lengths <- vapply(x, FUN = length, FUN.VALUE = 0L) split(rep(seq_along(x), lengths), unlist(x, use.names = FALSE)) } f(A1) # gives about what you want (has, e.g., name 23, not position 23, in output) Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Jul 8, 2014 at 9

Re: [R] reorder a list

2014-07-08 Thread Greg Snow
Oops, I combined 2 ideas (by chance it still worked), the last line should have been one of the following: split( rep( seq_along(A1), sapply(A1,length) ), tmp ) split( as.numeric(sub('\\..*$','',names(tmp))), tmp ) On Tue, Jul 8, 2014 at 11:41 AM, Greg Snow <538...@gmail.com> wrote: > Here is an

Re: [R] reorder a list

2014-07-08 Thread Greg Snow
Here is another approach inspired by Jim's answer: > names(A1) <- paste0(seq_along(A1),'.') > tmp <- unlist(A1) > split( rep( seq_along(A1), sapply(A1,length) ), > as.numeric(sub('\\..+$','',tmp)) ) $`1` [1] 1 $`2` [1] 1 2 $`3` [1] 1 $`4` [1] 1 2 4 $`5` [1] 2 4 $`13` [1] 4 $`23` [1] 3 On T

Re: [R] reorder a list

2014-07-08 Thread Greg Snow
And here is another approach: > out <- vector('list',length(unique(unlist(A1 > names(out) <- sort(unique(unlist(A1))) > for( i in seq_along(A1) ) { + for( j in as.character(A1[[i]]) ) { + out[[j]] <- c(out[[j]], i) + } + } > > out $`1` [1] 1 $`2` [1] 1 2 $`3` [1] 1 $`4` [1] 1 2 4 $`5` [1]

Re: [R] [R-es] Consulta paquetización con versión R 3.1.0

2014-07-08 Thread Frede Aakmann Tøgersen
Congratulations Eva I have been following this thread loosely. Well in the sense that I really didn't understand what was going on but hopefully thinking that I could learn something from it. Your approach to your particular setup didn't pay any attention to the heed by Duncan. So you hard he

Re: [R] reorder a list

2014-07-08 Thread jim holtman
Try this: > A1<-list(c(1:4),c(2,4,5),23,c(4,5,13)) > > # unlist with the list number > result <- do.call(rbind, sapply(seq(length(A1)), function(.indx){ + cbind(value = A1[[.indx]], index = .indx) + })) > > ans <- split(result[, 2], result[, 1]) > ans $`1` [1] 1 $`2` [1] 1 2 $`3` [1] 1 $`4`

Re: [R] reorder a list

2014-07-08 Thread Greg Snow
Here is one approach that gives almost the same answer as your example: > A1<-list(c(1:4),c(2,4,5),23,c(4,5,13)) > > A2 <- sort(unique(unlist(A1))) > names(A2) <- A2 > sapply(A2, function(x) which( sapply(A1, function(y) x %in% y) ), + simplify=FALSE, USE.NAMES=TRUE ) $`1` [1] 1 $`2` [1] 1 2 $`3

[R] reorder a list

2014-07-08 Thread Lorenzo Alfieri
Hi, I'm trying to find a way to reorder the elements of a list. Let's say I have a list like this: A1<-list(c(1:4),c(2,4,5),23,c(4,5,13)) > A1 [[1]] [1] 1 2 3 4 [[2]] [1] 2 4 5 [[3]] [1] 23 [[4]] [1] 4 5 13 All the elements included in it are values, while each sublist is a time index Now, I

Re: [R] [R-es] Consulta paquetización con versión R 3.1.0

2014-07-08 Thread Eva Prieto Castro
Solved!! I removed this line: .ChrL.env$bStarted <- FALSE And run ok!! I supose the method let the fact of initializing data structure, but not the fact of assign. The basic example runs ok. Now I have to test all the project. Thanks!! Eva 2014-07-08 13:02 GMT+02:00 Eva Prieto Castro :

Re: [R] PCA with a lot of zeros

2014-07-08 Thread Martyn Byng
Hi, Not sure if these are relevant as they have been on my "must look at" list for some time and I've not managed to get around to it ... http://www.cmap.polytechnique.fr/~aspremon/PDF/SPCAhandbookSV.pdf http://www2.imm.dtu.dk/projects/manifold/Papers/sparsepc.pdf Martyn -Original Message-

Re: [R] [R-es] Consulta paquetización con versión R 3.1.0

2014-07-08 Thread Eva Prieto Castro
Duncan, Not always the .ChrL.env is non-existent, but also the functions in the package (when I use the package) do not find it. If you ChrL.Start it does not find the environment created. The situation is like (at all effects) the environment created was beeing obviated by the package. Eva 20

Re: [R] [R-es] Consulta paquetización con versión R 3.1.0

2014-07-08 Thread Eva Prieto Castro
Duncan, I don't export it in the sense that I dont't include it in namespaces as "export()" because it is not a function. Simply I include it in ChrL-internal.r, as follows: .ChrL.env <- new.env() I always dit it in this way and it run (simple past!) ok, but now it does not run and I don't

Re: [R] [R-es] Consulta paquetización con versión R 3.1.0

2014-07-08 Thread Eva Prieto Castro
Hi again, I tested again without dot (i.e. ChrL.env and not .ChrL.env) and the problem exists too. I don't have any other idea to test. Regards. Eva 2014-07-08 7:00 GMT+02:00 Eva Prieto Castro : > Moreover, with ls(all.names=TRUE) it should appear and it does not. > > Eva > > > 2014-07-08 6:

[R] Formating cell with xlsx package

2014-07-08 Thread Soeren Groettrup
Hello everybody, I am trying to format an excel file with R, which seems to me a quite hideous task. However, I am using the 'xlsx' package, and I want to change the color of the bottom line without erasing the existing style of a cell. I ran the following code, but it gives me an error and I

Re: [R] PCA with a lot of zeros

2014-07-08 Thread Jim Silverton
Hello all, I was wondering if R has some routine that can handle PCA with a lot of zeros. I have fourteen variables - these variables represent angles...so there are some negative and some positive angles. Histograms appear sparse - in the sense that there are gaps. Any ideas or papers would be gre

[R] Survival Analysis with an Historical Control

2014-07-08 Thread Paul Miller
Hello All, I'm trying to figure out how to perform a survival analysis with an historical control. I've spent some time looking online and in my boooks but haven't found much showing how to do this. Was wondering if there is a R package that can do it, or if there are resources somewhere that s

[R] Extrapolation of rarefaction curve

2014-07-08 Thread gktahon
Hi all, I used R (vegan package) to make rarefaction curves and I calculated the Chao index for each curve. However, the plateau is far from reached. What I want to do now is the following: Based on the Chao index, I want to extrapolate the curve so I get an x-value which gives me an estimation of

Re: [R] eclat problem

2014-07-08 Thread Alvaro Flores
Thanks Uwe, i'll try to contact with them. I was expecting someone with the same problem here! Kind regards. Alvaro. -Mensaje original- De: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] Enviado el: martes, 08 de julio de 2014 8:29 Para: Alvaro Flores; r-help@r-project.org Asu

Re: [R] eclat problem

2014-07-08 Thread Uwe Ligges
This is something for the authors of that package... Best, Uwe Ligges On 07.07.2014 22:56, Alvaro Flores wrote: I'm working with arule packages and I'm constantly trying to mine frequent itemsets in different datasets. But recently R kept returning the same error message : Error in ec

Re: [R] writing matrices of different rows in a file

2014-07-08 Thread Uwe Ligges
On 07.07.2014 10:05, carol white wrote: Hi, What is the best way of writing of matrices of different rows in a file? Should the matrices with the same number of rows be written first and then, empty columns for the matrices with a smaller number of rows followed by the matrices with a larger

Re: [R] (PLM- package) Residual-Plotting and missing Values

2014-07-08 Thread Uwe Ligges
If you havn't got a response yet, ask the package authors. Best, Uwe Ligges On 01.07.2014 16:21, Katharina Mersmann wrote: Dear R-Community, I tried plotting the residuals of an FE-model estimated via plm . And detected that there are no residuals in the plot for the last two countries. I

Re: [R] R help

2014-07-08 Thread Uwe Ligges
On 01.07.2014 17:18, Andre Weeks wrote: To whom it may concern: I installed R 3.1 and I get this. In normalizePath(path.expand(path), winslash, mustWork) : path[1]="\\network\users\aweeks\My Documents/R/win-library/3.1": Access is denied Is there any way to change this path? I have looked

Re: [R] Predictions from "coxph" or "cph" objects

2014-07-08 Thread Göran Broström
On 2014-07-06 11:17, Göran Broström wrote: On 2014-07-06 10:48, Göran Broström wrote: David and Axel, I have two comments to your discussion: (i) The area under the survival curve is equal to the mean of the distribution, so the estimate of the mean should be the sum of the areas of the rectan

Re: [R] sort order of a character sequence is different on windose and linux (linux result)

2014-07-08 Thread Witold E Wolski
>From my reading of http://r.789695.n4.nabble.com/internal-string-comparison-Scollate-td4687584.html they have good arguments to ask for Scollate whatever it is in the R public API. And from my point of view R would benefit from a tight integration of data.table. Without data.table R is very impr

Re: [R] Fwd: Need some assistance in plotting distributions

2014-07-08 Thread Frede Aakmann Tøgersen
Well plot(density(a$frequency), col = "blue") lines(density(b$frequency), col = "green") Where a is as Jim defined it and b similar from the other data file. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service

Re: [R] [R-es] Consulta paquetización con versión R 3.1.0

2014-07-08 Thread Duncan Murdoch
On 08/07/2014, 12:56 AM, Eva Prieto Castro wrote: > Duncan, > > Yes, it has exactly that line. > > I know it does not exists because of this: > >> library("ChrL") >> .ChrL.env > Error: objeto '.ChrL.env' no encontrado That says that you did not export it. It is only visible from code within th

Re: [R] Fwd: Need some assistance in plotting distributions

2014-07-08 Thread Vivek Das
Dear Jim, Thank you for replying to my query. Both the files contains tumor mutational frequencies. The LG_freq contains the entire mutational landscape and the HIPS2_freq contains mutational frequency of one clone. I want to see how both the frequency curve are behaving in one plot. Is that possi

Re: [R] Fwd: Need some assistance in plotting distributions

2014-07-08 Thread jim holtman
Have you tried the density function: > a <- read.table('/users/jim/downloads/LG_freq.txt',header = TRUE) > str(a) 'data.frame': 669 obs. of 2 variables: $ Position : Factor w/ 669 levels "chr1_103381212",..: 308 463 458 160 393 457 165 464 3 467 ... $ frequency: num 75 62.5 50 48.9 47.1 ...

[R] Fwd: Need some assistance in plotting distributions

2014-07-08 Thread Vivek Das
Dear Users, I need some assistance in plotting some distribution enrichments, like I have files with some frequency values, now I want to plot plot the distribution of those frequencies for one sample and then on the same plot I want to plot the next samples where the frequency comes from another

Re: [R] A custom legend for three data frames in one plot

2014-07-08 Thread Artur Rataj
I have yet one problem, though -- with making the shapes solid. Neither "solid circle" nor "filled circle" works: points(sandwich3,cex=sandwich3$p*3,ph=19,col="gray") points(sandwich3,cex=sandwich3$p*3,ph=21,col="gray",bg="gray") ​although "solid circle" works in the legend. Cheers, Artur â€

Re: [R] A custom legend for three data frames in one plot

2014-07-08 Thread Artur Rataj
Thanks Jim. It works almost exactly like I wanted, I only had to make shape size variable: points(sandwich1,cex=sandwich1$p) Best regards, Artur [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

Re: [R] Plot does not show in R

2014-07-08 Thread gktahon
Works like a charm, thank you very much for your help! Logo_LM-UGent Guillaume Tahon (PhD Student) Ghent University, Faculty of Sciences Laboratory of Microbiology, K.L. Ledeganckstraat 35 B-9000 Gent T +32 (0)9 264 5134 F +32 (0)9 264 5092 E-mail: guill