Re: [R] help with combination problem

2006-06-07 Thread David Hugh-Jones
hi Srinivas I'm not sure I understand: your example result has 10-9 for mu1 but 1 for mu2, which is not equal to 11-9. I will assume you just got the numbers wrong. (Also J100 should be J1, no?) I am also wondering why you want what you say. It doesn't seem very sensible to mix the results from t

Re: [R] how to analyze the following data?--anxious for the result

2006-06-07 Thread Prof Brian Ripley
Asserting `y isn't noramal' only eliminates one possibility. Is it binary, a count, long-tailed, short-tailed, ...? This is really a statistical consulting problem (and apparently about SAS): see the R posting guide for where to seek advice on such problems. As the guide says, had we had suffic

Re: [R] bootstrapping

2006-06-07 Thread Prof Brian Ripley
In non-parametric bootstrapping, you do draw a sample of the same size as the original. So D <- as.vector(WorldPhones[,1]) sample(D, replace=TRUE) [1] 45939 64721 60423 79831 71799 45939 76036 sample(D, replace=TRUE) [1] 45939 68484 79831 68484 76036 71799 79831 are two different bootstrap

[R] how to analyze the following data?--anxious for the result

2006-06-07 Thread zhijie zhang
Dear friends, I have a dataset: response var--y, class var-group, and the third variable-x. I want to test whether there is statistical significance bewteen group for y with the controlled x. First, i want to use analysis of covariance in SAS, but i found that y isn't noramal and can't become nor

Re: [R] [OFF] The "best" tool for a space-temporal analyses?

2006-06-07 Thread Spencer Graves
Have you tried RSiteSearch("spatial ecology")? I just got 47 hits from that. Some of them might be relevant to your question. If that fails, you might consider providing this group with the math behind the automata models you are considering. I might expect them to be exp

[R] How to do this simple integration?

2006-06-07 Thread Jianing Di
Hello, I have a simple function in the form as follows: > f<-function(x){sum(v^x)} where v is a vector. I was trying to integrate f using the command > I<-integrate(f,0,1) However, this will not work and seems that the reason is to use "integrate", the f must be a function that with input and

Re: [R] simplier way to import txt time-series data

2006-06-07 Thread Gabor Grothendieck
Try this which reads in the data as a data frame and appends a chron variable datetime: Lines <- " MM DD HH data1 data2 2002 12 01 01 0.002 0.003" DF <- read.table(textConnection(Lines), header = TRUE) library(chron) DF$datetime <- with(DF, chron(paste(MM, DD, , sep = "/")) + HH/24) DF

Re: [R] bootstrapping

2006-06-07 Thread Clément Viel
2006/6/7, Recep Aykaya <[EMAIL PROTECTED]>: > > hi. > i'm a statistics student and studying bootstrap in R. > > i'm trying to draw bootstrap samples from a sample, using the following R > code: > > > *boot = numeric(200)* > *> {for (i in 1:200)* > > * boot [i] = (sample(data,replace=T))}* > > > >

Re: [R] R crashes on quantreg

2006-06-07 Thread roger koenker
R-help doesn't foward attached data files like this, but Brian kindly forwarded it to me. You need to restrict X so that it is full rank, it now has rank 19 and column dimension 29 (with intercept). See for example svd(cbind(1,x)). I'll add some better checking for this, but it will basically

[R] bootstrapping

2006-06-07 Thread Recep Aykaya
hi. i'm a statistics student and studying bootstrap in R. i'm trying to draw bootstrap samples from a sample, using the following R code: > *boot = numeric(200)* *> {for (i in 1:200)* * boot [i] = (sample(data,replace=T))}* i obtain 200 samples but all of them are the same. i want to obtain

Re: [R] Using data=x or subset=y in user-defined functions

2006-06-07 Thread Prof Brian Ripley
I suggest you investigate with(). On Wed, 7 Jun 2006, Manuel Morales wrote: > Dear list members, > > In some of my functions, I attach the data internally to allow subset > commands or to specify a data frame. This works well except for cases > where there is a "masking" conflict (which returns a

Re: [R] R crashes on quantreg

2006-06-07 Thread Prof Brian Ripley
On Wed, 7 Jun 2006, roger koenker wrote: > Since the "crash" occurs plotting the lm object it is unclear what > this has to do with quantreg, but maybe you could explain > > 1. what you mean by crash, > 2. something about x,y, > > This is best addressed to the maintainer of the packa

[R] Using data=x or subset=y in user-defined functions

2006-06-07 Thread Manuel Morales
Dear list members, In some of my functions, I attach the data internally to allow subset commands or to specify a data frame. This works well except for cases where there is a "masking" conflict (which returns a warning). I see some alternative listed in ?attach, but I'm not sure which of them do

Re: [R] R crashes on quantreg

2006-06-07 Thread Mu Tian
I attached the data file here. I restarted the PC but it still happens. It says a memory address could not be written. I am not sure it is a problem of R or quantreg but I plot without problems before I load quantreg. Thank you. Tian On 6/7/06, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: Wit

Re: [R] R crashes on quantreg

2006-06-07 Thread Prof Brian Ripley
Without y and x we cannot reproduce this. PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html On Wed, 7 Jun 2006, Mu Tian wrote: > I forgot to mention my R version is 2.3.1 and quantreg is the most updated > too. It has a version number, which the posting guide tells y

Re: [R] R crashes on quantreg

2006-06-07 Thread roger koenker
Since the "crash" occurs plotting the lm object it is unclear what this has to do with quantreg, but maybe you could explain 1. what you mean by crash, 2. something about x,y, This is best addressed to the maintainer of the package rather than to R-help, provided, of cou

Re: [R] R crashes on quantreg

2006-06-07 Thread Mu Tian
I forgot to mention my R version is 2.3.1 and quantreg is the most updated too. On 6/7/06, Mu Tian <[EMAIL PROTECTED]> wrote: > > I was trying "quantreg" package, > > lm1 <- lm(y~x) > rq1 <- rq(y~x) > plot(summary(rq1)) #then got a warning says singular value, etc. but this > line can be omited >

[R] R crashes on quantreg

2006-06-07 Thread Mu Tian
I was trying "quantreg" package, lm1 <- lm(y~x) rq1 <- rq(y~x) plot(summary(rq1)) #then got a warning says singular value, etc. but this line can be omited plot(lm1) #crash here It happened every time on my PC, Windows XP Pro Serv. Pack 1, Pentium(4) 3.00G. [[alternative HTML version del

[R] simplier way to import txt time-series data

2006-06-07 Thread Jan Schwanbeck
Hello much more experienced R-users, I have got a txt - file which contains data formated like this: MM DD HH data1 data2 ... data31 2002 12 01 01 0.002 0.003 ... 312.0 The single columns are divided by at least one space. Is their an easy and fast way to make R understand that the first

Re: [R] bootstrap data from groups

2006-06-07 Thread Ulrich Keller
I am not sure I understand what you want to do, but maybe some of this will be helpful. I first generate some data that should resemble yours: dat<-expand.grid(Region=1:3, Species=1:4, Sex=c("M","F")) dat<-do.call("rbind",lapply(1:10,function(x) dat)) dat$Bodysize<-rnorm(nrow(dat),10,2) Now what

[R] decideTests extraction of p-values

2006-06-07 Thread Vijay A Raghavan
Hello all, Here is the code that I am using for finding differentially expressed genes. #Normalization library(affy) library(Biobase) library(limma) library(gcrma) pd<-read.phenoData("file.txt",header=TRUE,row.names=1,as.is=TRUE,sep="\t") Data <- ReadAffy(filenames=pData(pd)

Re: [R] Edit function

2006-06-07 Thread François Pinard
[Pikounis, Bill [CNTUS]] > view <- function(x) { > warnopt <- options()$warn > options(warn=-1) > on.exit({sink(); options(warn=warnopt)}) > edit(x) > invisible() > } I'm surprised by the necessity of "sink()". Presuming it is necessary indeed, the above could be simplified a bit like

Re: [R] how to read hdf files under R?

2006-06-07 Thread antonio rodriguez
Nicolas Degallier wrote: > Hi! > > I am trying to install in my R environment the rhdf5 package and > library but it seems to have vanished from either the CRAN or > BioConductors sites. > > Can you tell me where it would be possible to find it or any R > library (or function) able to read

[R] help with combination problem

2006-06-07 Thread Srinivas Iyyer
hello: I have 3 data.frame objects. First df object: Of dim (149,31). Columns 2:31 are marked as T1..T14 and N1..N16. Name T1T2N1 T3 N2 N3 N4 T4 mu1 1010910 9 9 8 10 mu2 1111911 9 9 9 11 ... muN 1212911 9

Re: [R] Density Estimation

2006-06-07 Thread Pedro Ramirez
>Not a direct answer to your question, but if you use a logspline density >estimate rather than a kernal density estimate then the logspline >package will help you and it has built in functions for dlogspline, >qlogspline, and plogspline that do the integrals for you. > >If you want to stick with t

Re: [R] Density Estimation

2006-06-07 Thread Rolf Turner
Pedro wrote: > I have made a simple kernel density estimation by > > x <- c(2,1,3,2,3,0,4,5,10,11,12,11,10) > kde <- density(x,n=100) > > Now I would like to know the estimated probability that a > new observation falls into the interval 0 > How can I integrate over the corresponding interval?

Re: [R] use of R in big companies (references) & R-support esp in Germany

2006-06-07 Thread Thomas Adams
Spencer, I agree that there exist biases within large organizations toward commercial software packages, but I humbly disagree that this can be reduced to geopolitical differences. I work for a US Government Agency and while there is some truth to the feeling "[they] refuse to believe that any

Re: [R] Density Estimation

2006-06-07 Thread Greg Snow
Not a direct answer to your question, but if you use a logspline density estimate rather than a kernal density estimate then the logspline package will help you and it has built in functions for dlogspline, qlogspline, and plogspline that do the integrals for you. If you want to stick with the KDE

[R] Density Estimation

2006-06-07 Thread Pedro Ramirez
Dear R-list, I have made a simple kernel density estimation by x <- c(2,1,3,2,3,0,4,5,10,11,12,11,10) kde <- density(x,n=100) Now I would like to know the estimated probability that a new observation falls into the interval 0https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] how to do multiple comparison in the nonparametric statis tical analysis?

2006-06-07 Thread Barker, Chris [SCIUS]
Also Consider Bonferroni Hochberg Holm type procedures or . Dunn OJ. Multiple contrasts using rank sum tests. Technometrics 1964;6:241#/52. [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mai

Re: [R] how to do multiple comparison in the nonparametric statistical analysis?

2006-06-07 Thread Marc Schwartz (via MN)
On Thu, 2006-06-08 at 00:10 +0800, zhijie zhang wrote: > Dear Rusers, > As we all know , there are many methods to do multiple comparison in the > parametric statistical analysis, But i can't find some in nonparametric > statistical analysis. > Could anybody give some suggestions? Have you looke

Re: [R] Fw: Help needed using lattice for area plots lpolygon, xyplot.

2006-06-07 Thread toby_marks
Perfect. Thank-you! "Deepayan Sarkar" <[EMAIL PROTECTED]> 06/07/2006 11:19 AM To "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> cc r-help@stat.math.ethz.ch Subject Re: [R] Fw: Help needed using lattice for area plots lpolygon, xyplot. On 6/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Re: [R] Fw: Help needed using lattice for area plots lpolygon, xyplot.

2006-06-07 Thread Deepayan Sarkar
On 6/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am trying to learn how to use the graphics from the lattice package ( > and am very new to R). > > I am trying to replicate the example plot referenced below, by using the > lattice xyplot & lpolygon to create panels. I get what appears t

[R] how to do multiple comparison in the nonparametric statistical analysis?

2006-06-07 Thread zhijie zhang
Dear Rusers, As we all know , there are many methods to do multiple comparison in the parametric statistical analysis, But i can't find some in nonparametric statistical analysis. Could anybody give some suggestions? [[alternative HTML version deleted]] _

Re: [R] multiple data sets on one plot

2006-06-07 Thread Marc Schwartz (via MN)
On Wed, 2006-06-07 at 10:30 -0500, Mark L Sessing wrote: > Hello, > > I am learning how to use R, and I cannot figure out how to plot more > than one data set on a single plot. Can you help me out? > > Cheers, > Mark It depends upon the type of plot (scatter, lines, bar, etc.) and whether or n

Re: [R] Edit function

2006-06-07 Thread Pikounis, Bill [CNTUS]
I use a simple-minded, dirty wrapper on edit: view <- function(x) { warnopt <- options()$warn options(warn=-1) on.exit({sink(); options(warn=warnopt)}) edit(x) invisible() } I say "dirty", because sometimes the output is re-directed from stdout somewhere else as an unintended side effec

Re: [R] multiple data sets on one plot

2006-06-07 Thread Sarah Goslee
Without more inormation about what you are specifically trying to do, see ?line ?points Sarah On 6/7/06, Mark L Sessing <[EMAIL PROTECTED]> wrote: > > Hello, > > I am learning how to use R, and I cannot figure out how to plot more > than one data set on a single plot. Can you help me out? > > Ch

Re: [R] use of R in big companies (references) & R-support esp in Germany

2006-06-07 Thread Spencer Graves
The best rebuttal I've heard recently to arguments like that is Linux (www.linux.org): It's distributed under the same general public license (GNU) license as R. A perspective that I don't recall having seen on this list is that the cost of producing and distributing softwa

[R] multiple data sets on one plot

2006-06-07 Thread Mark L Sessing
Hello, I am learning how to use R, and I cannot figure out how to plot more than one data set on a single plot. Can you help me out? Cheers, Mark -- Mark Sessing CIMMS Research Fellow Meteorologist NWS Warning Decision Training Branch 3200 Marshall Ave Ste. 202 Norman, OK 73072 Phone: 405-57

Re: [R] error bars in lattice xyplot *with groups*

2006-06-07 Thread Manuel Morales
Hi Mike, If you're not committed to using a panel function, another option is to use the function lineplot.CI, available in the package sciplot at http://mutualism.williams.edu/sciplot E.g. # Define and generate variables in "long" format range <- vector() voice <- vector() string <- strsplit(as

Re: [R] Help with sample function

2006-06-07 Thread Austin, Matt
I couldn't help but respond to this one, it's not often I see my own name. Using data from the survival library: library(survival) lung[1:10, c('time', 'status')] Surv(lung$time, lung$status)[1:10] --Matt Matt Austin Statistician Amgen, Inc 800 9AMGEN9 x77431 805-447-7431 -Original Mess

Re: [R] Help with sample function

2006-06-07 Thread Dimitris Rizopoulos
try something like: surv.data <- data.frame(times = rexp(100, 1/10), events = rbinom(100, 1, 0.7)) surv.data[sample(nrow(surv.data), replace = TRUE), ] I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of L

[R] Help with sample function

2006-06-07 Thread Matthew Austin
I have generated some some survival times and censoring indicators. Thus I have an ordered pair for each observation. How do I sample these ordered paris? I only know how to sample from a vector? I would appreciate any help I could get. Thanks Matt _

Re: [R] Edit function

2006-06-07 Thread ronggui
If you want to change the data,_fix_ will be a good option.But if you just want to browse the data ,then invisible(edit(data)) is better one. I remember this question showed up some time ago. 2006/6/7, Ulrich Keller <[EMAIL PROTECTED]>: > fix(data) > > will invoke edit(data) and store changes yo

Re: [R] Building packages in R - 'private' functions

2006-06-07 Thread Seth Falcon
"Antonio, Fabio Di Narzo" <[EMAIL PROTECTED]> writes: > 1. If you have time to change internal functions naming, you can rename > internal functions by putting a leading '.'. > Even without namespace, I have noticed there is no check for corresponding > docs for such functions. > > 2. If you don't

Re: [R] Edit function

2006-06-07 Thread Ulrich Keller
fix(data) will invoke edit(data) and store changes you make in data without displaying anything. stat stat schrieb: > Dear all R users, > > I have a query on "Edit" function. Suppose I have a data frame named > "data". I can use EDIT function to see the materials contained in data, by >

[R] Fw: Help needed using lattice for area plots lpolygon, xyplot.

2006-06-07 Thread toby_marks
I am trying to learn how to use the graphics from the lattice package ( and am very new to R). I am trying to replicate the example plot referenced below, by using the lattice xyplot & lpolygon to create panels. I get what appears to be the correct shape of the filled region, but cannot get t

Re: [R] how to read hdf files under R?

2006-06-07 Thread Prof Brian Ripley
On Wed, 7 Jun 2006, Nicolas Degallier wrote: > I am trying to install in my R environment the rhdf5 package and > library but it seems to have vanished from either the CRAN or > BioConductors sites. > > Can you tell me where it would be possible to find it or any R > library (or function) able to

[R] x y averaging thanks

2006-06-07 Thread Randy Zelick
I have three completely different(!) but workable solutions. Thanks much for your help. =Randy= R. Zelick email: [EMAIL PROTECTED] Department of Biology voice: 503-725-3086 Portland State University fax: 503-725-3888 mailing: P.O.

[R] how to read hdf files under R?

2006-06-07 Thread Nicolas Degallier
Hi! I am trying to install in my R environment the rhdf5 package and library but it seems to have vanished from either the CRAN or BioConductors sites. Can you tell me where it would be possible to find it or any R library (or function) able to read hdf files? Sincerely, Nicolas Degallier

[R] Help needed using lattice for area plots lpolygon, xyplot.

2006-06-07 Thread toby_marks
I am trying to learn how to use the graphics from the lattice package ( and am very new to R). I am trying to replicate the example plot referenced below, by using the lattice xyplot & lpolygon to create panels. I get what appears to be the correct shape of the filled region, but cannot get t

Re: [R] Edit function

2006-06-07 Thread Prof Brian Ripley
On Wed, 7 Jun 2006, stat stat wrote: > Dear all R users, > > I have a query on "Edit" function. Suppose I have a data frame named > "data". I can use EDIT function to see the materials contained in data, > by using the command: > > > edit(data) > > But when I close the window then again the m

Re: [R] Help with selecting data from irregular time series {its} objects

2006-06-07 Thread Gabor Grothendieck
See: ?itsSubset On 6/7/06, Ivan Kalafatic <[EMAIL PROTECTED]> wrote: > If I understood correctly in irregular time series (its) objects, values are > indexed by time stamps in POSIX format. > But if I try to select the value of my time series corresponding to specific > time stamp in the following

Re: [R] making matrix monotonous

2006-06-07 Thread Michael Friendly
[Presuming you mean monotone; many matrices are already monotonous.] General solutions to this problem are discussed in @ARTICLE{Friendly:02:corrgram, author = {M. Friendly}, title = {Corrgrams: Exploratory displays for correlation matrices}, journal = {The American Statistician}, yea

[R] Edit function

2006-06-07 Thread stat stat
Dear all R users, I have a query on "Edit" function. Suppose I have a data frame named "data". I can use EDIT function to see the materials contained in data, by using the command: > edit(data) But when I close the window then again the materials contained in data is displayed

[R] Help with selecting data from irregular time series {its} objects

2006-06-07 Thread Ivan Kalafatic
If I understood correctly in irregular time series (its) objects, values are indexed by time stamps in POSIX format. But if I try to select the value of my time series corresponding to specific time stamp in the following way: x - its object i <- as.POSIXct("2006-05-19 15:30:00") x[i,] or x[i] or

Re: [R] smoothing plot(x, type ='l')

2006-06-07 Thread Jim Lemon
Federico Calboli wrote: > Hi All, > > I am using plot(x, type = 'l') for some plotting, but I would like rounded > edges > rather than jagged edges in the plot (purely for aestetic reasons). > > How could I achieve that? > Perhaps you want something like: x<-rnorm(50) plot(spline(1:50,x),type=

Re: [R] smoothing plot(x, type ='l')

2006-06-07 Thread Federico Calboli
Prof Brian Ripley wrote: > It I understand you aright, that is done by par(lend) but the default is > "round". So maybe your graphics device (unstated) on your OS (unstated) > does not support this. graphics device = X11 (xserver-xorg) OS = Debian GNU/Linux, Kernel 2.4.27-2-686-smp > > We ne

Re: [R] making matrix monotonous

2006-06-07 Thread Gabor Grothendieck
On 6/7/06, Romain Francois <[EMAIL PROTECTED]> wrote: > Le 07.06.2006 11:20, [EMAIL PROTECTED] a écrit : > > Spencer Graves a écrit : > > > > > >> I agree it would be great to sort the variables in a correlation > >> matrix to make it easier to read and see patterns. I don't know any > >> fu

Re: [R] smoothing plot(x, type ='l')

2006-06-07 Thread Prof Brian Ripley
On Wed, 7 Jun 2006, Federico Calboli wrote: > Hi All, > > I am using plot(x, type = 'l') for some plotting, but I would like > rounded edges rather than jagged edges in the plot (purely for aestetic > reasons). > > How could I achieve that? It I understand you aright, that is done by par(lend)

Re: [R] making matrix monotonous

2006-06-07 Thread Romain Francois
Le 07.06.2006 11:20, [EMAIL PROTECTED] a écrit : > Spencer Graves a écrit : > > >> I agree it would be great to sort the variables in a correlation >> matrix to make it easier to read and see patterns. I don't know any >> functions for doing that. If it were my problem, I might "order"

Re: [R] smoothing plot(x, type ='l')

2006-06-07 Thread Federico Calboli
Dimitris Rizopoulos wrote: > probably you want to use the `lend' argument of ?par(); I hope it helps. Does not seem to work in my case. F -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 7594 1

