Re: [R] pheatmap: incomplete figure

2017-09-18 Thread David Winsemius
> On Sep 18, 2017, at 9:26 AM, Fix Ace via R-help wrote: > > Dear R Community, > I tried to generate heatmap for a matrix of 1500 columns by 106 rows using > the following R script: >> pheatmap(tf.vs.DE.1.removeAllZeroCol, fontsize=3,border_color=NA) > and got the graph (as attached Fig 1) > >

Re: [R] Help/information required

2017-09-18 Thread David Winsemius
> On Sep 17, 2017, at 9:24 PM, Ajay Arvind Rao > wrote: > > Hi, > > We are using open source license of R to analyze data at our organization. > The system configuration are as follows: > > *System configuration: > > o Operating System - Windows 7 Enterprise SP1, 64 bit (Desktop)

Re: [R] help matching rows of a data frame

2017-09-18 Thread Bert Gunter
Yes. My understanding is that you want the identifier to have the same number of rows as the data frame. A slight variant of David's solution would then be: do.call(paste0,x) -- Bert On Mon, Sep 18, 2017 at 8:29 AM, David Winsemius wrote: > > > On Sep 18, 2017, at 5:13 AM, Therneau, Terry M

Re: [R] help matching rows of a data frame

2017-09-18 Thread David Winsemius
> On Sep 18, 2017, at 5:13 AM, Therneau, Terry M., Ph.D. > wrote: > > This question likely has a 1 line answer, I'm just not seeing it. (2, 3, or > 10 lines is fine too.) > > For a vector I can do group <- match(x, unqiue(x)) to get a vector that > labels each element of x. > What is an eq

Re: [R] help matching rows of a data frame

2017-09-18 Thread William Dunlap via R-help
You could use merge() with an ID column pasted onto the table of names, as in > tbl <- data.frame(FirstName=c("Abe","Abe","Bob","Chuck","Chuck"), Surname=c("Xavier","Yates","Yates","Yates","Zapf"), Id=paste0("P",101:105)) > tbl FirstName Surname Id 1 Abe Xavier P101 2 Abe Yates

Re: [R] Data arrangement for PLSDA using the ropls package

2017-09-18 Thread Bert Gunter
If this is a bioconductor package, why do you not post on the bioconductor list? -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Sep 18, 2017 at

Re: [R] help matching rows of a data frame

2017-09-18 Thread K. Elo
Hi! 2017-09-18 07:13 -0500, Therneau, Terry M., Ph.D. wrote: > This question likely has a 1 line answer, I'm just not seeing > it.  (2, 3, or 10 lines is  > fine too.) > > For a vector I can do group  <- match(x, unqiue(x)) to get a vector > that labels each  > element of x. Actually, you get a v

Re: [R] help matching rows of a data frame

2017-09-18 Thread Jeff Newmiller
"Label" is not a clear term for data frames, but most data frames have rownames. If dta is a data frame, not a tibble, rownames( dta )[ !duplicated( dta ) ] Or could use row indexes directly which( !duplicated( dta ) ) -- Sent from my phone. Please excuse my brevity. On September 18, 2017 6

Re: [R] Convert data into zoo object using Performance analytics package

2017-09-18 Thread Gabor Grothendieck
Depending on how you created df maybe your code has the column names wrong. In any case these 4 alternatives all work. Start a fresh R session and then copy and paste this into it. library(zoo) u <- "https://faculty.washington.edu/ezivot/econ424/sbuxPrices.csv"; fmt <- "%m/%d/%Y" # 1 sbux1.z <

[R] Q2/R2 ratio in PLSDA

2017-09-18 Thread michael.eisenring
Hello, I would like to perform a Partial least square discriminate analysis (PLSDA) in R. To do this I use the package mixOmics. I could perform the PLSDA in R. however I would also like to perform a leave-one-out cross validation in order to assess the performance of my model. My supervisor

Re: [R] help matching rows of a data frame

2017-09-18 Thread Eric Berger
Hi Terry, I take your question to mean how to label distinct rows of a data frame. If that is not your question please clarify. I found the row.match() function in the package prodlim that can be used to solve this. However since your request requires no additional dependencies I borrowed the relev

Re: [R] Help understanding why glm and lrm.fit runs with my data, but lrm does not

2017-09-18 Thread Bonnett, Laura
Many thanks for the assistance. I am using a small sample of GUSTO-1 as a teaching demonstration. The Gusto-1 dataset in various smaller subsets is available from this website: http://clinicalpredictionmodels.org/doku.php?id=rcode_and_data:start which is associated with the Clinical Predicti

[R] help matching rows of a data frame

2017-09-18 Thread Therneau, Terry M., Ph.D.
This question likely has a 1 line answer, I'm just not seeing it. (2, 3, or 10 lines is fine too.) For a vector I can do group <- match(x, unqiue(x)) to get a vector that labels each element of x. What is an equivalent if x is a data frame? The result does not have to be fast: the data set

[R] Convert data into zoo object using Performance analytics package

2017-09-18 Thread Upananda Pani
Dear All, While i am trying convert data frame object to zoo object I am getting numeric(0) error in performance analytics package. The source code i am using from this website to learn r in finance: https://faculty.washington.edu/ezivot/econ424/returnCalculations.r # create zoo objects from dat

[R] Data arrangement for PLSDA using the ropls package

2017-09-18 Thread michael.eisenring
Hello, I would like to do a partial least square discriminant analysis (PLSDA) in R using the package "ropls" Which is in R available via the R command : source("https://bioconductor.org/biocLite.R";) I try to do a PLSDA to illustrate the impact of two genders (AP,C) on 5 compounds measured in

[R] Data arrangement for PLSDA using the ropls package

2017-09-18 Thread michael.eisenring
Hello, I would like to do a partial least square discriminant analysis (PLSDA) in R using the package "ropls" Which is in R available via the R command : source("https://bioconductor.org/biocLite.R";) When I try to do a PLSDA using my own data. The impact of two genders (AP,C) on 5 compounds mea