Re: [R] Math expressions in pie chart labels?

2006-05-03 Thread Uwe Ligges
Johannes Graumann wrote: ronggui wrote: I think you should use labels = c(= 0.66, = 0.33, = -0.33, = -0.66) . Note the quote in each element of the vector. No. Am using that at the moment. Does not give me the nice plotmath 'greater-than' etc. signs ... Then please read ?plotmath

Re: [R] cannot use fanny in package cluster

2006-05-03 Thread Uwe Ligges
Guan-Hua Huang wrote: Dear All, My R version: 2.0.1 ; OS using: Linux. I install the package cluster by using install.packages(cluster). After install it, it runs fine for function clara, but it does not work for function fanny. I did the following things: library(cluster)

Re: [R] Repeating tdt function on thousands of variables

2006-05-03 Thread Uwe Ligges
Farrel Buchinsky wrote: I am using dgc.genetics to perform TDT analysis on SNP data from a cohort of trios. I now have a file with about 6008 variables. The first few variables related to the pedigree data such as the pedigree ID the person ID etc. Thereafter each variable is a specific

Re: [R] how to compute the explained variance?

2006-05-03 Thread Uwe Ligges
mingyu shi wrote: Hello, I have an ordinary linear regression model. for example y~x1+x2+x3; I need to compute the percentage of variance explained by each covariate. can anyone tell me how I can compute it in R? Please try to solve your homework yourself or by reading a good textbook -

Re: [R] Math expressions in pie chart labels?

2006-05-03 Thread ronggui
Then please read ?plotmath and use it: labels = expression( = 0.66, == 0.33, = -0.33, = -0.66) pie(1:3,lab=) text(locator(3),lab=expression(=1,=2,=3)) Error: attempt to use zero-length variable name text(locator(3),lab=expression(NULL=1,NULL=2,NULL=3)) What 's the problem come from?

Re: [R] How to use a validation set rather than the default cross-validation in rpart() ?

2006-05-03 Thread Uwe Ligges
Quin Wills wrote: I want use a validation set for my classification tree rather than the default 10-fold validation in rpart() but can't see which arguments to use to get this right. Advice appreciated thanks. I assume that this is possible! You cannot for the internal algorithm that

Re: [R] Math expressions in pie chart labels?

2006-05-03 Thread Uwe Ligges
ronggui wrote: Then please read ?plotmath and use it: labels = expression( = 0.66, == 0.33, = -0.33, = -0.66) pie(1:3,lab=) text(locator(3),lab=expression(=1,=2,=3)) Error: attempt to use zero-length variable name text(locator(3),lab=expression(NULL=1,NULL=2,NULL=3)) What

Re: [R] summary.lme: argument adjustSigma

