Re: [R] Help modifying "aheatmap" or find a new heatmap package

2016-09-17 Thread Ulrik Stervbo
I am a huge fan of pheatmap and use it for all my heatmaps. Alternatively you can use ggplot2 and geom_tile Hth Ulrik Jim Lemon schrieb am So., 18. Sep. 2016 01:35: > Hi Michael, > Maybe color2D.matplot (plotrix). Have a look at the examples. > > Jim > > > On Sat, Sep

Re: [R] Help modifying "aheatmap" or find a new heatmap package

2016-09-17 Thread Jim Lemon
Hi Michael, Maybe color2D.matplot (plotrix). Have a look at the examples. Jim On Sat, Sep 17, 2016 at 4:10 AM, Michael Young wrote: > I am currently using "aheatmap" which is generating heatmaps based on > Pearson correlation. My data consists of RPKM values for genes

Re: [R] separate commands by semicolon

2016-09-17 Thread Peter Langfelder
On Sat, Sep 17, 2016 at 2:12 PM, David Winsemius wrote: > > > Not entirely clear. If you were intending to just get character output then > you could just use: > > strsplit(txt, ";") > > If you wanted parsing to an R expression to occur you could pass through > sapply

Re: [R] separate commands by semicolon

2016-09-17 Thread David Winsemius
> On Sep 17, 2016, at 8:28 AM, Adrian Dușa wrote: > > There is one minor problem with parse(): if any of the individual commands > has an error, the entire text will be parsed in a single error. > > For example, in a normal R console: > >> print(2); ls( > [1] 2 > + > >

Re: [R] Accelerating binRead

2016-09-17 Thread jim holtman
Here is an example of how to do it: x <- 1:10 # integer values xf <- seq(1.0, 2, by = 0.1) # floating point setwd("d:/temp") # create file to write to output <- file('integer.bin', 'wb') writeBin(x, output) # write integer writeBin(xf, output) # write reals close(output) library(pack)

Re: [R] Accelerating binRead

2016-09-17 Thread jim holtman
I would also suggest that you take a look at the 'pack' package which can convert the binary input to the value you want. Part of your performance problems might be all the short reads that you are doing. Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me

Re: [R] separate commands by semicolon

2016-09-17 Thread Adrian Dușa
There is one minor problem with parse(): if any of the individual commands has an error, the entire text will be parsed in a single error. For example, in a normal R console: > print(2); ls( [1] 2 + So first print(2) is executed, and only after the console expects the user to continue the

Re: [R] Accelerating binRead

2016-09-17 Thread Bob Rudis
You should probably pick a forum — here or SO : http://stackoverflow.com/questions/39547398/faster-reading-of-binary-files-in-r : - vs cross-post to all of them. On Sat, Sep 17, 2016 at 11:04 AM, Ismail SEZEN wrote: > I noticed same issue but didnt care much :) > > On

Re: [R] Accelerating binRead

2016-09-17 Thread Ismail SEZEN
I noticed same issue but didnt care much :) On Sat, Sep 17, 2016, 18:01 jim holtman wrote: > Your example was not reproducible. Also how do you "break" out of the > "while" loop? > > > Jim Holtman > Data Munger Guru > > What is the problem that you are trying to solve? >

Re: [R] Accelerating binRead

2016-09-17 Thread jim holtman
Your example was not reproducible. Also how do you "break" out of the "while" loop? Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Sat, Sep 17, 2016 at 8:05 AM, Philippe de Rochambeau

Re: [R] Accelerating binRead

2016-09-17 Thread Jeff Newmiller
Appending to lists is only very slightly more efficient than incremental rbinding. Ideally you can figure out an upper bound for number of records, preallocate a data frame of that size, modify each element as you go in-place, and shrink the data frame once at the end as needed. If you cannot

Re: [R] glmnet vignette question

2016-09-17 Thread Bert Gunter
You seem to be mainly asking for help with statistical methodology, which is generally off topic for this list, which is about help with R programming. I suggest you study the references given in the vignette/package and/or post to a statistical list like stats.stackexchange.com instead. Cheers,

[R] Portfolio Optimization

2016-09-17 Thread Abhinaba Roy
Hi, Has anybody worked on portfolio optimization using Genetic Algorithm in R? Could you please share the code and some references on this topic? Really appreciate your help. Thanks, Abhinaba [[alternative HTML version deleted]] __

Re: [R] Accelerating binRead

2016-09-17 Thread Ismail SEZEN
I suspect that rbind is responsible. Use list and append instead of rbind. At the end, combine elements of list by do.call(“rbind”, list). > On 17 Sep 2016, at 15:05, Philippe de Rochambeau wrote: > > Hello, > the following function, which stores numeric values extracted from a

[R] Accelerating binRead

2016-09-17 Thread Philippe de Rochambeau
Hello, the following function, which stores numeric values extracted from a binary file, into an R matrix, is very slow, especially when the said file is several MB in size. Should I rewrite the function in inline C or in C/C++ using Rcpp? If the latter case is true, how do you « readBin » in

Re: [R] ggplot2: geom_segment does not produce the color I desire?

2016-09-17 Thread Dominik Schneider
ggplot will assign, or map if you will, the color based on the default color scale when color is specified with the mapping argument such as mapping = aes(color=...). You have two options: 1. if you want the color of your arrow to be based on a column in your data, then manually scale the color

[R] Help modifying "aheatmap" or find a new heatmap package

2016-09-17 Thread Michael Young
I am currently using "aheatmap" which is generating heatmaps based on Pearson correlation. My data consists of RPKM values for genes from 2 groups. Each group has about 70 samples. Is there anyway that I can modify "aheatmap" so that it generates heat maps based on the actual input values

[R] Help modifying "aheatmap" or find a new heatmap package

2016-09-17 Thread Michael Young
I am currently using "aheatmap" which is generating heatmaps based on Pearson correlation. My data consists of RPKM values for genes from 2 groups. Each group has about 70 samples. Is there anyway that I can modify "aheatmap" so that it generates heat maps based on the actual input values

Re: [R] glmnet vignette question

2016-09-17 Thread Dominik Schneider
> Is there a way to extract MSE for a lambda, e.g. lambda.1se? nevermind this specific question. it's now obvious. However my overall question stands. On Fri, Sep 16, 2016 at 10:10 AM, Dominik Schneider < dominik.schnei...@colorado.edu> wrote: > I'm doing some linear modeling and am new to the

[R] glmnet vignette question

2016-09-17 Thread Dominik Schneider
I'm doing some linear modeling and am new to the ridge/lasso/elasticnet procedures. In my case I have N>>p (p=15 based on variables used in past literature and some physical reasoning) so my understanding is that I should be interested in ridge regression to avoid the issue of multicollinearity of

[R] brms error

2016-09-17 Thread farzana.akbari
“IN THE NAME OF GOD” HI DEAR I AM A M.SC. STUDENT OF ACCOUNTING IN FERDOWSI UNIVERSITY OF MASHHAD AND I WANT TO USE BRMS PACKAGE FOR BAYSIAN MULTILEVEL ANALYSIS FOR MY RESEARCH I INSTALL RSTAN AND RTOOLS AND BRMS BUT I CANNOT SOLVE THIS PROBLEM OF (ERROR). I AM SOMEWHAT NEW IN R

[R] Request for R code

2016-09-17 Thread ANURAG SHARMA
Heyy I want to apply LASSO method in AFT model. So can you guys please help me by sending R code for that. Regards Anurag Sharma Mphil Statistics Faculty of Mathematical Science Ph no-+91-8285468733 [[alternative HTML version deleted]] __

Re: [R-es] Saltar filas no numericas al importar csv

2016-09-17 Thread Fernando Arce via R-help-es
Hola Jesus, si aun no lo has arreglado, prueba esto. Si dices que todos los valores de las filas de datos son numericas, deberia hacerte el apaño     ## informacion del nombre del archivo y separacion de columnas     archivo <- 'mi archivo.csv'       # con las comillas, y con la ruta al archivo

Re: [R] ggplot2: geom_segment does not produce the color I desire?

2016-09-17 Thread Erich Neuwirth
Here are 2 solutions to you problem: If you only want to use one color (for possibly many arrows), this will work: ggplot()+geom_segment(mapping = aes(x = as.Date(test[,"date"]), y =y1, xend = as.Date(test[,"date"]),