[R] help needed with printing multiple arguments as vectors, not matrices

2013-06-24 Thread Angel Russo
** I am using the following way to get p-values from fiser exact test. However, I do need to print for each pair the values n00, n01, n10, n11. How can I print that as a table and not a matrix as below along with the p-value? Any help will be greatly appreciated fish - function(y, x) {n00 =

Re: [R] help needed with printing multiple arguments as vectors, not matrices

2013-06-24 Thread Angel Russo
) } Jean On Mon, Jun 24, 2013 at 6:09 AM, Angel Russo angerusso1...@gmail.comwrote: ** I am using the following way to get p-values from fiser exact test. However, I do need to print for each pair the values n00, n01, n10, n11. How can I print that as a table and not a matrix as below along

Re: [R] help needed with printing multiple arguments as vectors, not matrices

2013-06-24 Thread Angel Russo
] - mat1$GENE SYMBOL[i] results[count, gene2] - mat2$GENE SYMBOL[j] results[count, 3:7] - fish(mat1[i, -1], mat2[j, -1]) }} On Mon, Jun 24, 2013 at 10:35 AM, Angel Russo angerusso1...@gmail.comwrote: Sample data is as follows (for simplicity assume mat1 and mat2 are the same matrices). Also

[R] problem with geom_point in ggplot using a different column

2013-04-25 Thread Angel Russo
I want to draw boxplot where the geom_points are displayed based on ERBB2.MUT subset and they should be displayed in the right box (based both on the ERBB2.2064 field and ERBB2_Status). However, given my command I currently only see red points corresponding to MUT subset in one straight line

[R] Query regarding SVD of binary matrix:

2012-06-07 Thread Angel Russo
Hello, I have a binary matrix of 80k sets (sets comprising of combination of cities) by 885 cities (dimension = 80k x 885). For matrix, 1 means city is a part of the set and 0 means the city is not part of the set. Sets are rows and cities are columns (city.test). I want to do feature reduction

[R] Assigning genes to CBS segmented output:

2011-10-04 Thread Angel Russo
Hi All, I have an CBS segmentation algorithm output for 10 tumor samples each from 2 different tumors. Now, I am in an urgent need to assign gene (followed by all genes present) that belong to a particular segment after I removed all the CNVs from segment data. The format of the data is: Sample

Re: [R] Assigning genes to CBS segmented output:

2011-10-04 Thread Angel Russo
Thanks co much Martin for your bug reply. I will follow up with it. Best, Angel On Tue, Oct 4, 2011 at 7:35 PM, Martin Morgan mtmor...@fhcrc.org wrote: On 10/04/2011 02:44 PM, Angel Russo wrote: Hi All, I have an CBS segmentation algorithm output for 10 tumor samples each from 2

[R] Hazard ratio calculation and KM plot p-value:

2011-04-05 Thread Angel Russo
I have two questions: 1) Can anyone provide me with a reference regarding calculation of Hazard ratio for two groups of data. How is it being manually calculated with an example. Unlike median time ratio which is the ratio of median times in two groups, at what time is the hazard ratio

[R] using pre-calculated coefficients and LP in coxph()?

2011-03-13 Thread Angel Russo
I need to force a coxph() function in R to use a pre-calculated set of beta coefficients of a gene signature consisting of xx genes and the gene expression is also provided of those xx genes. If I try to use coxph() function in R using just the gene expression data alone, the beta coefficients

Re: [R] using pre-calculated coefficients and LP in coxph()?

2011-03-13 Thread Angel Russo
6:08 PM, Angel Russo wrote: I need to force a coxph() function in R to use a pre-calculated set of beta coefficients of a gene signature consisting of xx genes and the gene expression is also provided of those xx genes. I would have guessed (and that is all one can do without an example

[R] pairwise p-values in KM plots?

2011-03-13 Thread Angel Russo
How can I compute pairwise p-values in Kaplan-meier plots for three or more groups? bin.1-cut(score,c(-1000,-1,1,1000),c(low,intermediate,high)) I use km.coxph.plot currently which reports one p-value. Thanks very much. [[alternative HTML version deleted]]

Re: [R] ROC from R-SVM?

2011-02-22 Thread Angel Russo
of e1071::SVN and ROCR here https://heuristically.wordpress.com/2009/12/23/compare-performance-machine-learning-classifiers-r/ -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Angel Russo Sent: Monday, February 21, 2011 3:34 PM

[R] ROC from R-SVM?

2011-02-21 Thread Angel Russo
*Hi, *Does anyone know how can I show an *ROC curve for R-SVM*? I understand in R-SVM we are not optimizing over SVM cost parameter. Any example ROC for R-SVM code or guidance can be really useful. Thanks, Angel. [[alternative HTML version deleted]]

[R] why no probabilities from svm.predict?

2011-02-21 Thread Angel Russo
library(ROCR) library(e1071) svmres.prob - svm(traindx, traindy, probability=TRUE) svmpred.prob - predict(svmres.prob, testdx, probability = TRUE, decision.values = TRUE, type=prob) print(length(attr(svmpred.prob, probabilities))) [1] 0 print(attr(svmpred.prob, probabilities)) NULL

[R] list of features from svmpath?

2011-02-20 Thread Angel Russo
How can I get the list of non-zero features from svmpath at any given lambda? All I get is following information and information about what features were selected. In Iris example, we have 4 features and 60 cases. In my own example which is 200cases by 300 features, I can't figure out how to print

[R] Error in R-SVM help:

2011-02-20 Thread Angel Russo
Greetings: I am trying to use your R code for R-SVM as follows. Why it dosen't print the LOO.error and the list of features? http://www.stanford.edu/group/wonglab/RSVMpage/R-SVM.html My training data as follows contains 142 cases and 264 features. instead I get en error as below invalid

[R] hazard.ratio command:

2011-02-14 Thread Angel Russo
Hi All, In absence of any reply, I am posting a slightly modified question. What is x in hazard.ratio in the command below? example(hazard.ratio) binscores-cut(scores.train,c(-1000,-1,1,1000),c(low,intermediate,high)) * hazard.ratio(x=?, surv.time=train$ProgFreeSurv,

[R] hazard ratio between my groups

2011-02-10 Thread Angel Russo
HI, I am interested in calculating hazard ratio of the stratified groups defined by me. library(survcomp) binscores - cut(scores.train,c(-1000,-1,1,1000),c(low,intermediate,high)) dd - data.frame(surv.time=OS, surv.event= status, strat=binscores) km.coxph.plot(formula.s=Surv(surv.time,

[R] survfit

2010-12-14 Thread Angel Russo
Hello R helpers: *My first message didn't pass trough filter so here it's again* I would like to obtain probability of an event for one single patient as a function of time (from survfit.coxph) object, as I want to find what is the probability of an event say at 1 month and what is the

[R] Urgent help requested using survfit(individual=T):

2010-12-14 Thread Angel Russo
Hello: I would like to obtain probability of an event for one single patient as a function of time (from survfit.coxph) object, as I want to find what is the probability of an event say at 1 month and what is the probability of an event at 80 months and compare. So I tried the following but it