[R] initiate elements in a dataframe with lists

2018-07-24 Thread Bogdan Tanasa
Dear all, assuming that I do have a dataframe like : x <- data.frame(TYPE=c("DEL", "DEL", "DUP", "TRA", "INV", "TRA"), CHRA=c("chr1", "chr1", "chr1", "chr1", "chr2", "chr2"), POSA=c(10, 15, 120, 340, 100, 220), CHRB=c("chr1", "chr1", "chr1", "chr2", "chr2", "chr1"), POSB=c(30, 100, 300, 20, 200,

Re: [R] Using apply function to merge list of data frames

2018-07-24 Thread Berend Hasselman
> On 25 Jul 2018, at 08:17, Naresh Gurbuxani > wrote: > > I have a list whose components are data frames. My goal is to construct a > data frame by merging all the list components. Is it possible to achieve > this using apply and without a for loop, as used below? > > Thanks, > Naresh >

Re: [R] coloring edges in IGRAPH

2018-07-24 Thread Bogdan Tanasa
Thank you all. Think I did solve it by using the code below : plot(g_decompose[[1]], edge.color=edge_attr(g_decompose[[1]])$COLOR) plot(g_decompose[[2]], edge.color=edge_attr(g_decompose[[2]])$COLOR) On Tue, Jul 24, 2018 at 5:48 PM, Bogdan Tanasa wrote: > Dear all, > > I would appreciate a pie

[R] coloring edges in IGRAPH

2018-07-24 Thread Bogdan Tanasa
Dear all, I would appreciate a piece of advice please : I am aiming to color the edges in a graph, by using IGRAPH package. It works well for the big braph, however, when I decompose the graph into 2 subgraphs and color code those, the color of the edges change (unexpectedly). more precisely, as

Re: [R] pROC

2018-07-24 Thread David Winsemius
> On Jul 23, 2018, at 4:43 AM, Maria Enzian wrote: > > > > Hello, > I'm using the package pROC in RStudio to create my ROC-curves and I have > patients in my data - healthy or sick - in the column "Status" and the value > "SUVmax" to examine it. > I used the following code: > plot.roc(daten

Re: [R] Issue : Time to run a model on different computers

2018-07-24 Thread Bert Gunter
1. Unless there is good reason not to, always cc the list, which I have done here. 2. I should have added that memory usage and possible swapping issues also depends on what other software you have running, not just on how much memory you have. In other words, I see no way to answer your question

Re: [R] Stop a loop if it takes long time

2018-07-24 Thread Jeff Newmiller
Depends somewhat on what you are doing in the loop and how much of a performance hit you are willing to accept. [1] [1] https://stackoverflow.com/questions/7891073/time-out-an-r-command-via-something-like-try On July 24, 2018 3:17:41 AM PDT, Christofer Bogaso wrote: >Hi, > >Let say I am imple

[R] historic(al) algorithms in R

2018-07-24 Thread J C Nash
R users may or may not be aware of the long history of some of the codes and algorithms used by base R and by packages. There is a small effort under way to try to document and improve understanding of these, and R Consortium has allocated some funds. We've now got a Working Group and some prelimin

[R] Stop a loop if it takes long time

2018-07-24 Thread Christofer Bogaso
Hi, Let say I am implementing a loop using for() / apply()-family etc. Now, the calculation-time within a particular loop is not fixed, means, some loop takes a long time to finish calculation, and next loop perhaps very quick to finish. I am exploring if there is any way, to check if the calcul