2006-05-03 Thread Christoph Buser
Dear Spencer Thank you for your answer. You are correct. The adjustSigma argument is only used for the ML method. In the code there is: stdFixed - sqrt(diag(as.matrix(object$varFix))) if (object$method == ML adjustSigma == TRUE) { stdFixed - sqrt(object$dims$N/(object$dims$N -

[R] Problem in using confint method on polr model object

2006-05-03 Thread Ulrich Halekoh
I fit a proportional odds model with the polr-function of the MASS package from Venables and Ripley Applying the confint method to calculate confidence intervals for the parameters I get the following error message Waiting for profiling to be done... Re-fitting to get Hessian Error in X[,

Re: [R] compile R on Solaris 9

2006-05-03 Thread Prof Brian Ripley
On Tue, 2 May 2006, Brian O'Gorman wrote: I can't make R on a Solaris 9 box. Does anyone have any suggestions? Thanks in advance. Looks like the effect of some header you are including from Solaris9. Try adding #undef open near the top of src/main/connections.c, after fcntl.h is included.

Re: [R] How to use a validation set rather than the default cross-validation in rpart() ?

2006-05-03 Thread Quin Wills
Many thanks. I'm using it for pruning and was hoping that rpart allows use of a validation set rather than cross-validation for generating a CP/error table. -Original Message- From: Uwe Ligges [mailto:[EMAIL PROTECTED] Sent: 03 May 2006 07:53 To: Quin Wills Cc: r-help@stat.math.ethz.ch

Re: [R] urppTest Z-tau? Z-alpha?

2006-05-03 Thread Pfaff, Bernhard Dr.
Hello Anne, you will find the necessary details in the following paper, its publication in 'Biometrika' is cited in ?ur.pp. http://cowles.econ.yale.edu/P/cp/p07a/p0706.pdf Best, Bernhard Hello, Could someone give me a hint about what might be the difference between running urppTest with

[R] Time series plot

2006-05-03 Thread Dubravko Dolic
Dear Jiang, We do a lot of plots of that sort. At first I read the time values with as.Date(timevariable, format = %d/%m/%Y). Then You can plot along like Plot(as.Date-variable, your target variable, type = l) If You set axes = F than you can customize the xAxis with axis(1, ...) The

[R] demo() output looks garbled in default pager (less and most)

2006-05-03 Thread Ivailo Stoyanov
Dear Rexperts, I have recently build R-2.3.0 from source on a Linux system and have encountered the following problem (perhaps not exactly a problem, but a minor display flaw): demo() +here is how the output looks in less+ Demos in package E28098baseE28099: is.things

[R] Breaking a matrix into parts

2006-05-03 Thread SUMANTA BASAK
Hi, I've a matrix in 20*11 order. There are 11 variables, i.e 11 columns and each variable have 20 row data. Now i want to calculate covariance between any variable with others taking 4 rows at a time, so that there will be 5 blocks. How can i do this using any R-function? If i want to do it in

Re: [R] Breaking a matrix into parts

2006-05-03 Thread Jacques VESLOT
lapply(split(mat, gl(nrow(mat)/4, 4, nrow(mat)), cov) --- Jacques VESLOT CNRS UMR 8090 I.B.L (2ème étage) 1 rue du Professeur Calmette B.P. 245 59019 Lille Cedex Tel : 33 (0)3.20.87.10.44 Fax : 33 (0)3.20.87.10.31

Re: [R] How to use a validation set rather than the default cross-validation in rpart() ?

2006-05-03 Thread Prof Brian Ripley
On Wed, 3 May 2006, Quin Wills wrote: Many thanks. I'm using it for pruning and was hoping that rpart allows use of a validation set rather than cross-validation for generating a CP/error table. Since it is not documented how to, why do you expect to? Indeed, why do you think it would be a

Re: [R] demo() output looks garbled in default pager (less and most)

2006-05-03 Thread Prof Brian Ripley
You are almost certainly using a UTF-8 locale and have the character set for less and/or your terminal set incorrectly. This works exactly as intended on a properly configured Linux system in single-byte and UTF-8 locales. This would be quite inappropriate as a bug report on R. On Wed, 3 May

Re: [R] How to use a validation set rather than the default cross-validation in rpart() ?

2006-05-03 Thread Quin Wills
Is it not true that cross-validation can sometimes over estimate classification error - versus bringing in an external validation data set and checking its classification error? I was trying to test this out, but from what I see either way seems to be much of muchness. -Original Message-

[R] Giving Error

2006-05-03 Thread SUMANTA BASAK
I tried your code, but it's giving the following error.. Error in match.fun(FUN) : argument FUN is missing, with no default __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] how to fit GJR-GARCH model in R

2006-05-03 Thread Fan Steven
Hi,All, I am trying to fit a GJR-GARCH model in R: r_t = mu + e_t h_t = alp_0 + alp_1 * e_(t-1)^2 + alp_2 * s_(t-1) * e_(t-1)^2 + beta * h_(t-1) where r_t = return (on day t), h_t = conditional volatility on day t, and s_(t-1) = 1 if e_(t-1) 0 (zero otherwise). I have downloaded the

Re: [R] Giving Error

2006-05-03 Thread Jacques VESLOT
sorry (need a data.frame) : lapply(split(as.data.frame(mat), gl(nrow(mat)/4, 4, nrow(mat))), cov) --- Jacques VESLOT CNRS UMR 8090 I.B.L (2ème étage) 1 rue du Professeur Calmette B.P. 245 59019 Lille Cedex Tel : 33 (0)3.20.87.10.44

[R] Correlation matrix

2006-05-03 Thread Arun Kumar Saha
Dear R users, Suppose I have a 4*5 data frame like this: Date x1 x2 x3 x4 1/1/2004100 22 12 34 2/1/200433-22 33 12 3/1/20041212 -115 4/1/20041 223 22 1 Now I want to get a correlation matrix

[R] vim R plugin for Linux/Unix

2006-05-03 Thread Johannes Ranke
Dear R users, For those of you who like to use the vim editor on a Unix platform, I put together a little homepage for my vim plugin which is also known as vim script No. 1048, featuring a screenshot: http://www.uft.uni-bremen.de/chemie/ranke/index.php?page=vim_R_linux Have a good day!

Re: [R] Repeating tdt function on thousands of variables

2006-05-03 Thread Farrel Buchinsky
On 5/3/06, Uwe Ligges [EMAIL PROTECTED] wrote: Looks like you have to be much more specific: tdt() is a function within dgc.genetics. dgc.genetics is a package written by David Clayton and available at http://www-gene.cimr.cam.ac.uk/clayton/software/ It consists of extensions to the genetics

Re: [R] Correlation matrix

2006-05-03 Thread Uwe Ligges
Arun Kumar Saha wrote: Dear R users, Suppose I have a 4*5 data frame like this: Date x1 x2 x3 x4 1/1/2004100 22 12 34 2/1/200433-22 33 12 3/1/20041212 -115 4/1/20041 223 22 1 Now I

[R] survival analysis with right and left censoring and time-dependent covariates

2006-05-03 Thread Berta
Hi R-users, I have a data set with a particular type of interval-censored data: right and left censored data, but no other type of interval censoring. I need to fit a model with covariates to evaluate the influence of them on the survival time. First: I use Surv of library(survival) to create

Re: [R] Repeating tdt function on thousands of variables

2006-05-03 Thread Uwe Ligges
Farrel Buchinsky wrote: On 5/3/06, Uwe Ligges [EMAIL PROTECTED] wrote: Looks like you have to be much more specific: tdt() is a function within dgc.genetics. dgc.genetics is a package written by David Clayton and available at http://www-gene.cimr.cam.ac.uk/clayton/software/ It

Re: [R] demo() output looks garbled in default pager (less and most)

2006-05-03 Thread Ivailo Stoyanov
Prof Brian Ripley wrote: You are almost certainly using a UTF-8 locale and have the character set for less and/or your terminal set incorrectly. This works exactly as intended on a properly configured Linux system in single-byte and UTF-8 locales. Thank you very much for the hint! I'll be

Re: [R] Problem in using confint method on polr model object

2006-05-03 Thread Prof Brian Ripley
On Wed, 3 May 2006, Ulrich Halekoh wrote: I fit a proportional odds model with the polr-function of the MASS package from Venables and Ripley Applying the confint method to calculate confidence intervals for the parameters I get the following error message Waiting for profiling to be

Re: [R] survival analysis with right and left censoring and time-dependent covariates

2006-05-03 Thread Thomas Lumley
On Wed, 3 May 2006, Berta wrote: My question is: How could I fit a survival model that include right-left censoring and time-dependent covariates? Not with anything in the survival package, unfortunately. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL

[R] Net courses for R?

2006-05-03 Thread Scott Cunningham
Are there any online courses for learning R? __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] Net courses for R?

2006-05-03 Thread Pfaff, Bernhard Dr.
Hello Scott, see: http://www.statistics.com/content/courses/R/index.html http://www.statistics.com/content/courses/graphicsR/index.html http://www.statistics.com/content/courses/modelingR/index.html there has been a recent posting on this list, if I recall it correctly. Best, B.

[R] Listing Variables

2006-05-03 Thread Farrel Buchinsky
How does one create a vector whose contents is the list of variables in a dataframe pertaining to a particular pattern? This is so simple but I cannot find a straightforward answer. I want to be able to pass the contents of that list to a for loop. So let us assume that one has a dataframe whose

[R] Inverse X'WX matrix from weighted linear regression

2006-05-03 Thread Garbade, Sven
Dear list, how can I compute the inverse of the X'WX matrix (inverse of the weighted sum of squares and crossproducts matrix) from an object of class lm from a weigthed linear regression? Thanks, Sven __ R-help@stat.math.ethz.ch mailing list

[R] Link to useR! 2006 from ww.r-project.org not working

2006-05-03 Thread Pfaff, Bernhard Dr.
I noticed that: http://www.r-project.org/useR-2006/ seems to be inexistent (page not found). Best, Bernhard Dr. Bernhard Pfaff Global Structured Products Group (Europe) Invesco Asset Management Deutschland GmbH Bleichstrasse 60-62 D-60313 Frankfurt am Main Tel: +49(0)69 298 07230 Fax:

Re: [R] Listing Variables

2006-05-03 Thread Marc Schwartz (via MN)
On Wed, 2006-05-03 at 10:46 -0400, Farrel Buchinsky wrote: How does one create a vector whose contents is the list of variables in a dataframe pertaining to a particular pattern? This is so simple but I cannot find a straightforward answer. I want to be able to pass the contents of that list

Re: [R] Listing Variables

2006-05-03 Thread Uwe Ligges
Farrel Buchinsky wrote: How does one create a vector whose contents is the list of variables in a dataframe pertaining to a particular pattern? This is so simple but I cannot find a straightforward answer. I want to be able to pass the contents of that list to a for loop. So let us assume

Re: [R] Listing Variables

2006-05-03 Thread Gabor Grothendieck
Column names in iris that contain the string Sepal: grep(Sepal, names(iris), value = TRUE) On 5/3/06, Farrel Buchinsky [EMAIL PROTECTED] wrote: How does one create a vector whose contents is the list of variables in a dataframe pertaining to a particular pattern? This is so simple but I

Re: [R] Listing Variables

2006-05-03 Thread bogdan romocea
Here's an example. dfr - data.frame(A1=1:10,A2=21:30,B1=31:40,B2=41:50) vars - colnames(dfr) for (v in vars[grep(B,vars)]) print(mean(dfr[,v])) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Farrel Buchinsky Sent: Wednesday, May 03, 2006 10:46 AM

Re: [R] Link to useR! 2006 from ww.r-project.org not working

2006-05-03 Thread Uwe Ligges
Pfaff, Bernhard Dr. wrote: I noticed that: http://www.r-project.org/useR-2006/ seems to be inexistent (page not found). Probably lost during the move of CRAN master. For the meantime use http://www.ci.tuwien.ac.at/Conferences/useR-2006/ Uwe Ligges Best, Bernhard Dr. Bernhard

Re: [R] Inverse X'WX matrix from weighted linear regression

2006-05-03 Thread Dimitris Rizopoulos
I think you need summary(lm.obj)$cov.unscaled 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)16/336899 Fax: +32/(0)16/337015 Web:

[R] how to evaluate logistic model fit the data or not?

2006-05-03 Thread Yuezhou(Jerry) Jing
Dear list, I am new here. often times, I have a question about how to evaluate logistic model fit the data or not, do you guys can help me with some guidence? thanks. Youme -- Yuezhou Jing Center for Human Growth Development University of Michigan ___ ___

Re: [R] Inverse X'WX matrix from weighted linear regression

2006-05-03 Thread Garbade, Sven
exactly! May thanks! -Original Message- From: Dimitris Rizopoulos [mailto:[EMAIL PROTECTED] Sent: Wed 5/3/2006 5:40 PM To: Garbade, Sven Cc: r-help@stat.math.ethz.ch Subject: Re: [R] Inverse X'WX matrix from weighted linear regression I think you need summary(lm.obj)$cov.unscaled I

Re: [R] Listing Variables

2006-05-03 Thread Farrel Buchinsky
Uwe Ligges [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] vnames - paste(Height, 1:20, sep=.) Interesting but not suitable. It creates a name even if such a variable does not exist. I have 6000 variables. The numeric component of the variable name goes from 0 to about 1000.

Re: [R] Math expressions in pie chart labels?

2006-05-03 Thread Johannes Graumann
On Tuesday 02 May 2006 23:33, Uwe Ligges wrote: Then please read ?plotmath and use it: labels = expression( = 0.66, == 0.33, = -0.33, = -0.66) Error in lab != : comparison is not allowed for expressions In addition: Warning message: is.na() applied to non-(list or vector) in: is.na(lab -

Re: [R] Math expressions in pie chart labels?

2006-05-03 Thread Uwe Ligges
Johannes Graumann wrote: On Tuesday 02 May 2006 23:33, Uwe Ligges wrote: Then please read ?plotmath and use it: labels = expression( = 0.66, == 0.33, = -0.33, = -0.66) Error in lab != : comparison is not allowed for expressions In addition: Warning message: is.na() applied to

Re: [R] Link to useR! 2006 from ww.r-project.org not working

2006-05-03 Thread Prof Brian D Ripley
Yes, this has been reported to the webmasters (not really much point in telling a list). cran.r-project.org and www.r-project.org now point at machines at wu-wien.ac.at (the DNS was changed in the last 24 hours). I have also found that rsync is not being allowed through (e.g. for

Re: [R] Math expressions in pie chart labels?

2006-05-03 Thread Gabor Grothendieck
On 5/3/06, Uwe Ligges [EMAIL PROTECTED] wrote: Johannes Graumann wrote: On Tuesday 02 May 2006 23:33, Uwe Ligges wrote: Then please read ?plotmath and use it: labels = expression( = 0.66, == 0.33, = -0.33, = -0.66) Error in lab != : comparison is not allowed for expressions

Re: [R] Math expressions in pie chart labels?

2006-05-03 Thread Uwe Ligges
Gabor Grothendieck wrote: On 5/3/06, Uwe Ligges [EMAIL PROTECTED] wrote: Johannes Graumann wrote: On Tuesday 02 May 2006 23:33, Uwe Ligges wrote: Then please read ?plotmath and use it: labels = expression( = 0.66, == 0.33, = -0.33, = -0.66) Error in lab != : comparison is

Re: [R] Math expressions in pie chart labels?

2006-05-03 Thread Johannes Graumann
Uwe Ligges wrote: Johannes Graumann wrote: On Tuesday 02 May 2006 23:33, Uwe Ligges wrote: Then please read ?plotmath and use it: labels = expression( = 0.66, == 0.33, = -0.33, = -0.66) Error in lab != : comparison is not allowed for expressions In addition: Warning message:

Re: [R] Math expressions in pie chart labels?

2006-05-03 Thread Johannes Graumann
On Wednesday 03 May 2006 09:05, Uwe Ligges wrote: Ah, I see, this happens in pie()'s line: if (!is.na(lab - labels[i]) lab != ) { where lab is one element of the expression. I'd like to propose to change that line to if (!is.na(lab - labels[i]) nchar(lab) 0) { What's the

Re: [R] Math expressions in pie chart labels?

2006-05-03 Thread Prof Brian Ripley
Maybe because ?pie says labels: a vector of character strings giving names for the slices. For empty or NA labels, no pointing line is drawn either. Note, nothing about expressions pie() contains if (!is.na(lab - labels[i]) lab != ) { and so it would be easy to

Re: [R] garch in tseries

2006-05-03 Thread Spencer Graves
Dear Erin: The documentation for my currently installed version of garchFit{fSeries} indicates that the default include.mean = TRUE. How do you know it didn't work? With the default include.mean = TRUE, the following took just under a minute on my IBM T-30 notebook:

[R] sprintf question

2006-05-03 Thread Paul Roebuck
How would one go about getting sprintf to use the values of a vector without having to specify each argument individually? v - c(1, 2, -1.197114, 0.1596687) iv - c(3, 1, 2, 4) sprintf(%9.2f\t%d\t%d\t%8.3f, v[3], v[1], v[2], v[4]) [1] -1.20\t1\t2\t 0.160 Essentially, desired effect would

Re: [R] Math expressions in pie chart labels?

2006-05-03 Thread Prof Brian Ripley
On Wed, 3 May 2006, Johannes Graumann wrote: On Wednesday 03 May 2006 09:05, Uwe Ligges wrote: Ah, I see, this happens in pie()'s line: if (!is.na(lab - labels[i]) lab != ) { where lab is one element of the expression. I'd like to propose to change that line to if (!is.na(lab -

[R] Nested model and variance partitioning

2006-05-03 Thread poulet
Dear R users, I face to a nested pattern and despite the numerous examples in the help I am still confused. I sampled bugs in different habitats within sites which were within rivers themselves within different regions. The habitat correspond to different substrata (not systematically

Re: [R] sprintf question

2006-05-03 Thread Gabor Grothendieck
Try this: do.call(sprintf, c(%9.2f\t%d\t%d\t%8.3f, as.list(v[iv]))) On 5/3/06, Paul Roebuck [EMAIL PROTECTED] wrote: How would one go about getting sprintf to use the values of a vector without having to specify each argument individually? v - c(1, 2, -1.197114, 0.1596687) iv - c(3, 1,

Re: [R] garch in tseries

2006-05-03 Thread Spencer Graves
Dear Erin: I just realized I had misread your question. Have you tried sending your question directly to the 'tseries' maintainer, listed with help(package=tseries)? While I misread your question earlier, it looks to me like you could get what you want by first

Re: [R] Making R talk to Win/OpenBUGS in Linux (again)

2006-05-03 Thread Uwe Ligges
Finally fixed for the next release - and will also include the bugsLog() stuff as well. Best, Uwe Gregor Gorjanc wrote: Hello Paul, thank you very much for this report. You caught a bug in R2WinBUGS that was introduced by me. I added support for winepath in 1.1-1 version. Since I switch

Re: [R] sprintf question

2006-05-03 Thread Greg Snow
You could finagle things with do.call (maybe right your own function that does this if you will use it often). Here is your example: v - c(1, 2, -1.197114, 0.1596687) iv - c(3, 1, 2, 4) tmp - c(list(%9.2f\t%d\t%d\t%8.3f),as.list(v[iv])) do.call('sprintf',tmp) [1] -1.20\t1\t2\t 0.160

Re: [R] sprintf question

2006-05-03 Thread Duncan Murdoch
On 5/3/2006 12:31 PM, Paul Roebuck wrote: How would one go about getting sprintf to use the values of a vector without having to specify each argument individually? v - c(1, 2, -1.197114, 0.1596687) iv - c(3, 1, 2, 4) sprintf(%9.2f\t%d\t%d\t%8.3f, v[3], v[1], v[2], v[4]) [1]

[R] factor to real - best way to convert

2006-05-03 Thread Knut Krueger
I have got factor from read.xls: is(factor_value) [1] factor oldClass [288] -0.32 0.180.180.18-0.32 0.180.68 [295] 0.680.18 43 Levels: -0.05 -0.13 -0.15 -0.18 -0.20 -0.26 ... 1.33 If I am using the funciton as.real(factor_value) I get [271] 17

[R] function to replace missing values with median value?

2006-05-03 Thread r user
I have a data set with ~10 variables (i.e. columns). I wrote this little function to replace missing values with zero. “ sz - function(x) { ifelse(is.na(x)==F,x,0) } “ Can anyone help with a function that replaces missing values with the median of the non-missing values?

Re: [R] function to replace missing values with median value?

2006-05-03 Thread Gabor Csardi
sz - function(x) ifelse(is.na(x), median(x, na.rm=TRUE), x) Gabor On Wed, May 03, 2006 at 10:06:40AM -0700, r user wrote: I have a data set with ~10 variables (i.e. columns). I wrote this little function to replace missing values with zero. “ sz - function(x) { ifelse(is.na(x)==F,x,0)

Re: [R] factor to real - best way to convert

2006-05-03 Thread Gabor Grothendieck
You can use as.is = TRUE arg to read.xls to get character data rather than factors. On 5/3/06, Knut Krueger [EMAIL PROTECTED] wrote: I have got factor from read.xls: is(factor_value) [1] factor oldClass [288] -0.32 0.180.180.18-0.32 0.180.68 [295] 0.680.18

Re: [R] Math expressions in pie chart labels?

2006-05-03 Thread Ben Bolker
Prof Brian Ripley ripley at stats.ox.ac.uk writes: On Wed, 3 May 2006, Johannes Graumann wrote: What's the canonical way of patching something like this in R? Redefining the function at the start of your script? There are namespace issues, so the canonical way is to change the

Re: [R] lme: how to compare random effects in two subsets of data

2006-05-03 Thread Laurent Fanchon
I thank you for your answer. It was really helpful. I purchased Pinheiro and Bates last year for the reasons you mentionned. I checked Sec. 5.2 and think I might use the following : model.var - update(model2,weights=varIdent(form=~1|Limb)) which gives : Variance function: Structure: Different

[R] SAM analysis fold change output

2006-05-03 Thread Nikhil Garge
Dear R users, I am have a question on SAM analysis - two class unpaired. I am not sure how exactly SAM calculates the fold change for logged2 transformed data. The output produced by SAM - rbind(siggenes.table$genes.up,siggenes.table$genes.lo) - has numerator, denominator, d-statistic, fold

Re: [R] Math expressions in pie chart labels?

2006-05-03 Thread Gabor Grothendieck
As a workaround you could use pie3D in the plotrix package with height=0 and theta=pi, e.g. library(plotrix) pie3D(1:3, height = 0, theta = pi, labels = expression( = 1, == 2, = 3)) On 5/3/06, Johannes Graumann [EMAIL PROTECTED] wrote: On Wednesday 03 May 2006 09:05, Uwe Ligges wrote:

[R] Vector searching and counting speed optimization

2006-05-03 Thread Eric Archer
R-users, I'm seeking any suggestions on optimizing some code for speed. Here's the setup: the code below is part of a larger chunk that is calculating Fst values across loci and alleles. This chunk is designed to calculate the proportion ('p.a') of an allele ('a') at a locus in each

Re: [R] Vector searching and counting speed optimization

2006-05-03 Thread Richard M. Heiberger
sum() looks faster to me tmp - as.logical(rbinom(100,1,.5)) system.time(for (i in 1:1) length(tmp[tmp])) [1] 0.09 0.00 0.09 NA NA system.time(for (i in 1:1) sum(tmp)) [1] 0.03 0.00 0.03 NA NA I am running on Windows XP Sys.getenv()[20]

[R] Permutation test of marked point pattern

2006-05-03 Thread Jean-Francois Savard
Dear R users, I am trying to perform a hypothesis test on a marked point pattern. I would like to calculate the mean of the absolute value of the difference of marks between nearest neigbours, randomize the marks among points, then calculate this mean again. Ideally, I would test whether random

[R] Installation problem

2006-05-03 Thread Shinhan Shiu
I am trying to install R-2.3.0 on a 64bit linux box and encounter several error during the make step. I'd appreciate any help. Error messages follow: [EMAIL PROTECTED] R-2.3.0]# make make[4]: Entering directory `/state/partition1/apps/packages/R-2.3.0/src/modules/lapack' gcc -shared

Re: [R] Vector searching and counting speed optimization

2006-05-03 Thread Eric Archer
Richard, Thanks! I never would've thought of using sum() to count the TRUEs in a logical vector, but it makes perfect sense. Cheers, e. Richard M. Heiberger wrote: sum() looks faster to me tmp - as.logical(rbinom(100,1,.5)) system.time(for (i in 1:1) length(tmp[tmp])) [1]

[R] Aggregate?

2006-05-03 Thread Guenther, Cameron
Hello, I have a data set with a grouping variable (TRIPID) and several other variables. TRIPID is repeated in some areas and I would like to use a function like aggregate to sum the variable UNITS according to TRIPID. However I would also like to retain the other variables as they are in the

Re: [R] Installation problem

2006-05-03 Thread Prof Brian Ripley
As it says, your ATLAS library has not compiled for use in a shared object. This is discussed in the R-admin manual which you were asked to read (in the INSTALL file) if you have any problems. You don't even tell us what Linux distro this is. Try configuring with --without-blas. On Wed, 3

Re: [R] Aggregate?

2006-05-03 Thread Gabor Grothendieck
Suppose we want to sum C over levels of A and that B is constant within levels of A. Then: DF - data.frame(A = gl(2,2), B = gl(2,2), C = 1:4) # test data do.call(rbind, by(DF, DF$A, function(x) replace(x[1,], C, sum(x$C On 5/3/06, Guenther, Cameron [EMAIL PROTECTED] wrote: Hello, I

[R] mca id numbers

2006-05-03 Thread Carlos Mauricio Cardeal Mendes
Is it possible to make disappear the id numbers from scatter.dudi (mc analysis) ? a - as.factor(c(1, 2, 3, 2, 1)) b - as.factor(c(3, 2, 3, 1, 1)) x - as.factor(c(1, 2, 2, 1, 3)) y - as.factor(c(2, 2, 3, 1, 1)) dat - data.frame(a=a, b=b,x=x,y=y) summary(dat) dat require(ade4) dat.acm -

[R] Test if an image or random field is stationary

2006-05-03 Thread Lu Yuefeng
Hi List, I want to know how to test whether an image or generally a random field, is stationary. I am sure there are a lot of intuitive ways to do this but right now I need a formal test which can gives the p-value. And any of those tests already implemented in R? Thanks a lot! Yuefeng

[R] Outreg-like command?

2006-05-03 Thread Thomas Davidoff
It would be nice to have something like stata's outreg that lets regression output go into a form like Specification (1) Specification (2) Var 1 coef(1,1) coef(1,2) se(1,1) se(1,2) Var 2 coef(2,1) coef(2,2) se(2,1)

Re: [R] using GDD fonts

2006-05-03 Thread Luiz Rodrigo Tozzi
Hi After a little work i found a way of using near 8bit color output in GDD. I edited the GDD/src/GDDtalk.c file... There was this loop: if (!strcmp(it, png8)) { if (nl3 strcmp(fn+nl-4,.png)) strcat(fn, .png); out = fopen (fn, wb); if

Re: [R] Outreg-like command?

2006-05-03 Thread Richard M. Heiberger
I think this is what you are asking for. It would be relatively easy to package this into a function that takes a list of lm objects as its argument. tmp - data.frame(matrix(rnorm(100), 25, 4)) names(tmp) - c(y,x1,x2,x3) t1.lm - lm(y ~ x1, data=tmp) t2.lm - lm(y ~ x2, data=tmp) t3.lm - lm(y ~

[R] install R under suse: packages dependency

2006-05-03 Thread zhihua li
Hi all I'm trying to install R 2.3.0 under Suse 10.0. As I'm using SSH to login into the SUSE server, I can't use YAST2, so I have to use rpm -i in the shell. The system tells me that I need some other packages such as xorg-x11-fonts-100dpi, blas, libgfortran.so.0(). Is there some website

Re: [R] install R under suse: packages dependency

2006-05-03 Thread François Pinard
[zhihua li] I'm trying to install R 2.3.0 under Suse 10.0. As I'm using SSH to login into the SUSE server, I can't use YAST2, I presume this is because you cannot remotely mount the CD's or DVD's? The next time you visit your server, if possible, copy your distribution media to your hard

Re: [R] install R under suse: packages dependency

2006-05-03 Thread zhihua li
Thanks for your tips. But I don't understand why coping the distribution media to the server's hard disks would enable me to use yast2 remotely with ssh? Actually I can launch yast2 remotely now. After connecting to the remote server by ssh and then typing yast2, a yast interface will appear

Re: [R] how to evaluate logistic model fit the data or not?

2006-05-03 Thread Augusto.Sanabria
Youme, The question has been asked before, you can have a look at the R archives for that issue using: RSiteSearch(logistic goodness of fit). Last time I did this, the command found some 53 entries! Hope it helps, Augusto Augusto Sanabria. MSc,

Re: [R] install R under suse: packages dependency

2006-05-03 Thread Larry Howe
On Wednesday 03 May 2006 20:28, zhihua li wrote: Hi all I'm trying to install R 2.3.0 under Suse 10.0. As I'm using SSH to login into the SUSE server, I can't use YAST2, so I have to use rpm -i in the shell. The system tells me that I need some other packages such as

Re: [R] Repeating tdt function on thousands of variables

2006-05-03 Thread Farrel Buchinsky
Uwe Ligges ligges at statistik.uni-dortmund.de writes: The same way. lapply() and sapply() should work for almost all functions given, if nothing strange happens with environemnts, which is the case here: The problem is tdt() itself. Note that it has its argument data set to

Re: [R] install R under suse: packages dependency

2006-05-03 Thread zhihua li
Larry I tried using yast in my shell ( i have the root authority). The yast ncurses did appear in my shell, but i can't control the panel. For example, it says press F1 for help, but pressing my F1 just resulted in decrease of my screen light (the default function of the F1 key in mac). So

Re: [R] install R under suse: packages dependency

2006-05-03 Thread Larry Howe
Zhihua, In Linux you use the tab key to move from field to field, or you can go alt-O for example to hit the OK button. Windows is similar. You need the suse installation source to be configured so that it can load the dependent packages (libgfortran, etc.). Larry On Wednesday 03 May 2006

Re: [R] measuring goodness of fit in quantile regression

2006-05-03 Thread Tanya O'Garra
Hello, Does anybody know how to calculate local goodness of fit at the different quantiles of a censored quantile regression? I suppose I am looking to see if there is a specific command in R for this... Thanks for your help, Tanya __

[R] Repeating tdt function on thousands of variables

2006-05-03 Thread David Duffy
I am using dgc.genetics to perform TDT analysis on SNP data from a cohort of trios. I now have a file with about 6008 variables. The first few variables related to the pedigree data such as the pedigree ID the person ID etc. Thereafter each variable is a specific locus or marker. The

[R] a clipboard problem while using R2HTML

2006-05-03 Thread Frank Liu
I followed the examples of previous posts about R2HTML to practice exporting a data to a clipboard, but the result is not as smooth as I had expected: library(R2HTML) data(iris) HTML(iris, file(clipboard,w), append=FALSE) I got an error message: HTML(iris, file(clipboard,w), append=FALSE)

[R] New-user support package - suggestions?

2006-05-03 Thread Andrew Robinson
Dear Community, This is largely a repost with some new information. I'm interested in developing a package that could ease the command-line learning curve for new users. It would provide more detailed syntax checking and commentary as feedback. It would try to anticipate common new-user

[R] [Re:] function to replace missing values with median value?]]

2006-05-03 Thread [EMAIL PROTECTED]
The following should work sz - function(x) { ifelse(is.na(x) == F, x, median(x, na.rm=TRUE)) } best, isaia. Original Message Subject: [R] function to replace missing values with median value? Date: Wed, 3 May 2006 10:06:40 -0700 (PDT) From: r user [EMAIL PROTECTED] To: rhelp

[R] R: [Re:] function to replace missing values with median value?]]

2006-05-03 Thread Guazzetti Stefano
there is also a replace function -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] conto di [EMAIL PROTECTED] Inviato: Thursday, May 04, 2006 07:31 AM A: [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Oggetto: [R] [Re:] function to replace