[R] grDevices package

2007-11-21 Thread amna khan
Dear Sir grDevices package is not found in packages list? Thank You -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] distance matrix to coordinate format for spatial stats

2007-11-21 Thread Prof Brian Ripley
You can't do this uniquely (shifts, rotations and reflection do not change the distances), but cmdscale() will produce one reconstruction. On Thu, 22 Nov 2007, Jesse D Lecy wrote: > Greetings, > > I would like to use some of the spatial statistics functions in R, but I am > having trouble enter

[R] distance matrix to coordinate format for spatial stats

2007-11-21 Thread Jesse D Lecy
Greetings, I would like to use some of the spatial statistics functions in R, but I am having trouble entering data. My data is already in a distance matrix format, not an X Y coordinate format (each Xij cell in the matrix represens the distance from point i to j). Does anyone know of a way

Re: [R] dev.off()

2007-11-21 Thread Chung-hong Chan
png function is used for producing png format (Portable Network Graphics) of image. you need to use the postscript() function to generate a ps graph. Refer to: http://stat.ethz.ch/R-manual/R-patched/library/grDevices/html/postscript.html On 11/22/07, amna khan <[EMAIL PROTECTED]> wrote: > Dear S

Re: [R] Displaying R, N, Z-symbols with expression

2007-11-21 Thread David Winsemius
"C.J.Albers" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Hi all, > > (Apologies if this has been asked before; I tried to search for it in > the archives, but searching for terms like 'N' yields too many hits) > > Is it possible to display symbols like 'R' (the set of real numbers,

[R] dev.off()

2007-11-21 Thread amna khan
Dear Sir Sir when I use "png" function to save graph. At last it is written dev.off(). it does not produce any postscript file. Please help in this regard Thank you -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. [[alternative HTML version deleted]] _

Re: [R] Reg : using two different matrix : how to do t.test

2007-11-21 Thread Weiwei Shi
sapply(1:4000, function(k){ t.test(Matrix1[,k], Matrix2[,k])$p.value }) I did not test, though. HTH, Weiwei On 11/19/07, sata pinal <[EMAIL PROTECTED]> wrote: > I have two matrix with same dimensions. I want to do t.test using each column > from 2 different matrix. > Row n Column names in

Re: [R] Reg : using two different matrix : how to do t.test

2007-11-21 Thread Moshe Olshansky
Since t.test takes much more time than parsing loop, I won't hesitate to do a loop on the columns. --- sata pinal <[EMAIL PROTECTED]> wrote: > I have two matrix with same dimensions. I want to do > t.test using each column from 2 different matrix. > Row n Column names in both matrix are same.

Re: [R] R and reading matlab compressed files

2007-11-21 Thread Suresh Krishna
One possibility is to save in ASCII format from Matlab (save -ascii) Suresh > On 17/11/2007, Prof Leslie Smith <[EMAIL PROTECTED]> wrote: >> Is there any way to read these files (standard .mat files, created by >> matlab version 7 onwards are compressed)? I know that R.matlab doesn't >> read the

Re: [R] tapply, mean and subset

2007-11-21 Thread Moshe Olshansky
One possibility is: a<-" V1 V2 F1 + 1 A 2 0 + 2 A 3 0 + 3 A 4 1 + 4 B 3 0 + 5 B 2 1 + 6 C 6 0 + 7 C 2 0 + 8 C 6 0 + " b<-read.table(textConnection(a),header=TRUE) f<-rep(0,dim(b)[1]) f[b$F1==0] <- ave(b$V2[b$F1==0],b$V1[b$F1==0]) cbind(b,f) V1 V2 F1f 1 A 2 0

[R] [EMAIL PROTECTED]

2007-11-21 Thread wujinja
Welcome to the R-help@r-project.org mailing list!To post to this list, send your email to: r-help@r-project.orgGeneral information about the mailing list is at: https://stat.ethz.ch/mailman/listinfo/r-helpIf you ever want to unsubscribe or change your options (eg, switch t

[R] Heatmap problem

2007-11-21 Thread affy snp
Hi friends, I used heatmap(as.matrix(y2),col=rainbow(256),scale = "column") to generate the heatmap. But it did not show the code that which color correspond the value. Is there any parameter for this in heatmap()? Thanks a lot! Allen [[alternative HTML version deleted]] __

Re: [R] if ( expr )

2007-11-21 Thread Moshe Olshansky
How about if (is.na(c(x,1))[1]) ... --- Gregory Wall <[EMAIL PROTECTED]> wrote: > > Hello, > > I've searched the list but haven't found anything > really applicable to my > question. Any advice would be super. > > I'm working on a snippet of R code and I have a > function with a prototype

[R] Plotting + saving to file on Linux

2007-11-21 Thread Maura E Monville
Thanks to all those of you who answered my question about how to save a plot to a file. But now I have another problem. That is I wish to see / examine the plot on the screen in advance of saving it to a file. If I launch X11() or pdf() or Poscript() the plot does not appear on my screen .. So I ha

[R] Vanishing Font Path

2007-11-21 Thread Patrick Connolly
platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 2 minor 6.0

Re: [R] How can I save a plot ?

2007-11-21 Thread Paulo Justiniano Ribeiro Jr
have a look at: help(dev.print) (there are a few functions documented there and you can choose which one suits better your needs) concerning multiple graphics devices just open another one, for instance with x11() havina a look at help(dev.set) will provide further usrful information on the

[R] survest and survfit.coxph returned different confidence intervals on estimation of survival probability at 5 year

2007-11-21 Thread Xianqun (Wilson) Wang
I wonder if anyone know why survest (a function in Design package) and standard survfit.coxph (survival) returned different confidence intervals on survival probability estimation (say 5 year). I am trying to estimate the 5-year survival probability on a continuous predictor (e.g. Age in this ca

Re: [R] Frailty

2007-11-21 Thread Gad Abraham
David wrote: > Hi > Which package(s) is R fit frailty models to univariate survival data, i.e. > simple data with one survival time per person. I haven't used it myself, but have a look at ?frailty in the survival package. -- Gad Abraham Department of Mathematics and Statistics The University

Re: [R] Different freq returned by spec.ar() and spec.pgram()

2007-11-21 Thread Prof Brian Ripley
Frequency has units (1/wavelength), and this is just a question of using different units. For monthly series, is this per month or per year? The functions were written for R at different times by different people: it would seem to make sense to alter spec.ar to use the per year interpretation.

Re: [R] How can I save a plot ?

2007-11-21 Thread Bert Gunter
Maura: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maura E Monville Sent: Wednesday, November 21, 2007 12:46 PM To: [EMAIL PROTECTED] Subject: [R] How can I save a plot ? I recently installed R 2.6 on Linux/SuSE When I was running the previous versio

[R] Different freq returned by spec.ar() and spec.pgram()

2007-11-21 Thread Eric Thompson
Dear list, I've recently become interested in comparing the spectral estimates using the different methods ("pgram" and "ar") in the spectrum() function in the stats package. With many thanks to the authors of these complicated functions, I would like to point out what looks to me like a bit of a

[R] R 2.6.0 Error in X11() : could not find X11 fonts

2007-11-21 Thread Correia, James
All- I have rhel4 and just installed R2.6.0. The error suggests it cant find the font library. I have failed to trouble shoot. Can anyone help me? Thanks James Correia Jr Post Doc PH: 372-6463 [EMAIL PROTECTED] "Wisdom. Strength. Courage. Generosity. Each of us are born with one of these. We mu

Re: [R] ggplot2 axis labels

2007-11-21 Thread hadley wickham
That should still work? If it doesn't, you should be able to figure out what the new element name is by following the recipe in the last chapter of the ggplot book. Hadley On 11/21/07, Felipe Carrillo <[EMAIL PROTECTED]> wrote: > Hi: > Does anyone(Hadley?)know how to change the axis labels > with

[R] How can I save a plot ?

2007-11-21 Thread Maura E Monville
I recently installed R 2.6 on Linux/SuSE When I was running the previous version on Windows I was able to save my plots from a script. There was a command "savePlot" that is no more retrieved in the last version. In this scenario, how can I tell R to save the currently displayed plot to a file ? Th

[R] fitting a line to a logaritmic plot

2007-11-21 Thread Joren Heit
Hi, I have processed measurements of a rough surface to a heigh-height correlation plot. What the meaning of this exactly is, is not important. Only that it is a plot that had two (almost ) linear parts when plotted on a logaritmic scale. In this plot, I want to draw the best fitting lines for the

Re: [R] matrix elementwise average with NA's

2007-11-21 Thread Marc Schwartz
On Wed, 2007-11-21 at 14:30 -0500, Gregory Gentlemen wrote: > Hello fellow R users, > > I have a matrix computation that I imagine should be relatively easy > to do, however I cannot figure out a nice way to do it. I have two > matrices, for example > > mat1 <- matrix(c(1:5,rep(NA,5), 6:10), nro

Re: [R] Changing axis scale

2007-11-21 Thread Greg Snow
The zoomplot function in the TeachingDemos package does this. Note however that it is a quick and dirty kludge that should only be used for quick exploring. If you plan to use the graph for anything more than suggesting the next graph to make, then you should rerun the graphics command setting th

Re: [R] matrix elementwise average with NA's

2007-11-21 Thread Matthew Keller
Maybe there is a more elegant solution, but here is one possibility: mat1[is.na(mat1)]<-mat2[is.na(mat1)] mat2[is.na(mat2)]<-mat1[is.na(mat2)] (mat1+mat2)/2 On Nov 21, 2007 12:30 PM, Gregory Gentlemen <[EMAIL PROTECTED]> wrote: > Hello fellow R users, > > I have a matrix computation that I imagi

[R] ggplot2 axis labels

2007-11-21 Thread Felipe Carrillo
Hi: Does anyone(Hadley?)know how to change the axis labels with the new version of ggplot2? With the old version I used the code below: grid.gedit("label", gp=gpar(fontsize=10, col="blue")) Thanks Felipe D. Carrillo Fishery Biologist US Fish & Wildlife Service California, USA _

[R] matrix elementwise average with NA's

2007-11-21 Thread Gregory Gentlemen
Hello fellow R users, I have a matrix computation that I imagine should be relatively easy to do, however I cannot figure out a nice way to do it. I have two matrices, for example mat1 <- matrix(c(1:5,rep(NA,5), 6:10), nrow=3, byrow=T) mat2 <- matrix(c(2:6, 6:10, rep(NA,5)), nrow=3, byrow=T) I

Re: [R] Reconstruct array dataset

2007-11-21 Thread Julian Burgos
Hey Marc, You can use the function scan() directly to read your file as a single vector. Then, as Rob suggested, use the matrix function to give it the dimensions you want. Other option (perhaps less elegant) is to do something like this. x=read.table (myfile,...etc.etc.) x=as.vector(as.matri

Re: [R] better curve

2007-11-21 Thread Julian Burgos
Hello Mysimbaa, If you want to fit a smooth line to your data, there are many ways to do it. One option is to use splines. See the smooth.spline() function. If you only want to add a line to highlight the trend in your data, that should be enough. But if you want to do more serious analytica

Re: [R] uniq -c

2007-11-21 Thread Charles C. Berry
A further tip: subset(as.data.frame(xtabs( ~. , dat )), Freq != 0 ) Comes very close to generating output along the lines of what 'sort | uniq -c' provides (if this is what was wanted rather than rle() ) and works for multiple columns of data. The count becomes the last colum

Re: [R] Help Required in using cast (reshape package) function

2007-11-21 Thread hadley wickham
On 11/21/07, Punit Anand <[EMAIL PROTECTED]> wrote: > Hello everyone, > > Since the fields in variables column are unique with respect to ID and > fiscal year; any function like > sum,min,max,mean etc will lead to the desired result You should probably check that, as the warning only occurs when a

[R] Choosing the right model

2007-11-21 Thread Marc Bernard
Dear All, Sorry if this question may not be appropriate to this list. I have the following question about the significance of effects in NLME. I fitted data with nlme using the SSlogis as a specification for the conditional mean of my dependent variable Y. When xmid and scal were considered

Re: [R] Packages - a great resource, but hard to find the right one.

2007-11-21 Thread Mike Prager
"John Sorkin" <[EMAIL PROTECTED]> wrote: >>> The multitude of packages is one of the great strengths of R. Unfortunately there is no (or at least I am not aware of) any single source that lists all available packages and gives a synopsis of what each package does. One can install and load packag

Re: [R] t.test : extracting Error

2007-11-21 Thread Uwe Ligges
mogra wrote: > Hi Thanks for the reply. > > I implemented your solution to my problem but ... > > For some of my column there is not enough data to do t-test so it gives me > error and stops the for loop, is any graceful way to check for error msg and > say ok if there is no $p.value continue t

Re: [R] Help Required in using cast (reshape package) function

2007-11-21 Thread Punit Anand
Hello everyone, Since the fields in variables column are unique with respect to ID and fiscal year; any function like sum,min,max,mean etc will lead to the desired result Therefore cast(dataread, ID + Period ~ variable,sum) Will lead to the desired result in my case; Thanks, Punit -Ori

Re: [R] question about multiple comparison in ANOVA

2007-11-21 Thread Mark Wardle
Hello. I'm replying because you haven't had a reply. You haven't said which system you are running or which version of different packages you have installed. On my system (see below for the results from running sessionInfo()) that code runs fine with no errors at all. library(multcomp) # Loadin

Re: [R] How do I import packages with the package I've built?

2007-11-21 Thread Uwe Ligges
Nutter, Benjamin wrote: > So if I understand you correctly, if I include in my namespace file the > commandimportFrom(MASS, stepAIC), whenever stepAIC is called from > my package, it will still run even if I haven't explicitly imported the > MASS package? Yes. > Or if I use the command

[R] better curve

2007-11-21 Thread mysimbaa
Hi R users, I have collected data which I plot(x,y).The problem it has oscillations. Now i'm trying to "make better" this curve with a smooth line. And then collect my new datas. But I don't know how doing this. Perhaps a linear regression ?? See .jpeg foto. Thanks for any help it will be give

[R] Help Required in using cast (reshape package) function

2007-11-21 Thread Punit Anand
Hello everyone, I am new to R. I have data in the form of excel pivot table format and I want to cast it into a format which can make it compatible with computation. Since I already have the package in pivot format; I avoid melt function and use the cast directly. I inspect the dataread <- re

Re: [R] Help Required

2007-11-21 Thread jim holtman
There is code for moving averages already in R. There is some information in the 'zoo' package. ?filter What specifically are you looking for? On Nov 20, 2007 11:53 PM, Kushal M Shah <[EMAIL PROTECTED]> wrote: > Hi Friends > > > > I am working on a Financial Model project in R and require help i

Re: [R] shrink a dataframe for plotting

2007-11-21 Thread jim holtman
Try 'hexbin' for plotting this many points. On Nov 21, 2007 5:05 AM, Alexy Khrabrov <[EMAIL PROTECTED]> wrote: > I get tables with millions of rows. For plotting to a screen-size > jpg, obviously just about 1000 points are enough. Instead of feeding > plot() the original millions of rows, I'd ra

Re: [R] Reconstruct array dataset

2007-11-21 Thread John Kane
I seem to be missing something. How can you have a rectanglar data.frame of 12* 50 and convert it into 11 * x? 600/11 is not an integer. However leaving that minor detail aside: Let xx be the data.frame that you have read in: yy <- unlist(xx) zz <- t(matrix(yy, nrow=11)) might work. ---

Re: [R] Packages - a great resource, but hard to find the right one.

2007-11-21 Thread Christos Hatzis
Another useful search facility is http://www.rseek.org The nice thing is that it categorizes results by help-list items, R function etc. It might be closer to what you are looking for. -Christos Christos Hatzis, Ph.D. Nuvera Biosciences, Inc. 400 West Cummings Park Suite 5350 Woburn, MA 01801 Te

Re: [R] Packages - a great resource, but hard to find the right one.

2007-11-21 Thread Gavin Simpson
On Wed, 2007-11-21 at 09:24 -0500, John Sorkin wrote: > Fellow Rers, > > Please forgive me if I have posted this to the wrong R list serve. > > Over the course of the years that I have used R and participated in > this list server, I have noted a large number of questions and answers > that direc

Re: [R] Packages - a great resource, but hard to find theright one.

2007-11-21 Thread Ken Knoblauch
> >>> Gabor Csardi rmki.kfki.hu> 11/21/07 9:31 AM >>> > http://cran.r-project.org/src/contrib/PACKAGES.html > Isn't this good enough? You might also take a look at > http://cran.r-project.org/src/contrib/Views/ > On Wed, Nov 21, 2007 at 09:24:14AM -0500, John Sorkin wrote: > > Over the course of

[R] Frailty

2007-11-21 Thread David
Hi Which package(s) is R fit frailty models to univariate survival data, i.e. simple data with one survival time per person. David [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-

[R] Help Required

2007-11-21 Thread Kushal M Shah
Hi Friends I am working on a Financial Model project in R and require help in writing code for Moving Averages. Since I am very new to R, it would be good if any seniors in the group can guide me on a proper moving average code. Thanks & Best Regards, Kushal The information in thi

[R] randomForest() question

2007-11-21 Thread Peter Tait
Hi, I am trying to find some information on the strata option in randomForest(). I am hoping to make predictions from some clustered data (many predictors measured repeatedly on the same subject over time). I would like to apply random forests or gradient boosting ( gbm() ) to this problem but

[R] t.test : extracting Error

2007-11-21 Thread mogra
Hi Thanks for the reply. I implemented your solution to my problem but ... For some of my column there is not enough data to do t-test so it gives me error and stops the for loop, is any graceful way to check for error msg and say ok if there is no $p.value continue to the next column Once agai

Re: [R] any measure for curvature

2007-11-21 Thread Bartjoosen
You mean non-linearity? You can use a lack of fit test by using: anova(lm(y ~ x+factor(x), data)) The F-value of factor(x) is the lack of fit test, and when lineair, the p value should be <0.05 when using 0.95% significance. Bart Wensui Liu wrote: > > in statistics, is there a measure for curv

Re: [R] Packages - a great resource, but hard to find the right one.

2007-11-21 Thread Prof Brian Ripley
On Wed, 21 Nov 2007, John Sorkin wrote: > Gabor, > The URL you cited is helpful, but it is not searchable. It can not be > used, for example, to easily determine that MASS can be used for boxcox > tranforms. It is searchable (use your browser's search facilities), and that is often helpful.

Re: [R] Changing axis scale

2007-11-21 Thread aaront
xlim(),ylim() so, ylim(2000,3000) mysimbaa wrote: > > Hello R users, > > Is it possible after making a plot(x,y) to change axis scale? > For example : I have a range of 0 to 3000 in my y-axis and I want to make > a zoom between 2000 and 3000. > > > Thanks for any help. > -- View this me

Re: [R] Reconstruct array dataset

2007-11-21 Thread marcg
This was my intention, but I'm not able to read it in as a vector (because i don't know the function, neither I can convert the read in table to a vector and then to matrix or directly. What did I miss or where do I have to look up? thanks alot marc Original-Nachricht > Datum

[R] Changing axis scale

2007-11-21 Thread mysimbaa
Hello R users, Is it possible after making a plot(x,y) to change axis scale? For example : I have a range of 0 to 3000 in my y-axis and I want to make a zoom between 2000 and 3000. Thanks for any help. -- View this message in context: http://www.nabble.com/Changing-axis-scale-tf4850633.html#

Re: [R] Packages - a great resource, but hard to find the right one.

2007-11-21 Thread John Sorkin
Gabor, The URL you cited is helpful, but it is not searchable. It can not be used, for example, to easily determine that MASS can be used for boxcox tranforms. John John Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics Baltimore VA Medical Center GRECC, University of Maryland School of Me

Re: [R] Packages - a great resource, but hard to find the right one.

2007-11-21 Thread Gabor Csardi
John, what about http://cran.r-project.org/src/contrib/PACKAGES.html Isn't this good enough? You might also take a look at http://cran.r-project.org/src/contrib/Views/ Gabor On Wed, Nov 21, 2007 at 09:24:14AM -0500, John Sorkin wrote: > Fellow Rers, > > Please forgive me if I have posted this

Re: [R] plotting coxph results using survfit() function

2007-11-21 Thread Terry Therneau
The survfit function, when applied to the results of a Cox model, will give the predicted survival curve for any particular combination of covariates in the model. You cannot get what you are asking for, i.e., distinct levels of X while ignoring Y, from survfit. What you need to do is cre

[R] Packages - a great resource, but hard to find the right one.

2007-11-21 Thread John Sorkin
Fellow Rers, Please forgive me if I have posted this to the wrong R list serve. Over the course of the years that I have used R and participated in this list server, I have noted a large number of questions and answers that direct people to specific packages. The multitude of packages is one of

Re: [R] biocep project (R for the Web and the Virtual R Workbench)

2007-11-21 Thread elw
Some of the bits and pieces in this look like very strong candidates for breaking off into CRAN packages, if you haven't done so already. This looks like very nice work - you should be proud! :-) --elijah On Mon, 19 Nov 2007, Karim Chine wrote: > Date: Mon, 19 Nov 2007 19:44:51 + > Fr

[R] Reconstruct array dataset

2007-11-21 Thread marcg
Hi there I have an interesting problem: My csv file is of array dimensions [12,50], but it was saved the wrong way: there should be only 11 colums. What happens now if I read it into R is that the whole data set is shifted ( in the first row, the last column contains already the first value of

Re: [R] R as server application

2007-11-21 Thread Henrik Bengtsson
Hi, tbe R.batch package (http://www.braju.com/R/) was written to run multiple batch jobs on one or more hosts sharing the same file system. It doesn't do everything you want but part of it. For details, see r-help thread 'R.batch (Was: Re: [R] Calling R from R and specifying "wait until script is

Re: [R] Logarithmic axis -- now in new version of 'sfsmisc'

2007-11-21 Thread Martin Maechler
> "GaGr" == Gabor Grothendieck <[EMAIL PROTECTED]> > on Tue, 20 Nov 2007 13:35:34 -0500 writes: GaGr> See: GaGr> http://finzi.psych.upenn.edu/R/Rhelp02a/archive/57255.html Also, incidentally several weeks ago, I had added the following to the 'ChangeLog' of my package "sfsmis

Re: [R] multiple comparison (glht) problem

2007-11-21 Thread Chuck Cleland
Anqi Qiu wrote: > I am not sure whether there is a bug. When I tested the example given for > "glht" > in the help, I entered the following error: > > Running commands: > > amod <- aov(minutes ~ blanket, data = recovery) > rht <- glht(amod, linfct = mcp(blanket = "Dunnett"), > alte

Re: [R] R as server application

2007-11-21 Thread Scionforbai
Do you need something more than a simple ssh connection to a remote host in which you run R (trivial when the server is Linux)? My advice is to run R in a "screen" session on the remote host (it protects from sudden disconnections). Then you have a window on your screen with the R command line, wh

Re: [R] uniq -c

2007-11-21 Thread Henrique Dallazuanna
See ?table function. On 21/11/2007, Alexy Khrabrov <[EMAIL PROTECTED]> wrote: > Is there an R analog of the Unix command uniq -c: > > http://en.wikipedia.org/wiki/Uniq > > Given an array x, uniq -c replaces each contiguous subsequence of > identical numbers with a tuple (count, number). E.g. > >

Re: [R] uniq -c

2007-11-21 Thread Marc Schwartz
On Wed, 2007-11-21 at 15:27 +0300, Alexy Khrabrov wrote: > Is there an R analog of the Unix command uniq -c: > > http://en.wikipedia.org/wiki/Uniq > > Given an array x, uniq -c replaces each contiguous subsequence of > identical numbers with a tuple (count, number). E.g. > > $ cat > usample

[R] multiple comparison (glht) problem

2007-11-21 Thread Anqi Qiu
I am not sure whether there is a bug. When I tested the example given for "glht" in the help, I entered the following error: Running commands: amod <- aov(minutes ~ blanket, data = recovery) rht <- glht(amod, linfct = mcp(blanket = "Dunnett"), alternative = "less") Errors are: Err

[R] uniq -c

2007-11-21 Thread Alexy Khrabrov
Is there an R analog of the Unix command uniq -c: http://en.wikipedia.org/wiki/Uniq Given an array x, uniq -c replaces each contiguous subsequence of identical numbers with a tuple (count, number). E.g. $ cat > usample 10 10 9 8 8 7 7 7 6 3 1 1 1 0 $ uniq -c usample 2 10 1 9

Re: [R] NA values

2007-11-21 Thread Eleni Christodoulou
Yes, thanks a lot! It works fine! Eleni On Nov 21, 2007 2:03 PM, Ted Harding <[EMAIL PROTECTED]> wrote: > > On 21-Nov-07 11:15:32, Eleni Christodoulou wrote: > > Hi all! > > I am new to R and I would like to ask you the following question: > > How can I substitute the NA values with 0 in a data f

Re: [R] display basename

2007-11-21 Thread mysimbaa
Thanks for help. -- View this message in context: http://www.nabble.com/display-basename-tf4846650.html#a13876120 Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-hel

[R] question about multiple comparison in ANOVA

2007-11-21 Thread Qiu Anqi
I am not sure whether there is a bug. When I tested the example given for "glht" in the help, I entered the following error: Running commands: amod <- aov(minutes ~ blanket, data = recovery) rht <- glht(amod, linfct = mcp(blanket = "Dunnett"), alternative = "less") Errors are

[R] R as server application

2007-11-21 Thread Kilian Schwab
Is there a way to use R as a client server application? Whitch means: 1. install R on a server (running as a service) 2. from client send R-scripts through IDE/Editor (TINN-R) to "R-server" 3. receive R-output on client All the Best Kilian Schwab ___

Re: [R] NA values

2007-11-21 Thread Ted Harding
On 21-Nov-07 11:15:32, Eleni Christodoulou wrote: > Hi all! > I am new to R and I would like to ask you the following question: > How can I substitute the NA values with 0 in a data frame? > I cannot find a command to check if a value is NA... > > Thank you very much! > Eleni As has been said, is

[R] Odp: ave and sd

2007-11-21 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 21.11.2007 10:45:55: > Dear list, > > I'm still trying to calculate the sd for V2 for > each group in V1 if V3 is '0': > > > x > V1 V2 V3 > 1 A01 2.40 0 > 2 A01 3.40 1 > 3 A01 2.80 0 > 4 A02 3.20 0 > 5 A02 4.20 0 > 6 A03 2.98 1 > 7 A03 2.31 0 > 8 A04

[R] normalised Voigt random numbers

2007-11-21 Thread Waterman, DG (David)
Dear list, I would like to generate random numbers from a Voigt distribution, hopefully in a way as simple as getting random numbers from a normal distribution with 'rnorm'. Is there any package to do this? Speed is an issue in this application. Or, as the Voigt distribution is a convolution of a

Re: [R] NA values

2007-11-21 Thread Jared O'Connell
?is.na On Nov 21, 2007 12:15 PM, Eleni Christodoulou <[EMAIL PROTECTED]> wrote: > Hi all! > > I am new to R and I would like to ask you the following question:How > can I substitute the NA values with 0 in a data frame? I cannot find a > command to check if a value is NA... > > Thank you very muc

Re: [R] NA values

2007-11-21 Thread Gabor Csardi
Eleni, this question appears about every month on this list, try using the RSiteSearch command before posting. Thanks. RSiteSearch("replace NA") http://finzi.psych.upenn.edu/R/Rhelp02a/archive/109176.html Gabor On Wed, Nov 21, 2007 at 01:15:32PM +0200, Eleni Christodoulou wrote: > Hi all! > >

Re: [R] shrink a dataframe for plotting

2007-11-21 Thread Alex Brown
For me the largest challenge with such data sets is the extra time that it takes to develop the appropriate graph, given the time it takes to plot each prototype. Once I have got the graph scale decorations etc correct then the time for the final plot is almost irrelevant. For this reason

[R] NA values

2007-11-21 Thread Eleni Christodoulou
Hi all! I am new to R and I would like to ask you the following question:How can I substitute the NA values with 0 in a data frame? I cannot find a command to check if a value is NA... Thank you very much! Eleni __ R-help@r-project.org mailing list htt

[R] Displaying R, N, Z-symbols with expression

2007-11-21 Thread C.J.Albers
Hi all, (Apologies if this has been asked before; I tried to search for it in the archives, but searching for terms like 'N' yields too many hits) Is it possible to display symbols like 'R' (the set of real numbers, so with an additional vertical line on the left) in plots using expression/plot

Re: [R] sorting dataframe

2007-11-21 Thread Søren Højsgaard
- or the orderBy function in the doBy package. Soren From: [EMAIL PROTECTED] on behalf of Henrik Bengtsson Sent: Wed 21-11-2007 11:14 To: Rina Oldager Miehs Cc: r-help@r-project.org Subject: Re: [R] sorting dataframe See order(). -Henrik On 21/11/2007, Rina Ol

Re: [R] shrink a dataframe for plotting

2007-11-21 Thread Alexy Khrabrov
On Nov 21, 2007, at 1:24 PM, Thibaut Jombart wrote: > Alexy Khrabrov wrote: > >> I get tables with millions of rows. For plotting to a screen-size >> jpg, obviously just about 1000 points are enough. Instead of feeding >> plot() the original millions of rows, I'd rather shrink the original >> d

Re: [R] shrink a dataframe for plotting

2007-11-21 Thread Thibaut Jombart
Alexy Khrabrov wrote: >I get tables with millions of rows. For plotting to a screen-size >jpg, obviously just about 1000 points are enough. Instead of feeding >plot() the original millions of rows, I'd rather shrink the original >dataframe, using some kind of the following interpolation: >

Re: [R] sorting dataframe

2007-11-21 Thread Henrik Bengtsson
See order(). -Henrik On 21/11/2007, Rina Oldager Miehs <[EMAIL PROTECTED]> wrote: > Hello > > We have a problem with sorting our dataframe... > i have tried to write > > x <- males[sort(males$index, decreasing=T),] > > But that just gives me > > > x > id sex BVgain BVmeat phenogain phenomeat

[R] shrink a dataframe for plotting

2007-11-21 Thread Alexy Khrabrov
I get tables with millions of rows. For plotting to a screen-size jpg, obviously just about 1000 points are enough. Instead of feeding plot() the original millions of rows, I'd rather shrink the original dataframe, using some kind of the following interpolation: -- split dataframe into chu

[R] sorting dataframe

2007-11-21 Thread Rina Oldager Miehs
Hello We have a problem with sorting our dataframe... i have tried to write x <- males[sort(males$index, decreasing=T),] But that just gives me > x id sex BVgain BVmeat phenogain phenomeat index NANA NA NA NANANANA NA.1 NA NA NA NANA

[R] ave and sd

2007-11-21 Thread Patrick Hausmann
Dear list, I'm still trying to calculate the sd for V2 for each group in V1 if V3 is '0': > x V1 V2 V3 1 A01 2.40 0 2 A01 3.40 1 3 A01 2.80 0 4 A02 3.20 0 5 A02 4.20 0 6 A03 2.98 1 7 A03 2.31 0 8 A04 4.20 0 # Work x$vmean <- ave(x$V2, x$V1, x$V3 == 0, FUN = mean) # Work x$vsd2 <-

Re: [R] problem with nb2listw

2007-11-21 Thread Thibaut Jombart
[EMAIL PROTECTED] wrote: >Hi, >I am a new student to R and I was hoping someone could help me with >the error message I keep getting when I try to use the nb2listw() >function. > >I have 45 sites and I want to get an autocorrelation value for sites >within 1000m of each other. > >coords<-cbi

Re: [R] rowSums() and is.integer()

2007-11-21 Thread Prof Brian Ripley
On Wed, 21 Nov 2007, Robin Hankin wrote: > > On 21 Nov 2007, at 08:30, Prof Brian Ripley wrote: > >> On Tue, 20 Nov 2007, Tim Hesterberg wrote: >> >>> I wrote the original rowSums (in S-PLUS). >>> There, rowSums() does not coerce integer to double. >> >> Actaully, neither does R. It computes a

Re: [R] rowSums() and is.integer()

2007-11-21 Thread Robin Hankin
On 21 Nov 2007, at 08:30, Prof Brian Ripley wrote: > On Tue, 20 Nov 2007, Tim Hesterberg wrote: > >> I wrote the original rowSums (in S-PLUS). >> There, rowSums() does not coerce integer to double. > > Actaully, neither does R. It computes a double answer but does no > coercion per se. > >> Ho

Re: [R] Calculating AUC from ROCR

2007-11-21 Thread Tobias Sing
Dear Ilham, see ?performance for a list of available performance measures ('auc' gives AUC, 'rmse' gives root-mean-squared error). Here is a link to a slide deck with several examples: http://rocr.bioinf.mpi-sb.mpg.de/ROCR_Talk_Tobias_Sing.ppt HTH, Tobias On 11/21/07, G Ilhamto <[EMAIL PROTE

Re: [R] as.character(seq(-.35,.95,.1))

2007-11-21 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 20.11.2007 17:07:42: > On 11/20/2007 10:50 AM, Ken Fullish wrote: > > > as.character(seq(-.25,.95,.1)) > > [1] "-0.25" "-0.15" "-0.05" "0.05" "0.15" "0.25" "0.35" "0.45" > > "0.55" "0.65" "0.75" "0.85" "0.95" > > > > > as.character(seq(-.35,.95,.1)) >

Re: [R] rowSums() and is.integer()

2007-11-21 Thread Prof Brian Ripley
On Tue, 20 Nov 2007, Tim Hesterberg wrote: > I wrote the original rowSums (in S-PLUS). > There, rowSums() does not coerce integer to double. Actaully, neither does R. It computes a double answer but does no coercion per se. > However, one advantage of coercion is to avoid integer overflow. In

Re: [R] How to select rows with identical index from two matrix?

2007-11-21 Thread Henrik Bengtsson
On Nov 20, 2007 7:04 PM, Moshe Olshansky <[EMAIL PROTECTED]> wrote: > You can do the following: > > set1 <- Matrix1[,1] > set2 <- Matrix2[,1] > common <- intersect(set1,set2) > ind1 <- which(set1 %in% common) > ind2 <- which(set2 %in% common) > > A1 <- Matrix1[ind1,-1] > A2 <- Matrix2[ind2,-1] Ok,

Re: [R] problem modeling time series

2007-11-21 Thread Prof Brian Ripley
You appear to have fitted a seasonal model to a non-seasonal time series. See ?ts for how to set up a time series (a step you seem to have omitted), and ?arima for how to specify the model in R. Otherwise, this is not the place for a tutorial on fitting time series, and many of us do not offer s

Re: [R] equivalent of Matlab robustfit?

2007-11-21 Thread Prof Brian Ripley
There are several aspects of that description that are worrying, including the starting point (looks like a least-squares fit is done), and the covariance matrix estimate. For more comprehensive approaches to robust linear model fitting, see rlm in MASS and lmRob in package robust. help.search(

[R] How to extract the Deviance of a glm fit result

2007-11-21 Thread leffgh
dear List: glm(a~b+c,family=binomial,data=x)->fit deviance(fit) returns the same as the residual deviance. I don't not know much about logistic regression.Some book tells that: " Deviance (likelihood ratio statistic): Deviance = -2log( likelihoodof the currentmodel /likelihoodof thesaturated

  1   2   >