[R] make hyperlink in R

2013-05-08 Thread Bill Hyman
Dear all, Does anybody know how to make hyperlink in R? If I want to output http://www.r-project.org/; with hyperlink, how can I do with plain text 'http://www.r-project.org/'? Thank you! Bill [[alternative HTML version deleted]] __

[R] how to remove part of the string

2012-06-06 Thread Bill Hyman
Dear all, Does any one know how to remove part of the string? For example, LTA4H||Leukotriene A4 hydrolase is a gene name plus gene description. I hope to remove ||Leukotriene A4 hydrolase. What would be the R code to do that using gsub()? Many thanks! Bill

[R] predict risk (% of death) at a certain time point

2011-12-19 Thread Bill Hyman
Dear all, Does any one know how to calculate the risk (death rate) at some time point (say 5 yrs) based on Kaplan-Meier curve in coxph model in R? I know how to fit the survival data with coxph. But need to calculate risk at some time point. Many thanks. Bill

[R] Ordinary Least Products regression in R

2011-07-27 Thread Bill Hyman
Dear all, Does any one know if any R package or function can do Ordinary Least Products regression? Many thanks! Bill __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Ordinary Least Products regression in R

2011-07-26 Thread Bill Hyman
Dear all, Does any one know if any R package or function can do Ordinary Least Products regression? Many thanks! Bill __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] an efficient way to calculate correlation matrix

2011-06-02 Thread Bill Hyman
Dear all, I have a problem. I have m variables each of which has n observations. I want to calculate pairwise correlation among the m variables and store the values in a m x m matrix. It is extremely slow to use nested 'for' loops if m and n are large. Is there any efficient alternative to

[R] How to make truncated y axis (cut mark) in R plot?

2011-04-15 Thread Bill Hyman
Hi friends, Does anyone know how to make truncated y axis with cut mark (\\) in R plot? Many thanks! Bill __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] How to check redundancy of variable and reduce data dimension

2011-04-08 Thread Bill Hyman
Dear all, Do you know how to check redundancy of variables and reduce the dimension in R? It seems PCA can do this. Is there any other better way to implement in R? Many thanks! Bill __ R-help@r-project.org mailing list

[R] How to create a nb object

2011-03-23 Thread Bill Hyman
Dear all, I am looking at the example in spdep for autocorrelation test as below. However, how can one create a nb object for your data? Suppose you have data COL.OLD. But how do you create COL.nb from there? Many thanks for your help! Bill

Re: [R] Matching patients

2011-02-02 Thread Bill Hyman
Hi Bernardo, Thank you so much. I appreciate it. Bill - Original Message From: Bernardo Rangel Tura t...@centroin.com.br To: Bill Hyman billhym...@yahoo.com Sent: Wed, February 2, 2011 12:55:56 AM Subject: Re: [R] Matching patients On Tue, 2011-02-01 at 11:01 -0800, Bill Hyman wrote

[R] Matching patients

2011-02-01 Thread Bill Hyman
May I ask a clinical question? For a trial, we have a treatment group of small size, say 30 patients. We want to selectmatching control patients from a bigger group (100 patients) in terms of several clinical variables, such as age, tumor stage etc. This practice is to select the closest

[R] Pearson correlation matrix heatmap

2010-04-05 Thread Bill Hyman
Hi all, Does any one know how to make Pearson correlation matrix heatmap in R? The heatmap is a square with highly correlated elements clustered together. And the heatmap matrix is symmetric with respect to the diagonal line. Many thanks for your help! Bill

[R] fitting nonlinear model

2009-09-09 Thread Bill Hyman
I only have 4 data points and want to fit a curve. It does not work in modreg due to too few data. Do you have any idea? Many thanks! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] fitting nonlinear model

2009-09-09 Thread Bill Hyman
My data look like: Np year 962 915 897 85 10 - Original Message From: Bill Hyman billhym...@yahoo.com To: r-help@r-project.org Sent: Wednesday, September 9, 2009 11:23:26 AM Subject: [R] fitting nonlinear model I only have 4 data points and want to fit a curve. It does

Re: [R] fitting nonlinear model

2009-09-09 Thread Bill Hyman
Hi Milton, Thanks for your help. Actually, I would like to fit a non-linear fashion. For some data like below, 'lm' may not work very well. Do you have idea? Thanks again! Bill 0 1 2 0.9 5 0.5 7 0.1 10 0.01 From: milton ruser milton.ru...@gmail.com

[R] power analysis for prop trend test

2009-03-02 Thread Bill Hyman
Hi all, Is there any way we can to power analysis for prop trend test? Many thanks! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and

[R] How to sort a matrix or dataframe by two columns?

2009-02-06 Thread Bill Hyman
Dear all, I have a matrix data and would like to sort it by col 1 first and then sort it by col 2. Can I do it in R? Thanks a lot! Bill __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] How to sort a matrix or dataframe by two columns?

2009-02-06 Thread Bill Hyman
Gabor, Thank you very much! Bill - Original Message From: Gábor Csárdi csa...@rmki.kfki.hu To: Bill Hyman billhym...@yahoo.com Cc: r-help@r-project.org Sent: Friday, February 6, 2009 2:37:30 PM Subject: Re: [R] How to sort a matrix or dataframe by two columns? Yes, you can: m

[R] how to separate char and num within a variable

2009-02-05 Thread Bill Hyman
Hi all, I read in a column which looks like chr1:000889594-000889638, and need to break them into three columns like chr1:, 000889594 and 000889638. How shall I do in R. Thanks a lot for your suggestions! Bill __ R-help@r-project.org mailing list

Re: [R] how to separate char and num within a variable

2009-02-05 Thread Bill Hyman
Thx a lot! It works - Original Message From: Wacek Kusnierczyk waclaw.marcin.kusnierc...@idi.ntnu.no To: Bill Hyman billhym...@yahoo.com Cc: R help r-h...@stat.math.ethz.ch Sent: Thursday, February 5, 2009 3:38:34 PM Subject: Re: [R] how to separate char and num within a variable Bill

Re: [R] how to separate char and num within a variable

2009-02-05 Thread Bill Hyman
Thx a lot! - Original Message From: Marc Schwartz marc_schwa...@comcast.net To: Bill Hyman billhym...@yahoo.com Cc: r-help@r-project.org Sent: Thursday, February 5, 2009 3:39:53 PM Subject: Re: [R] how to separate char and num within a variable on 02/05/2009 05:20 PM Bill Hyman wrote

Re: [R] how to separate char and num within a variable

2009-02-05 Thread Bill Hyman
Thank you! - Original Message From: markle...@verizon.net markle...@verizon.net To: Bill Hyman billhym...@yahoo.com Sent: Thursday, February 5, 2009 3:35:54 PM Subject: RE: [R] how to separate char and num within a variable hi: you can do below but there should possibly be a better

[R] A question about GEE library

2008-05-09 Thread Bill Hyman
Hi all, It seems that GEE does not work when all predictive variables add up to a constant. For example, Y ~ X1+X2+X3. If, for each data point, we have x1+x2+x3=1, the algorithm fails. Could anyone tell me why this would happen? Thank you!