Re: [R] Fit model to data and use model for data generation

2007-01-24 Thread Stephen D. Weigand
On Jan 24, 2007, at 10:34 AM, Benjamin Otto wrote: Hi, Suppose I have a set of values x and I want to calculate the distribution of the data. Ususally I would use the density command. Now, can I use the resulting density-object model to generate a number of new values which have the

Re: [R] Making TIFF images with rtiff

2007-01-11 Thread Stephen D. Weigand
Brant, On Jan 11, 2007, at 9:33 PM, Inman, Brant A. M.D. wrote: Many medical journals and publishers require that images, whether photographs or line art, be submitted as high resolution .TIFF images. One option for R users is to produce an image in one format and to convert it to a .TIFF

Re: [R] FW: R Version Problem in using write.foreign+SAS

2006-12-21 Thread Stephen D. Weigand
Shubha, On Dec 20, 2006, at 10:54 PM, Shubha Vishwanath Karanth wrote: Could I find a solution for this? Please please please... How can I change the built in code of foreign:::writeForeignSAS for the format? I tend not to change originals if I can help it, so I would create my own version

Re: [R] combining dataframes with different numbers of columns

2006-11-07 Thread Stephen D. Weigand
Denis, On Nov 7, 2006, at 8:30 PM, Denis Chabot wrote: Dear list members, I have to combine dataframes together. However they contain different numbers of variables. It is possible that all the variables in the dataframe with fewer variables are contained in the dataframe with more

Re: [R] Placing of legends

2006-11-04 Thread Stephen D. Weigand
On Nov 4, 2006, at 1:47 PM, Thevini Christian Lerch wrote: Hello, placings of legends is sometimes tricky. For placing outside the plot region I found locator to be useful. Unfortunately, the click defines the upper left corner. Is there a way to change this corner (say lower right

Re: [R] questions about boxplots

2005-09-26 Thread Stephen D. Weigand
Dear Yulei, On Sep 26, 2005, at 6:56 PM, Yulei He wrote: Hi, there. I have two questions about using R to create boxplots. 1. The function boxplot() plots the outliers. How can I label the exact values arount these outlier points? Does R have an option allow me to do that? You can use

Re: [R] about cutree

2005-09-15 Thread Stephen D. Weigand
On Sep 15, 2005, at 10:26 AM, Baoqiang Cao wrote: Hi Everyone, I'm trying to use cutree to get the clusters after hclust. What I used is: mycluster-cutree(cnclust,h=0.5) Now, my problem is, how can I get the actual clusters? Thanks! Best, Baoqiang Cao Doesn't print(mycluster) give you

Re: [R] what's the best way to save global variables?

2005-09-15 Thread Stephen D. Weigand
Johan, On Sep 15, 2005, at 11:39 AM, johan Faux wrote: I am writing a kind of long program in R and I have some variables which I want to be globals. Where should I save them? I was thinking to create a function wich initialize all the global variables and then whenever I need them, I

Re: [R] Finding a decision tree's leaf node from a new value

2005-09-12 Thread Stephen D. Weigand
It sounds to me like you're looking for the function predict.rpart(). Hope this helps, Stephen On Sep 9, 2005, at 8:45 AM, João Mendes Moreira wrote: Dear mailinglist members, I have the following problem: I run a decision tree using the rpart function and, afterwords, I try to find to

Re: [R] Graphics on MacOSX

2005-08-04 Thread Stephen D. Weigand
Dear Dirk and Hank, On Aug 4, 2005, at 9:13 AM, Martin Henry H. Stevens wrote: This is a big issue for me, causing many days of angst. I finally stumbled on the following solution. I create a device save an image with postscript(). I then open it in Adobe Acrobat, select the area I want,

Re: [R] exact values for p-values

2005-07-12 Thread Stephen D. Weigand
On Jul 11, 2005, at 11:47 AM, S.O. Nyangoma wrote: Hi there, If I do an lm, I get p-vlues as p-value: 2.2e-16 Suppose am interested in exact value such as p-value = 1.6e-16 (note = and not ) How do I go about it? stephen I think you're seeing a very small p-value after it has been

Re: [R] aggregate and stack

2005-05-25 Thread Stephen D. Weigand
Dear Paulo, On May 25, 2005, at 8:01 PM, Paulo Brando wrote: Dear All, I have tried to calculate tree mean growth but I think the structure I used below (growthresumo) is not the most elegant, even though it worked. The only problem I had in this first part was that I cannot use

Re: [R] How to convert a character string to a number

2005-05-23 Thread Stephen D. Weigand
Dear Andreas, On May 23, 2005, at 4:56 AM, Kraft, Andreas wrote: Hi everyone, I have a simple problem but don´t know how to solve it. I read in a table from a text file that looks like that: -3,932200E-01 -2,00E-01 4,95E-02 -3,932099E-01 -1,00E-01 3,96E-02 ...

Re: [R] Centered overall title with layout()

2005-05-17 Thread Stephen D. Weigand
Dear Pierre, On May 15, 2005, at 6:36 PM, Lapointe, Pierre wrote: Hello, I would like to have a centered overall title for a graphics page using the layout() function. Example, using this function: z - layout(matrix(c(1:6), 3,2, byrow = TRUE)) layout.show(6) I'd like to get this: Centered

Re: [R] what is a good learning book for R?

2005-05-08 Thread Stephen D. Weigand
On May 8, 2005, at 12:24 PM, Jonathan Q. wrote: Aside from An Introduction to R by W. N. Venables, D. M. Smith (the PDF is free), what would people recommend as a good starter book? I was thinking of introductory Statistics with R by Peter Dalgaard. Any thoughts?? My knowledge of Stats is stale

Re: [R] Histogram for mixed random variables

2005-05-06 Thread Stephen D. Weigand
Dear Paul, On May 5, 2005, at 6:43 AM, Paul Smith wrote: Dear All I would like to get the histogram for the following model with discrete and continuous random variables: * with probability 1/3, a random number is drawn from the continuous uniform distribution (min=0, max=1); * with probability

[R] Row median of Date class variables in a data frame

2005-02-23 Thread Stephen D. Weigand
I am trying to calculate the median of each row of a data frame where the data frame consist of columns of class Date. Below are my test data and best attempt at using apply. I didn't see a solution via Google or the Baron search site. I'd be grateful for any suggestions or solutions. I'm using R