[R] Nomogram

2007-10-03 Thread motaveiga
Hi R users. I have a model of cox that already it is estimated (I have only the model estimated, I haven't data), how can I determine a nomogram with R? Is it posible to do nomograms in Design package? I think that's only when the model (Cox Regression in this case) is before estimated i

Re: [R] Reimplement order somehow

2007-10-03 Thread XpeH
I have found how to reimplement order method from R language in PHP: $value) { $array_new[$key + 1] = $value; } $array = $array_new; print "\n --\n"; $uniq_arr = array_unique($array); ksort($uniq_arr); foreach ($array as $key => $value) { if ($key !== ($key +1)) { $array[$

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread Rolf Turner
I think that what you need to do is as.table(as.matrix(dff)) E.g. melvin <- data.frame(x=c(3,1,3,2),y=c(3,3,4,5)) clyde <- as.table(as.matrix(melvin)) prop.table(clyde,1) x y A 0.500 0.500 B 0.250 0.750 C 0.4285714 0.5714286

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread Deepayan Sarkar
On 10/3/07, Farrel Buchinsky <[EMAIL PROTECTED]> wrote: > Your solution would work if the data frame contained the raw data. In that > case the table function as you outlined would be a table crossing all the > levels of column 1 with all the levels of column 2. > Instead my data frame is the table

[R] Shading area under density curves

2007-10-03 Thread rominger
Hello, I have a question regarding shading regions under curves to display 95% confidence intervals. I generated bootstrap results for the slope and intercept of a simple linear regression model using the following code (borrowed from JJ Faraway 2005): > attach(allposs.nine.d) > x<-model.m

Re: [R] Checking for adequate disk space

2007-10-03 Thread Sundar Dorai-Raj
bogdan romocea said the following on 10/3/2007 12:32 PM: > Run df from R; here's an example (run on Interix): > $ df /dev/fs/C/WINDOWS > Filesystem 512-blocks Used Available Capacity Type Mounted on > //HarddiskVolume2 77706400 34632424 4307397645% ntfs /dev/fs/C > >

Re: [R] r-package RDCOMClient

2007-10-03 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marcin Kopaczynski wrote: > both versions work on my pc, but on the pc where i have bloomberg > installed the things i described do not work. Can you give us some details about which versions of R you have, versions of RDCOMClient and rcom and als

[R] table with a weight variable?

2007-10-03 Thread lamack lamack
Dear all, there is an R function do a frequency table considering a weight variable? M A 23 M B 34 F A 23 F B 45 I would like a table like this A B M 23 34 F 23 45 Best regards _ Conheça o Windows

[R] Forcing zero intercept in two predictor case - stat question not R question

2007-10-03 Thread Leeds, Mark \(IED\)
When one is doing simple regression and needs to force a zero intercept ( for whatever reason. I realize it's a controversial issue ), then subtracting the means of the left hand side and the right hand side from themselves does the trick. Does anyone know if there is a similar trick when the RHS

Re: [R] Shading area under density curves

2007-10-03 Thread Marc Schwartz
On Wed, 2007-10-03 at 14:21 -0700, [EMAIL PROTECTED] wrote: > Hello, > > I have a question regarding shading regions under curves to display > 95% confidence intervals. I generated bootstrap results for the slope > and intercept of a simple linear regression model using the following > code

Re: [R] Forcing zero intercept in two predictor case - stat questionnot R question

2007-10-03 Thread John Fox
Dear Mark, John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMA

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread Farrel Buchinsky
No. Not really.What you have done seems to be similar to what I could do with the reshape library. rawer<-melt(coinfection,id.var="study") # please refer to my post immediately before this. I am still unable to make use of prop.table and margin.table functions. On 10/3/07, Deepayan Sarkar <[EMAIL

Re: [R] Nomogram

2007-10-03 Thread Frank E Harrell Jr
[EMAIL PROTECTED] wrote: > Hi R users. > > I have a model of cox that already it is estimated (I have only the > model estimated, I haven't data), how can I determine a nomogram with > R? Is it posible to do nomograms in Design package? I think that's > only when the model (Cox Regression i

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread Deepayan Sarkar
On 10/3/07, Farrel Buchinsky <[EMAIL PROTECTED]> wrote: > Thank you. It comes close but not exactly what I wanted. I had to > scrap my column that contained character values. That column noted the > name of the study. Let me try show you here > > Best if viewed in courier font > > > coinfection >

[R] help with mclust

2007-10-03 Thread Lo, Ken
Dear all, I am attempting to model some one-dimensional data using Gaussian mixture model with mclust. Generally, the data that I have have 3 overlapping populations (with one of them being the majority, and the other two combining to less than 15%) and for some reason, mclust consistently ign

Re: [R] table with a weight variable?

2007-10-03 Thread Marc Schwartz
On Wed, 2007-10-03 at 21:31 +, lamack lamack wrote: > Dear all, there is an R function do a frequency table considering a weight > variable? > > M A 23 > M B 34 > F A 23 > F B 45 > > I would like a table like this > > A B > M 23 34 > F 23 45 See ?xtabs For exam

Re: [R] Forcing zero intercept in two predictor case - stat questionnot R question

2007-10-03 Thread Leeds, Mark \(IED\)
Hi john : I just checked it with a simple example before I saw your email and that does work. Thanks and I apologize to you and the list for the question. -Original Message- From: John Fox [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 03, 2007 6:06 PM To: Leeds, Mark (IED) Cc: [EMAI

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread Farrel Buchinsky
Thank you. It comes close but not exactly what I wanted. I had to scrap my column that contained character values. That column noted the name of the study. Let me try show you here Best if viewed in courier font > coinfection study HPV6 HPV11 CoInfect other 1 Wiatrak 2004 3123

[R] Trouble with znorm

2007-10-03 Thread Harshal D Dedhia
I am trying to normalize a dataframe of dimensions(1,1) using znorm from the dprep package. What I get back is the same data, and nothing has been normalized. Wondering if there is a known bug I am running into or am I missing something? Cheers! Harshal [[alternative HTML version del

Re: [R] Forcing zero intercept in two predictor case - stat question not R question

2007-10-03 Thread Rolf Turner
On 4/10/2007, at 9:48 AM, Leeds, Mark (IED) wrote: > When one is doing simple regression and needs to force a zero > intercept > ( for whatever reason. I realize it's a controversial issue ), > then subtracting the means of the left hand side and the right hand > side > from themselves does t

[R] FW: help with mclust

2007-10-03 Thread Lo, Ken
> No HTML this time. Sorry Dear all, I am attempting to model some one-dimensional data using Gaussian mixture model with mclust.  Generally, the data that I have have 3 overlapping populations (with one of them being the majority, and the other two combining to less than 15%) and for some re

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread Farrel Buchinsky
Genius! Thank you very much. Yes indeed I should have thought of that. For some reason I have a mental blank about the use of row.names and instead I repeatedly put that kind of data as a column in the data frame. Thank you for the rescue. __ R-help@r-pr

Re: [R] Calculating proportions from a data frame rather than a table

2007-10-03 Thread Farrel Buchinsky
Incidentally, the feature becomes really powerful when one uses functions such as addmargins together with prop.table as in coinf.table <-as.matrix(coinfection) prop.table(coinf.table,1) # to see proportions from each HPV type per study addmargins(coinf.table)# to see totals within study and accr

Re: [R] ggplot2: problem with geom_errorbar and geom_abline

2007-10-03 Thread Ben Bolker
James D Forester wrote: > > Hi all, > > I have run into what appears to be a bug in ggplot2; however, I am new > to the ggplot syntax, so I might be missing a key element. The main > issue is that I cannot get geom_abline to plot when colour is used to > identify "group" in the main plot.

[R] Windows OS, R and unicode

2007-10-03 Thread Richard Rowe
I'm trying to use the biological female and male signs in R2.5.1 under Windows XP. I can access and insert these symbols using word-processors. In general these should be available as \u2640 and \u2642 but I can't make them happen in R using (say) text(5,5, "\u2640") message "invalid \u seq

[R] ??clusplot

2007-10-03 Thread Haiyong Xu
Hi there, I want to do classify some 2-dimensional points into four clusters by pam() in the cluster package. However, I encountered some problems. 1. How can I change the "xlab" and "ylab" instead of the default "Component 1" and "Component 2"? When I put "xlab" option in the function, it

Re: [R] Odp: Error in lm.fit(

2007-10-03 Thread Peter Lauren
Hi, I checked my code and found that it was actually a subsequent call to lm.fit() (which only gets called occasionally) where the problem occurred. I found that I was accidentally passing a matrix called PMs instead of the vector PM. Sorry about that. Thanks, Peter. --- Petr PIKAL <[EMAIL PR

[R] linewidth in Rgraphviz

2007-10-03 Thread Ben Bolker
I'm an Rgraphviz newbie trying to figure out how to do some things/whether they are possible. Apparently graphviz does allow you to modify line widths of edges: see https://mailman.research.att.com/pipermail/graphviz-interest/2001q2/51.html (although it looks a little obscure even in gr

[R] as.numeric(FALSE) fails after loading the Matrix package

2007-10-03 Thread Bernd Weiss
Dear all, is this a bug? > as.numeric(FALSE) [1] 0 > library(Matrix) Loading required package: lattice > as.numeric(FALSE) Error in UseMethod("as.double") : no applicable method for "as.double" > Regards, Bernd > version _ platform i386-pc-mingw32 arch i386 o

[R] tcltk question

2007-10-03 Thread Tae-Hoon Chung
Is there any requirement for TclTk support for R? When I tried to call the tcltk library, it failed with the following message: > library(tcltk) Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error in library(tcltk) : .First.lib failed for 't

Re: [R] as.numeric(FALSE) fails after loading the Matrix package

2007-10-03 Thread Bernd Weiss
Bernd Weiss schrieb: > Dear all, > > is this a bug? > > >> as.numeric(FALSE) > [1] 0 >> library(Matrix) > Loading required package: lattice >> as.numeric(FALSE) > Error in UseMethod("as.double") : no applicable method for "as.double" > After doing a complette reinstallation (uninstalling R, de

Re: [R] FW: help with mclust

2007-10-03 Thread Tatiana Benaglia
Hi Ken, I know your question was specifically about the mclus, but you can also try to fit a univariate gaussian mixture using the normalmixEM in the mixtools package. library(mixtools) out = normalmixEM(data, k=3) That's what I got for your sample: > out$lambda [1] 0.119 0.647 0.234 > out

[R] Missing value analysis in time series

2007-10-03 Thread Megh Dal
Hi all R user, Suppose I have daily time series value for two assets. However for some days value of 1 asset is missing whereas for some of the other days values of other asset are missing. Can anyone tell me what would be effective way by using statistical analysis to fill up those gaps b

Re: [R] r-package RDCOMClient

2007-10-03 Thread Marcin Kopaczynski
the windows version on both machines is the same, namely Microsoft Windows XP Professional Version 2002 Service Pack 2 the r-version is also the same: 2.5.1 RDCOMClient-version on both machines is 0.91-0 rcom-version on both machines is 1.5-2.2 what is different, for both machines is that they a

Re: [R] Windows OS, R and unicode

2007-10-03 Thread Prof Brian Ripley
Richard, At present the \u notation only works on Windows in CJK locales, and only to represent characters defined in the locale in use. Now it seems that _does_ include the signs you mention in Japanese. So it is possible that if you start R with Rgui LC_CTYPE=ja then this will work: i

Re: [R] as.numeric(FALSE) fails after loading the Matrix package

2007-10-03 Thread Prof Brian Ripley
On Thu, 4 Oct 2007, Bernd Weiss wrote: > Dear all, > > is this a bug? Did you install package Matrix under that exact version of R? This is the symptom of using a version of Matrix installed under R 2.5.x in R 2.6.0. It works correctly with the CRAN Windows versions of R 2.6.0 and Matrix. Try

Re: [R] tcltk question

2007-10-03 Thread Peter Dalgaard
Tae-Hoon Chung wrote: > Is there any requirement for TclTk support for R? When I tried to > call the tcltk library, it failed with the following message: > > > library(tcltk) > Error in firstlib(which.lib.loc, package) : > Tcl/Tk support is not available on this system > Error in librar

<    1   2