Re: [R] the observed "log odds" in logistic regression

2007-12-10 Thread Dieter Menne
Bin Yue 163.com> writes: > After reading the following two links: > http://luna.cas.usf.edu/~mbrannic/files/regression/Logistic.html > http://www.tufts.edu/~gdallal/logistic.htm > I've known the mathematical basis for logistic regression.However I am > still not so sure about the "logit

Re: [R] the observed "log odds" in logistic regression

2007-12-10 Thread Bernardo Rangel Tura
On Mon, 2007-12-10 at 19:42 -0800, Bin Yue wrote: (...) >My problem is this : in my data set , the IVs are continuous variables, > do I still have to generate such a table and compute the log odds for each > level of IV according to which the log odds are calculated? If IV is a continuous

Re: [R] Building R on Sun Solaris 10 (SPARC) using Sun Studio 12

2007-12-10 Thread Prof Brian Ripley
On Mon, 10 Dec 2007, James T Brown wrote: > R Help List: > > Just curious if anyone has successfully built R on a SPARC > platform running Sun Solaris 10 using the latest Sun Studio > 12 set of compilers. If so, I would be interested in the > compile flags that you used. Yes, the flags given in

Re: [R] How to read in expressions as function parameters?

2007-12-10 Thread Alexwang
Thanks a lot! Henrique Dallazuanna wrote: > > Try this: > > form<- scan(file = "", what = character(0), n=1,strip.white = > TRUE,quiet=TRUE ) > form2<-parse(text=form) > foo <- function(x){} > body(foo) <- form2 > curve(foo,10,100) > > On 09/12/2007, Alex Wang <[EMAIL PROTECTED]> wrote: >

[R] the observed "log odds" in logistic regression

2007-12-10 Thread Bin Yue
Dear list: After reading the following two links: http://luna.cas.usf.edu/~mbrannic/files/regression/Logistic.html http://www.tufts.edu/~gdallal/logistic.htm I've known the mathematical basis for logistic regression.However I am still not so sure about the "logit " For a categoric

Re: [R] 3-D plot of likelihood

2007-12-10 Thread Ben Bolker
Duncan Murdoch-2 wrote: > > On 12/10/2007 11:26 AM, David Bickel wrote: >> Could anyone recommend a package for visualizing a likelihood function >> of two scalar parameters? I would prefer a three-dimensional plot >> similar to the kind Mathematica is known for, perhaps generated by a >> packa

Re: [R] Neat conditional assignment

2007-12-10 Thread Gabor Grothendieck
On Dec 10, 2007 6:52 PM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > With this specific example this will work: > > as.numeric(factor(a)) > > If that is not the real case but its something else you could try any > of these which probably generalize better: > > (a == "A") + 2 * (a == "B") >

[R] error trying to load biOps under 2.6.1 running XP

2007-12-10 Thread Brian O'Gorman
I'm running R 2.6.1 on a WXP machine. When I do the following I get an error message. > library(biOps) Error in dyn.load(file, ...) : unable to load shared library 'C:/PROGRA~1/R/R-26~1.1/library/biOps/libs/biOps.dll': LoadLibrary failure: The specified module could not be found. Error: pac

Re: [R] holidayNYSE missing some