Re: [R] smoothing plot(x, type ='l')

2006-06-07 Thread Dimitris Rizopoulos
probably you want to use the `lend' argument of ?par(); 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] smoothing plot(x, type ='l')

2006-06-07 Thread Federico Calboli
Hi All, I am using plot(x, type = 'l') for some plotting, but I would like rounded edges rather than jagged edges in the plot (purely for aestetic reasons). How could I achieve that? Cheers, Federico -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St

Re: [R] making matrix monotonous

2006-06-07 Thread vincent
Spencer Graves a écrit : > I agree it would be great to sort the variables in a correlation > matrix to make it easier to read and see patterns. I don't know any > functions for doing that. If it were my problem, I might "order" the > variables by their first principal component. There

Re: [R] How to create list of objects?

2006-06-07 Thread Rainer M Krug
Thanks everybody - it's working Rainer Dimitris Rizopoulos wrote: > try something like: > > lapply(f, summary) > sapply(f, function(x) AIC(logLik(x))) > > > Best, > Dimitris > > > Dimitris Rizopoulos > Ph.D. Student > Biostatistical Centre > School of Public Health > Catholic University

Re: [R] Building packages in R - 'private' functions

2006-06-07 Thread Antonio, Fabio Di Narzo
1. If you have time to change internal functions naming, you can rename internal functions by putting a leading '.'. Even without namespace, I have noticed there is no check for corresponding docs for such functions. 2. If you don't want to rename all internal functions, the best way is writing an

Re: [R] Building packages in R - 'private' functions

2006-06-07 Thread Joerg van den Hoff
Dan Rabosky wrote: > Hello. > > I am creating an R package that I'd like to submit to CRAN (OS Windows > XP). How do I distinguish among 'public' functions, e.g., those that are > intended to be called by users of the package and for which I am providing > documentation & examples, and 'privat

Re: [R] x y averaging

2006-06-07 Thread Prof Brian Ripley
It's confusing to have time values that are different but `match', so first you want to reduce your times to hh:mm (e.g. with substr). Then you can cbind() the data frames, and use tapply() to do the averaging. E.g. d1 <- read.table("foo1") d2 <- read.table("foo2") d <- cbind(d1, d2) d$time <-