[R] global object in user defined function

2007-10-09 Thread Murray Pung
I need an object created in a user defined function to be accessible to another user defined function. I am fairly certain the object is correctly created as it prints when I use the return() function, however the 2nd function seems unable to use it. I am guessing objects created in functions are

Re: [R] silhouette: clustering labels have to be consecutive intergers starting

2007-10-09 Thread Tao Shi
Thank you very much, Benilton and Prof. Ripley, for the speedy replies! Looking forward to the fix! Tao >From: Prof Brian Ripley <[EMAIL PROTECTED]> >To: Benilton Carvalho <[EMAIL PROTECTED]> >CC: Tao Shi <[EMAIL PROTECTED]>, [EMAIL PROTECTED], >r-help@r-project.org >Subject: Re:

[R] Studentized maximum distribution

2007-10-09 Thread dt Excellent
Has anyone written a function to find the quantiles for the studentized maximum distribution, and the studentized maximum modulus distribution? Thanks for any help. Kostas - [[alternative HTML version deleted]] _

Re: [R] silhouette: clustering labels have to be consecutive intergers starting from 1?

2007-10-09 Thread Prof Brian Ripley
It is a C-level problem in package cluster: valgrind gives ==11377== Invalid write of size 8 ==11377==at 0xA4015D3: sildist (sildist.c:35) ==11377==by 0x4706D8: do_dotCode (dotcode.c:1750) This is a matter for the package maintainer (Cc:ed here), not R-help. On Tue, 9 Oct 2007, Benilton

Re: [R] R dynamic memory management