2007-12-10 Thread Joe W. Byers
John Putz wrote: > Thanks. > > */ > email: /**/[EMAIL PROTECTED]/* > */home: 206-632-6522 > cell: 206-910-5229/* > > > - Original Message > From: Joe W. Byers <[EMAIL PROTECTED]> > To: John Putz <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Sent: Friday, Decemb

Re: [R] Neat conditional assignment

2007-12-10 Thread Ted Harding
On 10-Dec-07 23:41:34, Neil Stewart wrote: > I would like to make a new vector with values taken from two > existing vectors conditional upon a third. At present I am > doing this with a for loop but wonder if there is not a neater > way, given some of the very neat things R can do. > > a<-rep(c("

Re: [R] 00LOCK error with site-library

2007-12-10 Thread Mark W Kimpel
Paul, Yes, I have manually removed it multiple times and it continues to reappear. I'll try to just upgrade a few packages at a time and see if there is one in particular that is causing the problem. Failing that, I'll run this past my system admin. Thanks for your help, Mark Mark W. Kimpel M

Re: [R] Neat conditional assignment

2007-12-10 Thread Achim Zeileis
On Mon, 10 Dec 2007, Neil Stewart wrote: > I would like to make a new vector with values taken from two existing > vectors conditional upon a third. At present I am doing this with a for loop > but wonder if there is not a neater way, given some of the very neat things > R can do. > > a<-rep(c("A"

Re: [R] Neat conditional assignment

2007-12-10 Thread Gabor Grothendieck
With this specific example this will work: as.numeric(factor(a)) If that is not the real case but its something else you could try any of these which probably generalize better: (a == "A") + 2 * (a == "B") 1 + (a == "B") ifelse(a == "A", 1, 2) On Dec 10, 2007 6:41 PM, Neil Stewart <

Re: [R] Neat conditional assignment

2007-12-10 Thread jim holtman
?ifelse > a<-rep(c("A","B"),50) > b<-rep(1,100) > c<-rep(2,100) > d <- ifelse(a == "A", b, c) > head(d) [1] 1 2 1 2 1 2 On Dec 10, 2007 3:41 PM, Neil Stewart <[EMAIL PROTECTED]> wrote: > I would like to make a new vector with values taken from two existing > vectors conditional upon a third. At

Re: [R] Neat conditional assignment

2007-12-10 Thread markleeds
>From: Neil Stewart <[EMAIL PROTECTED]> >Date: 2007/12/10 Mon PM 05:41:34 CST >To: [EMAIL PROTECTED] >Subject: [R] Neat conditional assignment d <- ifelse(a == "A",b,c) >I would like to make a new vector with values taken from two existing >vectors conditional upon a third. At present I am doing

[R] Neat conditional assignment

2007-12-10 Thread Neil Stewart
I would like to make a new vector with values taken from two existing vectors conditional upon a third. At present I am doing this with a for loop but wonder if there is not a neater way, given some of the very neat things R can do. a<-rep(c("A","B"),50) b<-rep(1,100) c<-rep(2,100) a is thus "A"

Re: [R] lattice: placing y-axis labels on right-hand side of panel when relation="sliced"

2007-12-10 Thread Deepayan Sarkar
On 12/10/07, John G. Bullock <[EMAIL PROTECTED]> wrote: > > >I'm using lattice to create a multi-panel figure. I would like > > to draw each panel's y-axis ticks and labels on the right-hand > > side of the panel. Ordinarily, I would do this by specifying > > scales=list(y=list(draw=T, al

Re: [R] Getting estimates from survfit.coxph

2007-12-10 Thread Peter Dalgaard
Terry Therneau wrote: > The problem will be fixed in the next resease of the survival code. (That > is, > it is fixed on our local version of R). The summary.survfit result now > includes > an element 'table' containing the matrix that is shown by print.survfit. > > Terry > H

Re: [R] 00LOCK error with site-library

2007-12-10 Thread Paul Gilbert
Mark W Kimpel wrote: > I have identical R.profiles and R_HOME directories set up on both my > local machine and a remote linux cluster. To keep my libraries and R > install separate, I use a site-library on both machines. > > The first line of my .Rprofile is: > '.libPaths(new= "~/R_HOME/site-

Re: [R] Getting estimates from survfit.coxph

2007-12-10 Thread Mark Wardle
Can't ask for more than that! Many many thanks for making all these tools available. I wince when I see my colleagues struggling with SPSS or SAS! R and the bundled and third-party libraries have saved me an inordinate amount of time and effort! Best wishes, Mark On 10/12/2007, Terry Therneau <

Re: [R] Multiple Reponse CART Analysis

2007-12-10 Thread Gavin Simpson
On Mon, 2007-12-10 at 14:17 -0600, Bardwell, Jeff H wrote: > Dear R friends- > > I'm attempting to generate a regression tree with one gradient > predictor and multiple responses, trying to test if change in size > (turtle.data$Clength) acts as a single predictor of ten multiple diet > taxa abund

[R] R crashes in Leopard

2007-12-10 Thread Keith Jones
Hi, I have upgraded to Leopard and I just installed 2.6.1. I opened R and then I opened package installer and clicked "get List". After about five seconds R stopped responding. and Leopard reported that R had stopped responding and wanted to sent a report to Apple. What do I need to do get

Re: [R] CRAN Index Problems

2007-12-10 Thread Duncan Murdoch
On 10/12/2007 4:36 PM, Keith Jones wrote: > Hi, > > I am getting the following error: Warning: unable to access index for > repository > http://cran.hostingzero.com/bin/macosx/universal/contrib/2.6 with I > run "Get List" in the Package Install window. I am running Leopard > and 2.6.1. What

[R] 00LOCK error with site-library

2007-12-10 Thread Mark W Kimpel
I have identical R.profiles and R_HOME directories set up on both my local machine and a remote linux cluster. To keep my libraries and R install separate, I use a site-library on both machines. The first line of my .Rprofile is: '.libPaths(new= "~/R_HOME/site-library") #tell R where site-librar

Re: [R] lattice: placing y-axis labels on right-hand side of panel when relation="sliced"

2007-12-10 Thread John G. Bullock
>I'm using lattice to create a multi-panel figure. I would like > to draw each panel's y-axis ticks and labels on the right-hand > side of the panel. Ordinarily, I would do this by specifying > scales=list(y=list(draw=T, alternating=2)). But in this case, I am > using relation="sliced"

[R] function centralm - does it exist

2007-12-10 Thread Nuno Prista
Hi, James S. Clark - Statistical computation for environmental sciences in R - mentions a function centralm (pg25) that I believe should be present in the base package but I can't find it. It is supposed to calculate means, variances, skewness, kurtosis of arrays. Does it exist in some other pa

[R] CRAN Index Problems

2007-12-10 Thread Keith Jones
Hi, I am getting the following error: Warning: unable to access index for repository http://cran.hostingzero.com/bin/macosx/universal/contrib/2.6 with I run "Get List" in the Package Install window. I am running Leopard and 2.6.1. What can I do? Thanks, Keith Jones ___

Re: [R] Sweave : change value in rnw file to generate multiple "single" reports ?

2007-12-10 Thread Greg Snow
Others have given some good advice, and what works best for you will depend on exactly what you want to do and how you think about the problem. Here are just a couple of other ideas to throw into the mix. If you want to edit the .rnw file, then the tools sed, awk, or perl (or probably several oth

Re: [R] Problem with graphics device in Mac OS X

2007-12-10 Thread Bryan Hanson
For whatever reason, on the Mac, you have to open a new Quartz device window before making the graphics call. So, from the menu, pull down under Window to New Quartz Device Window. Then all graphics calls go to that (initially empty) window, and any further calls replace the previous contents of

Re: [R] Problem with graphics device in Mac OS X

2007-12-10 Thread jiho
I think you should post this to R-Sig-Mac. I don't notice any problem at all on my system with the same configuration. On 2007-December-10 , at 21:37 , WAYNE KING wrote: > Hello List, > I am teaching a basic course where students are encouraged to use > R. There are a few students using Ma

[R] help with fatal error message

2007-12-10 Thread G Ilhamto
Dear helper, After some cleaning, I found out that I cannot open my R2.6.0 console with message: "Fatal error: unable to restore saved data in .Rdata", and every time I retry it just kick me off. I am wondering if I still be able to retrieve the data that I've been working for a month. I have ins

[R] Problem with graphics device in Mac OS X

2007-12-10 Thread WAYNE KING
Hello List, I am teaching a basic course where students are encouraged to use R. There are a few students using Mac OS X. As a test we downloaded and installed the latest .dmg file (R-2.6.1.dmg) onto a intel Mac running 10.5.1. A device query yields > getOption("device") "quartz" But any pl

[R] Multiple Reponse CART Analysis

2007-12-10 Thread Bardwell, Jeff H
Dear R friends- I'm attempting to generate a regression tree with one gradient predictor and multiple responses, trying to test if change in size (turtle.data$Clength) acts as a single predictor of ten multiple diet taxa abundances (prey.data) Neither rpart or mvpart seem to allow me to do mu

Re: [R] Set the grid.layout programmatically?

2007-12-10 Thread Paul Murrell
Hi Felipe Carrillo wrote: > Hello all: > Does anyone know if the grid layout function can be > set dynamically? For example if I have a column that > will be changing as new data is added monthly I would > like grid to detect the new data and create another > row or column for the new plot on the

Re: [R] Question re: RWinEdt conflicting with my WinEdt

2007-12-10 Thread Elizabeth Purdom
Hello Uwe, Thanks for your reply. I realized in RWinEdt that it was linking to another project that I had made in WinEdt -- I didn't realize I could create or change projects within RWinEdt, so I don't know how I managed that! But now that I do know, that is also very convenient. So I think it'

Re: [R] Large determinant problem

2007-12-10 Thread maj
Ravi Varadhan wrote: > It is evident that you do not have enough information in the data to > estimate 9 mixture components. This is clearly indicated by a positive > semi-definite information matrix, S, that is less than full rank. You can > monitor the rank of the information matrix, as you i

Re: [R] Integral implicit function

2007-12-10 Thread Peter Ruckdeschel
Have you tried vectorizing the inner function? Hint: integrate() calls the integrand vectorwise... in your example, integrate(Vectorize(f),lower=1,upper=2) should do what you expected. Best, Peter Eddy H. G. Bekkers wrote: > > Hi, > > Could somebody help me with the following. I want

Re: [R] Reading through a group of .RData files

2007-12-10 Thread Prof Brian Ripley
On Mon, 10 Dec 2007, Talbot Katz wrote: > > Hi. > > I have a procedure that reads a directory, loops through a set of > particular .RData files, loading each one, and feeding its object(s) > into a function, as follows: > > cvListFiles<-list.files(fnDir); > for(i in grep(paste("^",pfnStub,".*\\.

[R] SAS PROC NLMIXED into R

2007-12-10 Thread Pedro Emmanuel Alvarenga Americano do Brasil
Dear R friends A while a go I sent an email to the epi-list and later to the help-list and no answer could fully illuminate my question. So Im trying again with a more specific matter. Im trying to work on a script (function) to analyse data from a diagnostic test meta-analysis with random effect

Re: [R] Reading through a group of .RData files

2007-12-10 Thread Benilton Carvalho
note that load() returns, invisibly, a string with the names of the objects that were loaded. something in the lines of: myObj <- load(file.path(fnDir, cvListFiles[i])) myFunction(get(myObj)) rm(list=myObj) might be closer to what you want. moreover, if length(myObj) > 1, you might want sth lik

Re: [R] Question re: RWinEdt conflicting with my WinEdt

2007-12-10 Thread Uwe Ligges
WinEdt's default is: Start with WinEdt.ini initialization file and that again uses WinEdt.prj as the default for loading your .tex files, for example. Using RWinEdt, R.ini is used as the initialization file and that one uses R.prj as the default for loading your .R files. If that does not work

[R] Reading through a group of .RData files

2007-12-10 Thread Talbot Katz
Hi. I have a procedure that reads a directory, loops through a set of particular .RData files, loading each one, and feeding its object(s) into a function, as follows: cvListFiles<-list.files(fnDir); for(i in grep(paste("^",pfnStub,".*\\.RData$",sep=""),cvListFiles)){ load(paste(fnDir,cvList

[R] Question re: RWinEdt conflicting with my WinEdt

2007-12-10 Thread Elizabeth Purdom
Hi, This is a question regarding the RWinEdt package for R. I have WinEdt 5.5, RWinEdt 1.7-9, and R 2.6.0 on WindowsXP. Somehow my configuration or start up files between RWinEdt and WinEdt are getting confused. Usually when I open either one, the last files I was working on *with that program

Re: [R] Sweave : change value in rnw file to generate multiple "single"reports ?

2007-12-10 Thread Gabor Grothendieck
On Dec 10, 2007 1:32 PM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 12/10/2007 11:49 AM, ONKELINX, Thierry wrote: > > I think something like this would work. > > > > Change your query to > > > > rs <- dbSendQuery(con, statement = paste("select * from treatdata where > > name='", whichDevice,"'"

Re: [R] Sweave : change value in rnw file to generate multiple "single"reports ?

2007-12-10 Thread Duncan Murdoch
On 12/10/2007 11:49 AM, ONKELINX, Thierry wrote: > I think something like this would work. > > Change your query to > > rs <- dbSendQuery(con, statement = paste("select * from treatdata where > name='", whichDevice,"'", sep = "")) > > And then create a script like. > > whichDevice <- "Device1"

Re: [R] Help rewriting looping structure?

2007-12-10 Thread Julian Burgos
Hi TLowe, I'm not quite sure if I understand what you are trying to do. If you are trying to get the cumulative sum of your data frame along each column you can simply do rcumsum=function(x){cumsum(x)/sum(x)} apply(tdat,2,rcumsum) Yet that is not what your code is doing. With a bit of clarif

Re: [R] Rerolling k-means

2007-12-10 Thread Ashoka Polpitiya
See the 'fpc' package available in CRAN. I have found 'kmeansruns' to be quite useful. -Ashoka --- Scientist Pacific Northwest National Laboratory Richland, WA On Dec 10, 2007 4:42 AM, Christophe Genolini <[EMAIL PROTECTED]> wrote: > Hi all > > I am working on k-means algorithm (in R: kmeans( )

Re: [R] CART analysis

2007-12-10 Thread Bernardo Rangel Tura
On Sun, 2007-12-09 at 21:24 +0100, [EMAIL PROTECTED] wrote: > I would like to know if is it possible implemet a partitioning tree > using a function like rpart, or mvpart, and with formula a glm-object > (as a logistic models) or a robust linear regression (as least sum of > absolute errors)

Re: [R] 3-D plot of likelihood

2007-12-10 Thread Prof Brian Ripley
On Mon, 10 Dec 2007, Uwe Ligges wrote: > See ?persp If you have a suitable OS, I would recommend using package rgl and persp3d: the ability to change viewpoint interactively is very useful. > > Uwe Ligges > > David Bickel wrote: >> Could anyone recommend a package for visualizing a likelihood f

Re: [R] Sweave : change value in rnw file to generate multiple "single"reports ?

2007-12-10 Thread ONKELINX, Thierry
I think something like this would work. Change your query to rs <- dbSendQuery(con, statement = paste("select * from treatdata where name='", whichDevice,"'", sep = "")) And then create a script like. whichDevice <- "Device1" Sweave("myfile.rnw") whichDevice <- "Device2" Sweave("myfile.rnw")

Re: [R] 3-D plot of likelihood

2007-12-10 Thread Duncan Murdoch
On 12/10/2007 11:26 AM, David Bickel wrote: > Could anyone recommend a package for visualizing a likelihood function > of two scalar parameters? I would prefer a three-dimensional plot > similar to the kind Mathematica is known for, perhaps generated by a > package not specific to likelihood. The

Re: [R] Sweave : change value in rnw file to generate multiple "single" reports ?

2007-12-10 Thread Dieter Menne
Ptit_Bleu yahoo.fr> writes: ... > Is there a way to pass arguments to Sweave like Sweave("myfile.rnw", > namevar="Device2") and it will change namevar by Device2 into the file > myfile.rnw before creating the .tex file ? > Or is it possible to do it via another language, that is: loading the rnw

Re: [R] Sweave : change value in rnw file to generate multiple "single" reports ?

2007-12-10 Thread Uwe Ligges
Within or before SWeave, you can use R. Hence you can write some R function that first changes the rnw and runs SWeave thereafter, or even better, write something in your SWeave code that reads a user customized variables, e.g. from an environment variable or from some text file. Uwe Ligges

Re: [R] Sweave : change value in rnw file to generate multiple "single" reports ?

2007-12-10 Thread Duncan Murdoch
On 12/10/2007 11:25 AM, Ptit_Bleu wrote: > Hello, > > I'm still trying to make the life of my colleagues easier. Nice, isn't it ? > At the moment, I'm looking for a way to generate multiple "single report". > In fact I have a .rnw file which send a query to a MySQL database > (rs<-dbSendQuery(con,

Re: [R] Sweave : change value in rnw file to generate multiple "single" reports ?

2007-12-10 Thread Gabor Grothendieck
The ability to pass arguments on the R CMD Sweave line is something I would very much like to have as well. Currently you need to create a shell or batch file that accepts the arguments, place those into environment variables using shell or batch code and then run sweave. R code in your swevae

Re: [R] 3-D plot of likelihood

2007-12-10 Thread Uwe Ligges
See ?persp Uwe Ligges David Bickel wrote: > Could anyone recommend a package for visualizing a likelihood function > of two scalar parameters? I would prefer a three-dimensional plot > similar to the kind Mathematica is known for, perhaps generated by a > package not specific to likelihood. > >

Re: [R] Viewport and grid.draw

2007-12-10 Thread Deepayan Sarkar
On 12/10/07, Dieter Menne <[EMAIL PROTECTED]> wrote: > Deepayan Sarkar gmail.com> writes: > > > Try looking at the first example in > > http://dsarkar.fhcrc.org/lattice/book/Chapter12-Interaction/edited.R > > for inspiration. > > May I suggest to use > >

[R] 3-D plot of likelihood

2007-12-10 Thread David Bickel
Could anyone recommend a package for visualizing a likelihood function of two scalar parameters? I would prefer a three-dimensional plot similar to the kind Mathematica is known for, perhaps generated by a package not specific to likelihood. David __ David R. Bickel Ot

[R] Sweave : change value in rnw file to generate multiple "single" reports ?

2007-12-10 Thread Ptit_Bleu
Hello, I'm still trying to make the life of my colleagues easier. Nice, isn't it ? At the moment, I'm looking for a way to generate multiple "single report". In fact I have a .rnw file which send a query to a MySQL database (rs<-dbSendQuery(con, statement="select * from treatdata where name='Devi

Re: [R] Barchart, Pareto

2007-12-10 Thread John Kane
--- "Kapoor, Bharat " <[EMAIL PROTECTED]> wrote: > Hello > > Well I am relatively new so some of these issues may > not fall under the subject that I have used. > > 1. How do I do a Pareto. You might want to have a look at the qcc package. See http://www.stat.unipg.it/~luca/Rnews_2004-1-pa

Re: [R] adding group totals to a table

2007-12-10 Thread jim holtman
?ave > x V1 V2 1 A 1 2 A 1 3 A 2 4 B 2 5 C 0 > x$len <- ave(seq_along(x$V1), x$V1, x$V2, FUN=length) > x V1 V2 len 1 A 1 2 2 A 1 2 3 A 2 1 4 B 2 1 5 C 0 1 > On Dec 9, 2007 1:35 AM, christopher snow <[EMAIL PROTECTED]> wrote: > I have a table with two columns: >

Re: [R] adding group totals to a table

2007-12-10 Thread Gabor Grothendieck
split the data frame, cbind the count and unsplit back: DF <- data.frame(A = c("A", "A", "A", "B", "C"), B = c(1, 1, 2, 2, 0)) > g <- paste(DF$A, DF$B) > s <- split(DF, g) > u <- lapply(s, function(x) cbind(x, Occurs = nrow(x))) > unsplit(u, g) A B Occurs 1 A 1 2 2 A 1 2 3 A 2 1

[R] Building R on Sun Solaris 10 (SPARC) using Sun Studio 12

2007-12-10 Thread James T Brown
R Help List: Just curious if anyone has successfully built R on a SPARC platform running Sun Solaris 10 using the latest Sun Studio 12 set of compilers. If so, I would be interested in the compile flags that you used. I have tried several different builds of version 2.5.1, 2.6.0, and 2.6.1 usin

Re: [R] moving average and NA values

2007-12-10 Thread Gabor Grothendieck
rollapply in the zoo package can do that: > library(zoo) > x <- zoo(1:10) > x[5] <- NA > rollapply(x, 3, mean, na.rm = TRUE) 2 3 4 5 6 7 8 9 2.0 3.0 3.5 5.0 6.5 7.0 8.0 9.0 > xm <- rollapply(x, 3, mean, na.rm = TRUE) > xm 2 3 4 5 6 7 8 9 2.0 3.0 3.5 5.0 6.5 7.0 8.0

[R] Savannah R Presentation

2007-12-10 Thread Mihai Nica
Greetings: Unfortunately I missed your presentation about using R for spatial statistics. Could you please email your presentation? I would love to look over it. Thanks! Mihai Nica 405-562-7295 Neve

[R] time series tests

2007-12-10 Thread pedrosmarques
Hi all, Can anyone clear my doubts about what conclusions to take with the following outputs of some time series tests: > adf.test(melbmax) Augmented Dickey-Fuller Test data: melbmax Dickey-Fuller = -5.4075, Lag order = 15, p-value = 0.01 alternative hypothesis: stationary Warning mess

Re: [R] How to read in expressions as function parameters?

2007-12-10 Thread Henrique Dallazuanna
Try this: form<- scan(file = "", what = character(0), n=1,strip.white = TRUE,quiet=TRUE ) form2<-parse(text=form) foo <- function(x){} body(foo) <- form2 curve(foo,10,100) On 09/12/2007, Alex Wang <[EMAIL PROTECTED]> wrote: > Hi: > >There, I've got a question about how to read in expressions

Re: [R] Large determinant problem

2007-12-10 Thread Ravi Varadhan
It is evident that you do not have enough information in the data to estimate 9 mixture components. This is clearly indicated by a positive semi-definite information matrix, S, that is less than full rank. You can monitor the rank of the information matrix, as you increase the number of component

Re: [R] Tutorial for Basic Stats

2007-12-10 Thread John Kane
--- "Kapoor, Bharat " <[EMAIL PROTECTED]> wrote: > Thanks in advance - am looking for a Tutorial for > doing basic stats. I have already looked/looking at > the R-intro.pdf at the R site. Have a look at the Books and Others categories (left side of main R page. For some basic totorials perhaps

Re: [R] editor under MAC system

2007-12-10 Thread Max Kuhn
I've been using ForgEdit. It is still in beta, but it works well. I have a syntax highlighting file htat I can send you (and I need to post on the gui/ide website). -- Max __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] Getting estimates from survfit.coxph

2007-12-10 Thread Terry Therneau
The problem will be fixed in the next resease of the survival code. (That is, it is fixed on our local version of R). The summary.survfit result now includes an element 'table' containing the matrix that is shown by print.survfit. Terry ___

Re: [R] Extracting clusters from Data Frame

2007-12-10 Thread Gustaf Rydevik
On Dec 10, 2007 2:28 PM, Johannes Graumann <[EMAIL PROTECTED]> wrote: > Hello, > > I have a large data frame (1006222 rows), which I subject to a crude > clustering attempt that results in a vector stating whether the datapoint > represented by a row belongs to a cluster or not. Conceptually this l

Re: [R] Tutorial for Basic Stats

2007-12-10 Thread Peter Dalgaard
Gustaf Rydevik wrote: > On Dec 10, 2007 5:43 AM, Kapoor, Bharat <[EMAIL PROTECTED]> wrote: > >> Thanks in advance - am looking for a Tutorial for doing basic stats. I have >> already looked/looking at the R-intro.pdf at the R site. >> >> Regards >> BK >> >> [[alternative HTML version d

[R] Extracting clusters from Data Frame

2007-12-10 Thread Johannes Graumann
Hello, I have a large data frame (1006222 rows), which I subject to a crude clustering attempt that results in a vector stating whether the datapoint represented by a row belongs to a cluster or not. Conceptually this looks something like this: Value Cluster? 0.01FALSE 0.03TRUE 0.04T

Re: [R] Junk or not Junk ???

2007-12-10 Thread Bos, Roger
Ok, outlook may not be that great, but even in outlook you can create a separate folder called "R" and create a rule so all email with "[R]" or "[Rdevel]" etc. going into the R folder. That way you can easily scan your R mail separate from your regular mail and then delete everything you don't nee

[R] Rerolling k-means

2007-12-10 Thread Christophe Genolini
Hi all I am working on k-means algorithm (in R: kmeans( ) ). The R-help advice us to try several random start in order to avoid local minimum. Does one know if there is a procedure that automaticly run this rerolling and select the best partition ? Or any studies that gives clues on the number

Re: [R] how to let R read different equations I write and execute it?

2007-12-10 Thread Scionforbai
Hi Czqiu, short answer: ?expression ?eval ?quote ?parse ?deparse ?substitute Bye, Scionforbai __ 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.htm

Re: [R] Tutorial for Basic Stats

2007-12-10 Thread Gustaf Rydevik
On Dec 10, 2007 5:43 AM, Kapoor, Bharat <[EMAIL PROTECTED]> wrote: > Thanks in advance - am looking for a Tutorial for doing basic stats. I have > already looked/looking at the R-intro.pdf at the R site. > > Regards > BK > > [[alternative HTML version deleted]] > google "introductory sta

Re: [R] Estimating the variability of a population by one sample?

2007-12-10 Thread Dieter Menne
Tony zeng gmail.com> writes: >I am meetting one problem.I am estimating the variability of a > population using one sample.I must do two-side and one-side hypothesis > test,and estimate the confidence interval,But I don't know which > function I can use ! You should describe your probl

[R] moving average and NA values

2007-12-10 Thread Cornelis de Gier
The S-plus function moving.ave(data, span = 2) calculates the moving average, but it does not have an argument to tell it how to deal with NA values, so it will return NA for all averages as shown below. Is there an R or S moving average function which is able to omit some NA values in the dataset

Re: [R] editor under MAC system

2007-12-10 Thread Rod
I recommend Smultron a nice editor for R and other statistical apps. (http://dataninja.wordpress.com/2006/06/14/r-syntax-highlighting-for-smultron/) Rod. PD. Please post your Mac question in R-SIG-MAC list. On Dec 10, 2007 10:58 AM, Weiwei Shi <[EMAIL PROTECTED]> wrote: > editor which goes with

Re: [R] adding group totals to a table

2007-12-10 Thread T.K.
Oops. please ignore my first reply. I mis-read the question and the code was messed up because I change the object name in the middle. Sorry for any confusion. :) -- == T.K. (Tae-kyun) Kim Ph.D. student Department of Marketing Marshall School of Business Uni

Re: [R] adding group totals to a table

2007-12-10 Thread T.K.
One way is to use the following functions: ?unique ?aggregate ?merge For example, > x.df <- data.frame(Group=LETTERS[c(1, 1, 1, 2, 3)], Value=c(1, 1, 2, 2, 0)) > x.agg <- aggregate(x$Value, list(Group=x$Group), function(x){length(unique(x))}) > x.agg Group x 1 A 2 2 B 1 3 C 1 > x.mer

Re: [R] adding group totals to a table

2007-12-10 Thread Anders Schwartz Corr
Hi Chris, This is a very rough first conceptual program you could use -- double check all the syntax as I know it won't work at first go. It's untested but can be jiggered to work! Good luck! Anders Use unique() to get your unique combinations, then loop or vectorize through each unique combin

Re: [R] editor under MAC system

2007-12-10 Thread Weiwei Shi
editor which goes with R for Mac is pretty good, IMO. On Dec 9, 2007 3:10 PM, YIHSU CHEN <[EMAIL PROTECTED]> wrote: > Dear R-user; > I recently switched from PC to MAC. Is there a compatible editor as > Win-editor with package RWinEdit for MAC? > > Thanks > > Yihsu Chen > >[[alternative

Re: [R] Function to tell you how an object is put together

2007-12-10 Thread Dimitris Rizopoulos
probably you're looking for str(), e.g., lis <- list(x = 1:10, y = letters[1:3]) str(lis) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)

[R] how to let R read different equations I write and execute it?

2007-12-10 Thread czqiu
Hello All, I am a newcomer to R. Currently, I am trying to write an interactive code in R to let it read the equation which I write and execute the equation in a curve function. For example: I want to plot curve by using: curve (equation, -2,2, n=1000) what I want is that the R code ask me what e

Re: [R] Function to tell you how an object is put together

2007-12-10 Thread Ingmar Visser
str goes a long way in doing that hth, Ingmar On 8 Dec 2007, at 21:07, Thomas L Jones, PhD wrote: > Question: Suppose I have an arbitrary object. Is there a function > which will > accept the object as an argument and sort of give the format of > the object, > how it is put together, etc.? T

[R] editor under MAC system

2007-12-10 Thread YIHSU CHEN
Dear R-user; I recently switched from PC to MAC. Is there a compatible editor as Win-editor with package RWinEdit for MAC? Thanks Yihsu Chen [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailma

[R] adding group totals to a table

2007-12-10 Thread christopher snow
I have a table with two columns: A 1 A 1 A 2 B 2 C 0 I would like to produce a third column that contains the counts of each unique combination of col1 and col2: A 1 2 A 1 2 A 2 1 B 2 1 C 0 1 How can I do this in R? Thanks in advance ... -- This message has been sc

[R] Function to tell you how an object is put together

2007-12-10 Thread Thomas L Jones, PhD
Question: Suppose I have an arbitrary object. Is there a function which will accept the object as an argument and sort of give the format of the object, how it is put together, etc.? The analysis would include the attributes and the names of the attributes. Also, things like whether or not the

Re: [R] package "growth" ... where is it ?

2007-12-10 Thread Jim Lemon
Maura E Monville wrote: > Thank you. I have downloaded the compressed package "growth-1.tgz". I have > extracted the archive. But all my attempts to install such a package so that > I can call its functions from R command line ... have failed. > It is not clear to me how to operate the "install.pac

Re: [R] Viewport and grid.draw

2007-12-10 Thread Dieter Menne
Deepayan Sarkar gmail.com> writes: > Try looking at the first example in > http://dsarkar.fhcrc.org/lattice/book/Chapter12-Interaction/edited.R > for inspiration. May I suggest to use instead. Nice. Dieter