2007-10-09 Thread Prof Brian Ripley
On Tue, 9 Oct 2007, Maura E Monville wrote: > I have a loop that processes all the raw data files in agiven directory. > It should allocate only the memory to accomodate the filenames list. Without seeeing the script (see the footer of this and every R-help message, including the second copy you

Re: [R] silhouette: clustering labels have to be consecutive intergers starting from 1?

2007-10-09 Thread Benilton Carvalho
that happened to me with R-2.4.0 (alpha) and was fixed on R-2.4.0 (final)... http://tolstoy.newcastle.edu.au/R/e2/help/06/11/5061.html then i stopped using... now, the problem seems to be back. The same examples still apply. This fails: require(cluster) set.seed(1) x <- rnorm(100) g <- samp

[R] silhouette: clustering labels have to be consecutive intergers starting from 1?

2007-10-09 Thread Tao Shi
Hi list, When I was using 'silhouette' from the 'cluster' package to calculate clustering performances, R crashed. I traced the problem to the fact that my clustering labels only have 2's and 3's. when I replaced them with 1's and 2's, the problem was solved. Is the function purposely writt

Re: [R] regression by groups

2007-10-09 Thread Henrique Dallazuanna
Try this also: lapply(df[,which(sapply(df, is.factor))], function(reg)lm(df$x~reg)) On 09/10/2007, Jiong Zhang, PhD <[EMAIL PROTECTED]> wrote: > > Hi All, > > I want to run regression (lm) on my dependant variable by gender and race. > How do I integrate the "by" function in lm? > > thanks. > > j

Re: [R] regression by groups

2007-10-09 Thread Chuck Cleland
Jiong Zhang, PhD wrote: > Hi All, > > I want to run regression (lm) on my dependant variable by gender and race. > How do I integrate the "by" function in lm? > > thanks. Here is an example using the iris data: by(iris, iris$Species, function(x){ summary(lm(Sepal.Length ~ Sepal.Width +

[R] regression by groups

2007-10-09 Thread Jiong Zhang, PhD
Hi All, I want to run regression (lm) on my dependant variable by gender and race. How do I integrate the "by" function in lm? thanks. jiong The email message (and any attachments) is for the sole...{{dropped:11}} __ R-help@r-project.org mailing lis

Re: [R] 2 Sample Confidence Interval - Formatting Data?

2007-10-09 Thread Marc Schwartz
On Tue, 2007-10-09 at 18:37 -0400, Wayne Aldo Gavioli wrote: > > Hello all, > > I have to run a 2 Sample Confidence Interval on some data; the command for > such > intervals is "confint(...)", but in the help documentation it says that you > need a "fitted model object" in order to run this comm

Re: [R] 2 Sample Confidence Interval - Formatting Data?

2007-10-09 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Wayne Aldo Gavioli > Sent: Tuesday, October 09, 2007 3:37 PM > To: [EMAIL PROTECTED] > Subject: [R] 2 Sample Confidence Interval - Formatting Data? > > > > Hello all, > > I have to run a 2 Sample Co

Re: [R] Summary vs fivenum results for Q3

2007-10-09 Thread Thomas Lumley
On Tue, 9 Oct 2007, Schaefer, Robert L. Dr. wrote: > I've just started using R and am still a neophyte, but I found the > following curious result. I'm using the current version of R (2.5.1 > (2007-06-27) ). > > Why are the results for the third quartile different in the output from > the summ

[R] R dynamic memory management

2007-10-09 Thread Maura E Monville
I have a loop that processes all the raw data files in agiven directory. It should allocate only the memory to accomodate the filenames list. Each file is loaded into RAM one at a time and saved to another directory after processing. The R script runs fine but it had some memory problems so it was

[R] 2 Sample Confidence Interval - Formatting Data?

2007-10-09 Thread Wayne Aldo Gavioli
Hello all, I have to run a 2 Sample Confidence Interval on some data; the command for such intervals is "confint(...)", but in the help documentation it says that you need a "fitted model object" in order to run this command. What does that mean? The data is very small, it's: x=c(8,12,10,14,2

Re: [R] how to use \Sexpr{} with sweave

2007-10-09 Thread cryan
Just goes to show, it helps to search the archives! I discovered this in the R-help archives: https://stat.ethz.ch/pipermail/r-help/2004-July/053920.html And similarly, in the Sweave manual: "A.16 After loading package R2HTML Sweave doesn’t work properly! Package R2HTML registers an Sweave dri

Re: [R] How put description under the graph (using different lines)

2007-10-09 Thread Greg Snow
How does it not work? The following produces a graph that looks like your drawing. > layout( rbind(1,2,c(3,4)), heights = c(2,.5,.5) ) > plot(1:10) > library(gplots) > textplot('Descrip. A', cex=1) > textplot('Descrip. B', cex=1, col='red') > textplot('Descrip. C', cex=1, col='red') -- Grego

Re: [R] Visualize cox proportional hazards

2007-10-09 Thread Christos Hatzis
There are at least a couple of versions of such plots. Search for forest plots: help.search("forest plot") -Christos Christos Hatzis, Ph.D. Nuvera Biosciences, Inc. 400 West Cummings Park Suite 5350 Woburn, MA 01801 Tel: 781-938-3830 www.nuverabio.com > -Original Message- > From: [E

Re: [R] window (x,y) co-ordinates of datapoints

2007-10-09 Thread Greg Snow
Look at the cnvrt.coords function in the TeachingDemos package, it does this type of thing for you. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTE

[R] Visualize cox proportional hazards

2007-10-09 Thread Armin Goralczyk
Hello all I would like to visualize the hazard ratios of a cox proportional hazards model. I have seen some good examples in the New England Journal of Medicine: http://content.nejm.org/cgi/content/short/353/26/2747/F3 http://content.nejm.org/cgi/content/short/350/26/2654/F2 (I hope these are op

Re: [R] bug: wireframe and tcltk

2007-10-09 Thread Peter Dalgaard
Lafaye de Micheaux Pierre wrote: > Dear R users, > > When i call the wireframe function from within a tcltk widget, it does > not work. > > Here is a sample program that shows the bug. > > When you try: > is.it.a.bug() > > You can see that the "curve" instruction is run but not the > "wireframe"

[R] weighted symmetric estimator

2007-10-09 Thread Martin Ivanov
Dear R users, Has anyone implemented the weighted symmetric estimator, as inaugurated by Park,H. J. and Fuller,W. A,"Alternative estimators and unit root tests for the autoregressive process"? Is there a package that supports such estimation? Any idea how to perform it it R? Regards, Martin Iv

[R] Multivariate chi-square distribution function

2007-10-09 Thread aminzoll
Dear All, Is there any function in R for computing "multivariate chi-square distribution"? How about "multivariate gamma distribution"? I appreciate any comment on this subject. Thank you, Amin Zollanvari PhD student Department of Electrical and Computer Engineering, Texas A&M University, Coll

Re: [R] bug: wireframe and tcltk

2007-10-09 Thread Sundar Dorai-Raj
Lafaye de Micheaux Pierre said the following on 10/9/2007 1:21 PM: > Dear R users, > > When i call the wireframe function from within a tcltk widget, it does > not work. > > Here is a sample program that shows the bug. > > When you try: > is.it.a.bug() > > You can see that the "curve" instru

Re: [R] continue for loop in case of erros

2007-10-09 Thread Gabor Grothendieck
It might be an idea to add Katherine Mullen's answer earlier in this thread to the FAQ too. https://stat.ethz.ch/pipermail/r-help/2007-October/142807.html On 10/9/07, Thomas Lumley <[EMAIL PROTECTED]> wrote: > > It's a FAQ: 7.32. > >-thomas > > On Tue, 9 Oct 2007, Irene Mantzouni wrote

[R] bug: wireframe and tcltk

2007-10-09 Thread Lafaye de Micheaux Pierre
Dear R users, When i call the wireframe function from within a tcltk widget, it does not work. Here is a sample program that shows the bug. When you try: is.it.a.bug() You can see that the "curve" instruction is run but not the "wireframe" one. Do you have an explanation about this point?

Re: [R] continue for loop in case of erros

2007-10-09 Thread Thomas Lumley
It's a FAQ: 7.32. -thomas On Tue, 9 Oct 2007, Irene Mantzouni wrote: > Dear all, > > I have a for loop which includes nls model estimation. > The loop breaks after the first non-convergence error. > How can I make the loop continue and try to estimate all models? > I suppose it should b

Re: [R] Linux editor for R+LaTeX, but not Emacs

2007-10-09 Thread Patrick Connolly
On Tue, 09-Oct-2007 at 11:28AM +0200, Scionforbai wrote: [...] |> Ok, so I am not the only one. Yes, I am using an old laptop with just |> 256M of ram, archlinux on it. Ess output it's just too slow, it gets |> me nervous. Is there a way to disable the syntax highlighting in the R In my version

Re: [R] How to create something between a script and a package

2007-10-09 Thread Rolf Turner
IMHO: When in doubt (or even when not) --- create a package. It's not that hard, and it focuses the mind wondrously. Particularly writing help files for the functions that you create. cheers, Rolf Turner

Re: [R] Read in date fomat while colClasses="character"

2007-10-09 Thread Hans-Peter
> > I am using xlsReadWrite to read a particular excel file. In one of the > columns I have dates ( say col=5). Now date column is read by default as > numeric. So I used dateTimeAs= "isodatetime". This enables reading in > the date format. dateTimeAs= "isodatetime" reads and converts the dates i

Re: [R] How put description under the graph (using different lines)

2007-10-09 Thread akki
Thank you very much, Grew. It help me a lot, but I still have a doubt. How can I reduce the height between layout. I try something as: layout( rbind( 1,2,c(3,4)), height=c( 2, 0.5, 0.5)), but I don't achieve reduce it. For example, I need a something as: *--

Re: [R] variance explained by each term in a GAM

2007-10-09 Thread Julian Burgos
Thanks again for your answer, prof. Wood. And my apologies for the list for my repeated message from yesterday. Still trying to figure out what happened with my email software. Julian Simon Wood wrote: > I think that your approach is reasonable, except that you should use the same > smoothing

Re: [R] Handling two lists of matrices

2007-10-09 Thread Marc Schwartz
On Tue, 2007-10-09 at 13:34 -0400, Bornman, Daniel M wrote: > I'm having trouble setting up the function call to handle two lists of > matrices. Each list has 6 matrices - Each matrix is 20x10. I need to > do some basic math on corresponding matrices in each list. > > Here are some outputs of th

[R] Handling two lists of matrices

2007-10-09 Thread Bornman, Daniel M
I'm having trouble setting up the function call to handle two lists of matrices. Each list has 6 matrices - Each matrix is 20x10. I need to do some basic math on corresponding matrices in each list. Here are some outputs of these lists, etc... # first list > length(qc.pm) [1] 6 > dim(qc.pm[[1]]

[R] Help with gamm errors

2007-10-09 Thread Rob Robinson
Dear All Hopefully someone out there can point out what I am missing! I have a (large, several hundred) dataset of gardens in which over two years the presence/absence of a particular bird species is noted each week. I have good reason to believe there is a difference between the two years in the

Re: [R] continue for loop in case of erros

2007-10-09 Thread Katharine Mullen
It is also possible to pass the control argument of nls "warnOnly=TRUE", which indicates that an object should be returned if stopping criteria are met (e.g., reaching a max. number of iterations). See help(nls.control) for more info. On Tue, 9 Oct 2007, Irene Mantzouni wrote: > Thank you all! >

Re: [R] window (x,y) co-ordinates of datapoints

2007-10-09 Thread Prof Brian Ripley
On Tue, 9 Oct 2007, hadley wickham wrote: > On 10/9/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: >> On Tue, 9 Oct 2007, Alberto Monteiro wrote: >> >>> >>> Prof Brian Ripley wrote: Read ?par and the descriptiuon in 'An Introduction to R'. "din", "fin", "mai", "omi", "pin" and "

Re: [R] lattice/xyplot: horizontal y-axis labels with scales(relation="free")

2007-10-09 Thread Rafael Duarte
For y-axis only: xyplot(Sepal.Length ~ Sepal.Width | Species, data=iris, scales=list(y=list(relation="free", rot=0))) Andreas Krause wrote: >I would like to create an xyplot with varying y-axis limits and horizontal >labels at the y-axis tickmarks. >The following does not seem to work, althoug

Re: [R] as.ordered

2007-10-09 Thread Birgit Lemcke
Hello Gavin, I am so sorry that I haven´t read your mail accurately. Now I tried all and it works very well and is exactly what I need. Many thanks for your help. And also many thanks to all the other people helping me. Greetings Birgit Am 09.10.2007 um 17:38 schrieb Gavin Simpson: > On Tue

[R] Fwd: Summary vs fivenum results for Q3

2007-10-09 Thread roger koenker
You can get anything you want, at Alice's Restaurant: > quantile(d,.75,type=1) 75% 913 > quantile(d,.75,type=2) 75% 981.5 > quantile(d,.75,type=3) 75% 913 > quantile(d,.75,type=4) 75% 913 > quantile(d,.75,type=5) 75% 981.5 > quantile(d,.75,type=6) 75% 1015.75 > quantile(d,.75,typ

[R] 00LOCK error on site-library

2007-10-09 Thread Mark W Kimpel
I am experiencing an OOLOCK error when attempting to update packages to my site-library. I have an identical setup on my local Linux machine, but this problem on the remote Linux machine (PPC cluster) started about 3 weeks ago and is present whether I used R-devel or R-2.6.0 or R-2.5.1. Also, o

Re: [R] continue for loop in case of erros

2007-10-09 Thread Irene Mantzouni
Thank you all! Yes, try works! __ 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 provide commented, minimal, self-contained, reproducible cod

Re: [R] continue for loop in case of erros

2007-10-09 Thread Henrique Dallazuanna
Hi, See ?try On 09/10/2007, Irene Mantzouni <[EMAIL PROTECTED]> wrote: > > Dear all, > > I have a for loop which includes nls model estimation. > The loop breaks after the first non-convergence error. > How can I make the loop continue and try to estimate all models? > I suppose it should be sth

Re: [R] continue for loop in case of erros

2007-10-09 Thread Benilton Carvalho
take a look at the try() command. b On Oct 9, 2007, at 11:41 AM, Irene Mantzouni wrote: > Dear all, > > I have a for loop which includes nls model estimation. > The loop breaks after the first non-convergence error. > How can I make the loop continue and try to estimate all models? > I suppose it

Re: [R] A rebel boxplot question

2007-10-09 Thread p.valdes
Rolf Turner wrote >Your example is a bit confusing --- Sorry, maybe I can provide a better example above of what I want. > ``add'' and ``col'' do not seem to be arguments for boxplot(). Are you sure? ;-) Maybe you could want to take a look to this: clyde <- rnorm(100) melvin <- sample(

[R] Plotting two distance matrices

2007-10-09 Thread Muri Soares
Hi all, I'm trying to plot two distance matrices against each other (74x74,phylogenetic distance and phenotypic distances). However R gives an error message:"Error in plot.new() : figure margins too large". Is it because I have too many points to plot? Thanks in advance, Muri _

Re: [R] problem with lower, upper triangles and diagonal

2007-10-09 Thread Birgit Lemcke
Hello Fernando, I have two problems with you suggestion: First what I get back if I use lowerTriangle is this: (f2.low<-lowerTriangle(f2, diag = TRUE)) [1] 0 1 1 1 1 0 1 0 0 1 1 1 1 1 0 But I need a triangle and I need an object of class dist to use afterwards the mantel.rtest function. So I

[R] continue for loop in case of erros

2007-10-09 Thread Irene Mantzouni
Dear all, I have a for loop which includes nls model estimation. The loop breaks after the first non-convergence error. How can I make the loop continue and try to estimate all models? I suppose it should be sth like: if(...) { next } but I have no idea how to setup the arguements... Thank yo

[R] skill scores

2007-10-09 Thread Gianni Messeri
Hi, I'm a new R-user. I want to use some skill scores for weather forecast purpose. Are there packages or functions in R with some skill scores (POD, FAR, TSS, CSI, HEIDKE, ecc)? Thanks in advance Gianni -- Gianni Messeri La.M.M.A (Laboratorio Meteorologia e Modellistica Ambientale) CNR-IBIMET (

Re: [R] as.ordered

2007-10-09 Thread Gavin Simpson
On Tue, 2007-10-09 at 17:12 +0200, Birgit Lemcke wrote: > Hello Gavin, > > thanks for your answer. > > Answering to your sort.list a data frame. I tried to convert it to a > vector but it was also not successful: > > bract.awnMin<-as.vector(bract.awnMin) Why did you expect that to work? I gue

Re: [R] identify number of sequences from a vector

2007-10-09 Thread Ravi Varadhan
Try: help.search("run") Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Division of Geriatric Medicine and Gerontology Johns Hopkins University Ph: (410) 502-2619 Fax: (410)

Re: [R] Summary vs fivenum results for Q3

2007-10-09 Thread Ravi Varadhan
Please read the relevant help pages: ?fivenum ?boxplot.stats Hint: Length of your data vector is an "even" number. Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Division of Ge

Re: [R] Summary vs fivenum results for Q3

2007-10-09 Thread Ken Knoblauch
Schaefer, Robert L. Dr. muohio.edu> writes: > I've just started using R and am still a neophyte, but I found the following curious result. I'm using the > current version of R (2.5.1 (2007-06-27) ). > > Why are the results for the third quartile different in the output from the summary and f

[R] Summary vs fivenum results for Q3

2007-10-09 Thread Schaefer, Robert L. Dr.
I've just started using R and am still a neophyte, but I found the following curious result. I'm using the current version of R (2.5.1 (2007-06-27) ). Why are the results for the third quartile different in the output from the summary and fivenum commands? For the following data set 457 5

Re: [R] identify number of sequences from a vector

2007-10-09 Thread roger koenker
this seems to be a good candidate for a \concept{} entry since it is it is not found by help.search("runs") on R version 2.6.0 Under development (unstable) (2007-09-03 r42749). url:www.econ.uiuc.edu/~rogerRoger Koenker email[EMAIL PROTECTED]Department of

Re: [R] as.ordered

2007-10-09 Thread Birgit Lemcke
Hello Gavin, thanks for your answer. Answering to your sort.list a data frame. I tried to convert it to a vector but it was also not successful: bract.awnMin<-as.vector(bract.awnMin) sort.list(bract.awnMin) Fehler in sort.list(bract.awnMin) : 'x' must be atomic for 'sort.list' Have you cal

Re: [R] How to create something between a script and a package

2007-10-09 Thread Sergio Correia
Mark, Moshe, Vladimir, Uwe, Thanks for the tips regarding -source- and -rprofile-. Best, Sergio On 10/9/07, Uwe Ligges <[EMAIL PROTECTED]> wrote: > > > Sergio Correia wrote: > > (Before starting: I'm a total R noob so please bear with me in case of > > any error or faux pas). > > > > Hi, > > > >

Re: [R] identify number of sequences from a vector

2007-10-09 Thread Marc Schwartz
On Tue, 2007-10-09 at 16:28 +0200, Niccolò Bassani wrote: > dear R users, I've got kind of strange problem that I can't solve, even > though it's not that difficult. I need to compute the wald-wolfowitz run > test on the residuals from a gee model, and I'm trying to build the > quantities I need by

Re: [R] read only certain parts of a file

2007-10-09 Thread Gabor Grothendieck
Here are two possibilities. The first extracts all lines with 10 fields and then takes unique ones while the second extracts all lines that consist only of alphanumerics, space, underscore and period and then also takes unique lines. Both then read the result using read.table. The first one assu

Re: [R] window (x,y) co-ordinates of datapoints

2007-10-09 Thread hadley wickham
On 10/9/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > On Tue, 9 Oct 2007, Alberto Monteiro wrote: > > > > > Prof Brian Ripley wrote: > >> > >> Read ?par and the descriptiuon in 'An Introduction to R'. "din", > >> "fin", "mai", "omi", "pin" and "usr" are relevant. > >> > > Is there any hope t

Re: [R] AlgDesign--exact and approximate design

2007-10-09 Thread Dieter Menne
sun yahoo.com.cn> writes: > Another question is, I want to measure the main effects and at least two > interactions, variables are factors, how do I ensure this in formula, > ~.+v1:v2 +v3:v4 ? I would give something like the following a try (since you did not tell use where you use th

[R] problem with lower, upper triangles and diagonal

2007-10-09 Thread Birgit Lemcke
Hello R user! I have again a problem and sometimes I have the feeling that I will never learn to solve my problems by myself. But I found no solution in the searchable archieves or somewhere else. I have a square data.frame with distance values. In this special case the upper and the lower tr

Re: [R] window (x,y) co-ordinates of datapoints

2007-10-09 Thread Prof Brian Ripley
On Tue, 9 Oct 2007, Alberto Monteiro wrote: > > Prof Brian Ripley wrote: >> >> Read ?par and the descriptiuon in 'An Introduction to R'. "din", >> "fin", "mai", "omi", "pin" and "usr" are relevant. >> > Is there any hope that, instead of fin, din, pin, etc someday > we will have fmm, dmm, pmm?

[R] [R-pkgs] new package ppls

2007-10-09 Thread Nicole Krämer
A new package ppls is now available on CRAN. The ppls package implements penalized Partial Leasts Squares (PLS). In a nutshell, supervised dimensionality reduction via PLS is combined with penalization techniques. Features of the package include * estimation of linear regression models with pe

Re: [R] as.ordered

2007-10-09 Thread Gavin Simpson
Birgit, First things first, stop trying to sort.list a data frame. This is why you are getting the error. It is still a dataframe whether it has 1 column or 100. ?sort.list clearly says argument 'x' is a vector, and as this shows, you are not passing it a vector > dat0 <- data.frame(var1 = runif(

[R] identify number of sequences from a vector

2007-10-09 Thread Niccolò Bassani
dear R users, I've got kind of strange problem that I can't solve, even though it's not that difficult. I need to compute the wald-wolfowitz run test on the residuals from a gee model, and I'm trying to build the quantities I need by hand. Whereas for the expected and the variance there's no proble

Re: [R] extract year or month from date

2007-10-09 Thread Marcel Sandow
Highto convert strings into date use the:"? strptime" command, it converts data into POSIXlt classthis class provides direct access to some details of your date time information, likea<-strptime("07/07/1992",format="%d/%m/%Y")"a$mon+1" gives you the month (+1 because POSIXlt uses 0-11 for months

Re: [R] extract year or month from date

2007-10-09 Thread Gabor Grothendieck
Read the help desk article on dates in R News 4/1. On 10/9/07, Mary Royerr <[EMAIL PROTECTED]> wrote: > Hi, > > I am having trouble extracting just the year or the month or the day from a > date such as 5/7/2007 which is May 7th 2007. Is there any particular > function to extract just the year fro

Re: [R] lattice/xyplot: horizontal y-axis labels with scales(relation="free")

2007-10-09 Thread Karl Ove Hufthammer
Andreas Krause: > # still vertical despite las=1 > xyplot(Sepal.Length ~ Sepal.Width | Species, data=iris, > scales=list(relation="free"), las=1) xyplot(Sepal.Length ~ Sepal.Width | > Species, data=iris, scales=list(relation="free", las=1)) Try xyplot(Sepal.Length ~ Sepal.Width | Species, data=i

[R] AlgDesign--exact and approximate design

2007-10-09 Thread sun
Hi I am trying to generate a design using Algdesign and came across terms of "exact design" and "approxiamte theory design", I did not find a reference to explain what they are, could some one shed some light about this on me? Another question is, I want to measure the main effects and at le

[R] lattice/xyplot: horizontal y-axis labels with scales(relation="free")

2007-10-09 Thread Andreas Krause
I would like to create an xyplot with varying y-axis limits and horizontal labels at the y-axis tickmarks. The following does not seem to work, although I think it should, going by the documentation for par. R version 2.5.1, Windows XP Prof. Thanks for a clue. Andreas Krause library(lattice)

[R] extract year or month from date

2007-10-09 Thread Mary Royerr
Hi, I am having trouble extracting just the year or the month or the day from a date such as 5/7/2007 which is May 7th 2007. Is there any particular function to extract just the year from this format? When I am reading this data from a text file it is reading it correctly in the same format but d

Re: [R] fit.contrast and interaction terms

2007-10-09 Thread Gregory Warnes
Hello Berta, gmodels::fit.contrasts() simply performs a single-variable contrast using the model you have specified. To perform the more involved contrasts that you are describing, there are two approaches: 1) use the estimable() function in the gmodels package. gmodels::estimable() allo

[R] Trouble writing distance matrices to file

2007-10-09 Thread Muri Soares
Hi all, I have a distance matrix, created in R (using vegdist). When I use write.matrix to write it to a file, it writes a matrix with values in the upper diagonal. Is it possible to get R to write only the lower diagonal values (since the matrix that it creates with vegdist actually only has lo

Re: [R] coxph models for insects

2007-10-09 Thread Terry Therneau
Justin, You have an interesting problem, and a serious (reliable) consultation would take more time than I have to give at the moment. Which is to say that you should take these comments with a grain of salt. First, I don't think that you have censored data. You have 2 subdistribution f

[R] read only certain parts of a file

2007-10-09 Thread João Fadista
Dear all, I would like to know how can I read a text file and create a data frame of only certain parts of the file. For instance, from this text file: === Matches For Query 0 (108 bases): 19_0070 ===

Re: [R] window (x,y) co-ordinates of datapoints

2007-10-09 Thread Ken Knoblauch
Duncan Murdoch stats.uwo.ca> writes: > > On 10/9/2007 8:16 AM, Alberto Monteiro wrote: > > Prof Brian Ripley wrote: > >> > >> Read ?par and the descriptiuon in 'An Introduction to R'. "din", > >> "fin", "mai", "omi", "pin" and "usr" are relevant. > >> > > Is there any hope that, instead of f

Re: [R] pseudo code

2007-10-09 Thread elw
> Requires: T = cluster(X): A hierarchical clustering algorithm > L = cut-tree(T; k): produces a partition with k non-singleton clusters The functions you'll want to read the documentation to, here, are "hclust()" and "cutree()". They're fairly straightforward and nicely documented. It looks

Re: [R] window (x,y) co-ordinates of datapoints

2007-10-09 Thread Duncan Murdoch
On 10/9/2007 8:16 AM, Alberto Monteiro wrote: > Prof Brian Ripley wrote: >> >> Read ?par and the descriptiuon in 'An Introduction to R'. "din", >> "fin", "mai", "omi", "pin" and "usr" are relevant. >> > Is there any hope that, instead of fin, din, pin, etc someday > we will have fmm, dmm, pmm?

Re: [R] window (x,y) co-ordinates of datapoints

2007-10-09 Thread Alberto Monteiro
Prof Brian Ripley wrote: > > Read ?par and the descriptiuon in 'An Introduction to R'. "din", > "fin", "mai", "omi", "pin" and "usr" are relevant. > Is there any hope that, instead of fin, din, pin, etc someday we will have fmm, dmm, pmm? Alberto Monteiro

Re: [R] window (x,y) co-ordinates of datapoints

2007-10-09 Thread Prof Brian Ripley
On Tue, 9 Oct 2007, Samuel Kemp wrote: > Hi, > > In the getGraphicsEvent function the (x,y) co-ordinates returned from the > mouse move are in relation to where the mouse is located within the device > window (i.e. the lower left corner of the window is '(0,0)', the upper > right is '(1,1)'). Y

[R] JSS: Special volume about R in ecology and ecological modelling

2007-10-09 Thread Thomas Petzoldt
Dear useRs, the new special volume of JSS about "R in Ecology and Ecological Modelling" is now online. The scope of the papers ranges from theoretical ecology and ecological modelling to statistical methodology relevant for data analyses in ecological applications. JSS, the Journal of Statistical

Re: [R] igraph and plotting connected components

2007-10-09 Thread Gabor Csardi
Dieter, there are a couple of ways to do this in igraph, eg. you can decompose the graph into separate components with g <- erdos.renyi.game(100, 1/100) graphs <- decompose.graph(g) and then you will have a list of graphs. If you assign some vertex ids as vertex attributes then you can keep tra

[R] window (x,y) co-ordinates of datapoints

2007-10-09 Thread Samuel Kemp
Hi, In the getGraphicsEvent function the (x,y) co-ordinates returned from the mouse move are in relation to where the mouse is located within the device window (i.e. the lower left corner of the window is '(0,0)', the upper right is '(1,1)'). Is there a way of returning the (x,y) co-ordinates of

[R] pseudo code

2007-10-09 Thread Julia Kröpfl
Hey there! I got a pseudo code and don't know how to apply it to R, maybe someone can help me: Input: A dataset X, kmax: maximum number of clusters, num_subsamples: number of subsamples. Output: S(i; k) - a distribution of similarities between partitions into k clusters of a reference clusteri

[R] R Help

2007-10-09 Thread dt Excellent
Has anyone written a function to find the quantiles for the studentized maximum distribution, and the studentized maximum modulus distribution? Thanks for any help. Kostas - [[alternative HTML version deleted]] _

[R] Unsere Empfehlung des Hauses persoenlich fuer [EMAIL PROTECTED]

2007-10-09 Thread [EMAIL PROTECTED]
Holen sie sich jetzt 2400 EUR in Cash ab Und gehen Sie dabei einen sicheren und koeniglichen Weg !!! Alles mehrsprachig und einfach erklaert, starten Sie jetzt !!! Für jeden erhaeltlich, ganz einfach: Anklicken, Registrieren, abholen !!! WO ERHALTEN SIE SONST 2400 Euro in 12 Monaten aufgeteil

[R] fit.contrast and interaction terms

2007-10-09 Thread Berta
Dear R-users, I want to fit a linear model with Y as response variable and X a categorical variable (with 4 categories), with the aim of comparing the basal category of X (category=1) with category 4. Unfortunately, there is another categorical variable with 2 categories which interact with x an

[R] Using Rexcel: How to work with a range of data?

2007-10-09 Thread Sumit.Gupta
Hi, I am trying to use an R function over a column of data I have in my excel spreadsheet. I do the following:- 1) assign an object (calling it xaxis) to the data by typing in =Rput("xaxis",a1:a10), where my data is shown in cells a1:a10 Now I wish to arrive at the mean of these

[R] 16-way comparison.

2007-10-09 Thread Nicolai
Hi. I'm looking for a way to compare the following within and between each Year for each Season and number of Shifts in each Treatment. YearSeason Treatment Shifts (Log+1) I'm using R 2.6 (with R cmdr). I have difficulties as im a R-newbie. Could someoen guide me? Nicolai -- Vie

Re: [R] graph or svn

2007-10-09 Thread Gabor Csardi
Paul, if you have large graphs the igraph package might help, it works very well with large sparse graphs. To convert an adjacency matrix (A) to an igraph graph object (g) you can simply use library(igraph) g <- graph.adjacency(A) and then you can generate layouts with layout.fruchterman.reingol

Re: [R] Linux editor for R+LaTeX, but not Emacs

2007-10-09 Thread Ramon Diaz-Uriarte
On 10/9/07, Scionforbai <[EMAIL PROTECTED]> wrote: > >>> is it only me or has anyone else the problem that running an R > >>> process within emacs is way much slower than in a regular terminal/ > >>> console? > > >> It's just you, and if you think some more about it, you'll see > >> why we are all

[R] Read in date fomat while colClasses="character"

2007-10-09 Thread Ravi S. Shankar
Hi R users, I am using xlsReadWrite to read a particular excel file. In one of the columns I have dates ( say col=5). Now date column is read by default as numeric. So I used dateTimeAs= "isodatetime". This enables reading in the date format. However in the earlier column (say col=1) I have dat

Re: [R] igraph and plotting connected components

2007-10-09 Thread Gabor Csardi
On Mon, Oct 08, 2007 at 08:11:16PM -0500, [EMAIL PROTECTED] wrote: [...] > Dot-file format is also *ridiculously simple* to generate , which I think > of as a factor well in its favor. :-) This is just write.graph(g, format="dot", file="output.dot") in igraph. > I hear that there's a tk-based

Re: [R] Linux editor for R+LaTeX, but not Emacs

2007-10-09 Thread Scionforbai
>>> is it only me or has anyone else the problem that running an R >>> process within emacs is way much slower than in a regular terminal/ >>> console? >> It's just you, and if you think some more about it, you'll see >> why we are all grinning. [ Hint: it can't be slower, outside of >> ridiculou

Re: [R] as.ordered

2007-10-09 Thread Birgit Lemcke
Hello Friedrich, thanks for your help and it is really not important that the solution is elegant. Important is only that there is a solution. But I still have some problems with this topic. #I tried as you suggested to order the vectors separately. My first problem is that my data is a data

Re: [R] print Text on device

2007-10-09 Thread John Lande
thank you Greg, this is just what I needed. On 10/8/07, Greg Snow <[EMAIL PROTECTED]> wrote: > > Look at the textplot function in the gplots package. Does that do what > you want? > > -- > Gregory (Greg) L. Snow Ph.D. > Statistical Data Center > Intermountain Healthcare > [EMAIL PROTECTED] > (8

[R] histograms and significance values

2007-10-09 Thread Andreas Gruber
Hi, I have a simulation with negative examples, and with R I can do quite easily a histogram and a density estimate. I have one positive example and I want some statistical significance value to see to what extent the positive example is part of the negative population. Does anyone have an ide

Re: [R] A rebel boxplot question

2007-10-09 Thread ONKELINX, Thierry
Sorry, but I can't help you with your problem isntalling ggplot2. I'm a WinXP user and have no experience with R on Linux. Maybe Hadley Wickam could help you out on this one. Cheers, Thierry ir. Thierry Onkelinx Insti

Re: [R] variance explained by each term in a GAM

2007-10-09 Thread Simon Wood
I think that your approach is reasonable, except that you should use the same smoothing parameters throughout. i.e the reduced models should use the same smoothing parameters as the full model. Otherwise you get in trouble if x1 and x2 are correlated, since the smoothing parameters will then ten

  1   2   >