[R] 4 questions regarding hypothesis testing, survey package, ts on samples, plotting

2007-12-18 Thread eugen pircalabelu
Good morning! I have 4 questions which trouble me: 1. I want to test the hypothesis that the 2 proportions (the mean of a binomial) which come from 2 different samples are equal. I want to use the following function z= (p1-p2)/ sqrt((p1(1-p1)/n1)+(p2(1-p2)/n2)) which is one of the standard f

Re: [R] strange timings in convolve(x,y,type="open")

2007-12-18 Thread owen
Thanks Charles. That must be it. (Berwin also noticed this.) When convolve hit the wall, I switched over to FFTW in C. That is actually pretty nice code which runs in n log(n) even for prime n and takes special account of factors of n up to about 19 or so. So if the R team ever wants to put i

[R] plot cummulative sum from calendar time

2007-12-18 Thread gallon li
I have the following list of observations of calendar time: [1] 03-Nov-1997 09-Oct-1991 27-Aug-1992 01-Jul-1994 19-Jan-1990 12-Nov-1993 [7] 08-Oct-1993 10-Nov-1982 08-Dec-1986 23-Dec-1987 02-Aug-1995 20-Oct-1998 [13] 29-Apr-1991 16-Mar-1994 20-May-1991 28-Dec-1987 14-Jul-1999 27-Nov-1998 [19] 09

Re: [R] strange timings in convolve(x,y,type="open")

2007-12-18 Thread Charles C. Berry
On Tue, 18 Dec 2007, Art Owen wrote: > Dear R-ophiles, > > I've found something very odd when I apply convolve > to ever larger vectors. Here is an example below > with vectors ranging from 2^11 to 2^17. There is > a funny bump up at 2^12. Then it gets very slow at 2^16. The time is consumed

Re: [R] read.table() and precision?

2007-12-18 Thread Moshe Olshansky
Thank you for your response! 'write.table' writes up to 15 decimal digits which is not the machine (double) precision but not far from that - sorry for the misleading comments! After all I found a way to do what I needed without using disk or much memory and doing only twice as much work as I cou

Re: [R] assigning and saving datasets in a loop, with names changing with "i"

2007-12-18 Thread Benilton Carvalho
you want to use: save(list=paste("data", i, sep=""), file=paste("data", i, ".Rdata", sep="")) b On Dec 18, 2007, at 9:24 PM, Marie Pierre Sylvestre wrote: Dear R users, I am analysing a very large data set and I need to perform several data manipulations. The dataset is so big that the

[R] assigning and saving datasets in a loop, with names changing with "i"

2007-12-18 Thread Marie Pierre Sylvestre
Dear R users, I am analysing a very large data set and I need to perform several data manipulations. The dataset is so big that the only way I can play with it without having memory problems (E.g. "cannot allocate vectors of size...") is to write a batch script to: 1. cut the data into pieces 2.

Re: [R] creating a database

2007-12-18 Thread elw
> Can a simple matrix be used for this or would it be better and more > efficient to create an external database to hold the data. If so, > should the database be created using C and how would I do this (seeing > as that I have never programmed in C)? You don't want to be down at the C level

Re: [R] accessing dimension names

2007-12-18 Thread Moshe Olshansky
To access your dimension idx you could do either assign("a",paste("dimnames(y)$x",idx,sep="")) or eval(parse(text=paste("a<-dimnames(y)$x",idx,sep=""))) --- [EMAIL PROTECTED] wrote: > I have a matrix y: > > > dimnames(y) > $x93 > [1] "1" "2" > > $x94 > [1] "0" "1" "2" > .. so on

Re: [R] "gam()" in "gam" package

2007-12-18 Thread Kunio takezawa
R-users E-mail: r-help@r-project.org > This iteration seems to be for "iteratively reweighted least squares" not >for backfitting. And lm.wfit may solve multiple linear equation using >QR decomposition; but I am not sure. Let me tell you something about my guess above. The iteration below is f

[R] strange timings in convolve(x,y,type="open")

2007-12-18 Thread Art Owen
Dear R-ophiles, I've found something very odd when I apply convolve to ever larger vectors. Here is an example below with vectors ranging from 2^11 to 2^17. There is a funny bump up at 2^12. Then it gets very slow at 2^16. > for( i in 11:20 )print( system.time(convolve(1:2^i,1:2^i,type="o"

Re: [R] Factor Madness

2007-12-18 Thread Tony Plate
Whoops, it looks like there's a typo in ?cbind (R version 2.6.0 Patched (2007-10-11 r43143)), and I blindly copied it into my message. That should read (emphasis added): "and convert character columns to factors unless stringsAsFactors = ***FALSE***" Here's an example: > x <- data.frame(X=1:

Re: [R] leaps

2007-12-18 Thread Maura E Monville
Thank you very much for the example. I think interactively I could get something. But my obstacle is to write an R script that processes my set of data automatically. My difficulty is to extract the information that appears on the screen, when R is operated interactively, from a scripts. Let me g

Re: [R] "gam()" in "gam" package

2007-12-18 Thread Kunio takezawa
R-users E-mail: r-help@r-project.org >Please don't ask the same question multiple times! I am really sorry about it. I thought that my first mail did not work. >And no, backfitting and QR are unrelated concepts. You need to read up >on the theory, To derive an additive model, we have two

Re: [R] Factor Madness

2007-12-18 Thread Tony Plate
From ?cbind: Data frame methods The cbind data frame method is just a wrapper for data.frame(..., check.names = FALSE). This means that it will split matrix columns in data frame arguments, and convert character columns to factors unless stringsAsFactors = TRUE is passed. (I'm guessing 'spect

[R] Multiple plots with single box

2007-12-18 Thread Giovanni Petris
Hello, I am trying to display some harmonic functions in a plot. The kind of display I have in mind is like the one that cn be obtained by a call to plot.ts with plot.type = "multiple". The only difference is that I want a single box containing all the plots instead of one box per plot. I thought

[R] Factor Madness

2007-12-18 Thread Johannes Graumann
Why is class(spectrum[["Ion"]]) after this "factor"? spectrum <- cbind(spectrum,Ion=rep("", nrow(spectrum)),Deviation.AMU=rep(0.0, nrow(spectrum))) slowly going crazy ... Joh __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

[R] Clustering Question (Support Vector Clustering)

2007-12-18 Thread Ionut Florescu
I am currently designing a clustering algorithm in collaboration with one of my colleagues. For comparison purposes we would like to contrast it with the Support Vector Clustering algorithm of (A. Ben-Hur, D. Horn, H.T. Siegelmann, and V. Vapnik. Support vector clustering. Journal of Machine Learni

Re: [R] plotting magnitude

2007-12-18 Thread hadley wickham
On Dec 18, 2007 2:06 PM, <[EMAIL PROTECTED]> wrote: > I am plotting fishing vessel positions and want these points to be > relative in size to the catch at that point. Is this possible? I am just > begining to use R and my search of the help section didnt help in this > area. Heres what Im using

Re: [R] calculating the number of days from dates

2007-12-18 Thread Rolf Turner
On 19/12/2007, at 6:46 AM, bogdan romocea wrote: >> Sorry for using library instead package, but >> library() is one command for using packages. > > ... which is why all efforts to make folks say "package" instead of >> > "library" << are doomed to fail, IMHO. Yes, but it gives so much p

[R] Random forests

2007-12-18 Thread Naiara Pinto
Dear all, I would like to use a tree regression method to analyze my dataset. I am interested in the fact that random forests creates in-bag and out-of-bag datasets, but I also need an estimate of support for each split. That seems hard to do in random forests since each tree is grown using a subs

Re: [R] How can I extract the AIC score from a mixed model object produced using lmer?

2007-12-18 Thread David Barron
You can calculate the AIC as follows: (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)) aic1 <- AIC(logLik(fm1)) Hope this helps. Dave On 12/18/07, Peter H Singleton <[EMAIL PROTECTED]> wrote: > > I am running a series of candidate mixed models using lmer (package lme4) > and I'd like

[R] How can I extract the AIC score from a mixed model object produced using lmer?

2007-12-18 Thread Peter H Singleton
I am running a series of candidate mixed models using lmer (package lme4) and I'd like to be able to compile a list of the AIC scores for those models so that I can quickly summarize and rank the models by AIC. When I do logistic regression, I can easily generate this kind of list by creating the

[R] [R-pkgs] Update of the np package (version 0.14-1)

2007-12-18 Thread Jeffrey S. Racine
Dear R users, An updated version of the np package has recently been uploaded to CRAN (version 0.14-1). The package is briefly described in a recent issue of Rnews (October, 2007, http://cran.r-project.org/doc/Rnews/Rnews_2007-2.pdf) for those who might be interested. A somewhat more detailed p

Re: [R] Dual Core vs Quad Core

2007-12-18 Thread Luke Tierney
On Tue, 18 Dec 2007, Prof Brian Ripley wrote: > On Tue, 18 Dec 2007, S Ellison wrote: > >> Hiding in the windows faq is the observation that "R's computation is >> single-threaded, and so it cannot use more than one CPU". So multi-core >> should make no difference other than allowing R to run with

Re: [R] All anchored series from a vector?

2007-12-18 Thread Johannes Graumann
Nothing to be sorry about. You suggested a viable solution untested ... my job to figure it out ;0) Joh [EMAIL PROTECTED] wrote: >>From: [EMAIL PROTECTED] >>Date: 2007/12/18 Tue PM 02:50:52 CST >>To: Johannes Graumann <[EMAIL PROTECTED]> >>Cc: r-help@r-project.org >>Subject: Re: [R] All anchored

Re: [R] All anchored series from a vector?

2007-12-18 Thread Gabor Csardi
On Wed, Dec 19, 2007 at 12:01:25AM +0100, Johannes Graumann wrote: > Debugged version: > lapply(1:length(myvector), function(.length) { > myvector[1:.length] > }) > > Thanks for showing the direction! > > Joh Note that this fails if length(myvector)==0. Good to know the corner cases. Gabor >

Re: [R] All anchored series from a vector?

2007-12-18 Thread Johannes Graumann
Elegant. Thanks to you too. Joh Gabor Csardi wrote: > miracle <- function(x) { lapply(seq(along=x), function(y) x[1:y]) } > > Gabor > > On Tue, Dec 18, 2007 at 11:40:37PM +0100, Johannes Graumann wrote: >> Hi all, >> >> What may be a smart, efficient way to get the following result: >> >> my

Re: [R] All anchored series from a vector?

2007-12-18 Thread Johannes Graumann
Debugged version: lapply(1:length(myvector), function(.length) { myvector[1:.length] }) Thanks for showing the direction! Joh [EMAIL PROTECTED] wrote: >>From: Johannes Graumann <[EMAIL PROTECTED]> >>Date: 2007/12/18 Tue PM 04:40:37 CST >>To: [EMAIL PROTECTED] >>Subject: [R] All anchored series

Re: [R] plotting magnitude

2007-12-18 Thread Dylan Beaudette
On Tuesday 18 December 2007, [EMAIL PROTECTED] wrote: > I am plotting fishing vessel positions and want these points to be > relative in size to the catch at that point. Is this possible? I am just > begining to use R and my search of the help section didnt help in this > area. Heres what Im usin

Re: [R] All anchored series from a vector?

2007-12-18 Thread Gabor Csardi
miracle <- function(x) { lapply(seq(along=x), function(y) x[1:y]) } Gabor On Tue, Dec 18, 2007 at 11:40:37PM +0100, Johannes Graumann wrote: > Hi all, > > What may be a smart, efficient way to get the following result: > > myvector <- c("A","B","C","D","E") > myseries <- miracle(myvector) > mys

Re: [R] All anchored series from a vector?

2007-12-18 Thread markleeds
>From: [EMAIL PROTECTED] >Date: 2007/12/18 Tue PM 02:50:52 CST >To: Johannes Graumann <[EMAIL PROTECTED]> >Cc: r-help@r-project.org >Subject: Re: [R] All anchored series from a vector? i'm sorry. i tested it afterwards and of course it had some problems. below is the working version. myvector<-c

Re: [R] All anchored series from a vector?

2007-12-18 Thread markleeds
>From: Johannes Graumann <[EMAIL PROTECTED]> >Date: 2007/12/18 Tue PM 04:40:37 CST >To: [EMAIL PROTECTED] >Subject: [R] All anchored series from a vector? lapply(1:length(myvector) function(.length) { c(myvector[1}:myvector[.length]) }) but test it because i didn't. >Hi all, > >What may be a s

Re: [R] All anchored series from a vector?

2007-12-18 Thread Johannes Graumann
Should have been: > myvector <- c("A","B","C","D","E") > myseries <- miracle(myvector) > myseries > [1] > [[1]] "A" > [2] > [[1]] "A" "B" > [3] > [[1]] "A" "B" "C" > [4] > [[1]] "A" "B" "C" "D" > [5] > [[1]] "A" "B" "C" "D" "E" Sorry, Joh Johannes Graumann wrote: > Hi all, > > What may be a sma

[R] All anchored series from a vector?

2007-12-18 Thread Johannes Graumann
Hi all, What may be a smart, efficient way to get the following result: myvector <- c("A","B","C","D","E") myseries <- miracle(myvector) myseries [1] [[1]] "A" [2] [[1]] "A" "B" [3] [[1]] "A" "B" [4] [[1]] "A" "B" "C" [5] [[1]] "A" "B" "C" "D" [6] [[1]] "A" "B" "C" "D" "E" Thanks for any hints,

Re: [R] Analyzing Publications from Pubmed via XML

2007-12-18 Thread David Winsemius
"Armin Goralczyk" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > On 12/18/07, David Winsemius <[EMAIL PROTECTED]> wrote: >> David Winsemius <[EMAIL PROTECTED]> wrote in >> news:[EMAIL PROTECTED]: >> >> > "Armin Goralczyk" <[EMAIL PROTECTED]> wrote in >> > news:[EMAIL PROTECTED]: >> >> >>

Re: [R] Scatterplot3d model reporting question

2007-12-18 Thread John Fox
Dear Max, I'm guessing that you're actually using scatter3d() in the Rcmdr package rather than scatterplot3d(), since the latter, I believe, doesn't fit regression surfaces. If I'm right, then as it says in ?scatter3d, the smooth surface is fit by the gam() function in the mgcv package using a

Re: [R] 3d plotting

2007-12-18 Thread Brad B
that worked. however Im trying to get a surface countour like persp() would show. Since I dont have a matrix data set, I assumed that the wireframe function would do. since I get an error using wireframe, no applicable method for "wireframe" I am using this plot3d. I was under the impres

[R] plotting magnitude

2007-12-18 Thread dkowalske
I am plotting fishing vessel positions and want these points to be relative in size to the catch at that point. Is this possible? I am just begining to use R and my search of the help section didnt help in this area. Heres what Im using so far xyplot(data$latdeg~data$londeg |vessek , groups=vess

Re: [R] Scatterplot3d model reporting question

2007-12-18 Thread John Fox
Dear Max, I'm guessing that you're actually using scatter3d() in the Rcmdr package rather than scatterplot3d(), since the latter, I believe, doesn't fit regression surfaces. If I'm right, then as it says in ?scatter3d, the smooth surface is fit by the gam() function in the mgcv package using a

[R] Specifying starting values in lme (nlme package) using msScale

2007-12-18 Thread Catherine A. Holt
I am using package nlme and would like to specify initial values for a linear mixed-effects model to help with convergence. I am trying to specify those initial values using the msScale option under ‘control’ in the lme() function: lme(Y ~ X1, random= ~ X1|X2, control=list(msScale=lmeScale))

Re: [R] 3d plotting

2007-12-18 Thread Scionforbai
> 60,000 I hope that you actually haven't got any comma to separate the thousands... it separates fields in a csv files (as the "Comma Separated Values" name may suggest). If so, get rid of the commas. > the 3dplot function returns this error, > (list) object cannot be coerced to 'double' > t

[R] Import GAUSS .FMT files

2007-12-18 Thread Pedro.Rodriguez
Dear All, Is it possible to import GAUSS .FMT files into R? Thanks for your time. Kind Regards, Pedro N. Rodriguez [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/lis

[R] Forestplot

2007-12-18 Thread francogrex
I know there is a function forestplot from rmeta package and also the plot.meta from the meta package and maybe others, but they are rather complicated with extra plot parameters that I do not need and also they process only objects created with other package functions. But I wonder if anyone has

[R] 3d plotting

2007-12-18 Thread Brad B
I am trying to dp a 3d plot. I tried persp but my data is not a matrix. the 3dplot function returns this error, (list) object cannot be coerced to 'double' heres my code, td<-read.csv("td.csv", header=TRUE) price<-read.csv("price.csv", header=TRUE) contractdate<-read.csv("contractdate.csv"

[R] comparing poisson distributions

2007-12-18 Thread Mark Gosink
Hello all, I would like to compare two sets of count data which form Poisson distributions. I'd like to generate some sort of p-value of the likely-hood that the distributions are the same. Thanks in advance for your advice. Cheers, Mark Mark Gosink, Ph.D. Head of Computation

[R] Scatterplot3d model reporting question

2007-12-18 Thread Max
I've used the scatterplot3d function to graph some data and had it graph a "smooth" fit. Is there a way to actualy find out the function of the surface? I've looked through the help and figured out how to get it to report the following: Family: gaussian Link function: identity Formula: y ~ s(x

Re: [R] PCA - "cov.wt(z) : 'x' must contain finite values only"

2007-12-18 Thread Ravi Varadhan
The problem is the missing values. The argument "na.action" is not active in princomp(), which I think is a bug, even though the help page claims that "factory fresh" default is na.omit. So, you need to either get rid of the rows with any missing values in them, or use a PCA code that can deal wi

Re: [R] R brakes when submitting a query to MySQL

2007-12-18 Thread Marc Moragues
You are right, it was a mistake copying and pasting the code. There is no error message from R when I run con2. I get a Windows error message saying "R for windows terminal front-end has encountered a problem and need to close". The error signature is: AppName: rterm.exe AppVer: 2.60.43063.

Re: [R] Scatterplot Showing All Points

2007-12-18 Thread bogdan romocea
Another approach which I'm pleased with but was not suggested so far is jitter + kde2d from MASS: plot(jitter(x), jitter(y)) if (!exists("kde2d")) require(MASS) kdesamp <- 2 #depending on your RAM forkde <- if (kdesamp < length(x)) sample(1:length(x), kdesamp, replace=FALSE) else 1:length(x)

Re: [R] R brakes when submitting a query to MySQL

2007-12-18 Thread Emmanuel Charpentier
Marc Moragues a écrit : > Hello, > > I would like to retrieve data stored in MySQL database, so I installed > RMySQL package. > I can successfully connect with the my database using the following code > >> dvr<-dbDriver("MySQL") >> con2<-dbConnect(dvr,group="exbardiv") >> mysqlDescribeConnection(

Re: [R] R brakes when submitting a query to MySQL

2007-12-18 Thread Zembower, Kevin
Is it your use of 'con' rather than 'con2' in dbSendQuery? -Kevin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marc Moragues Sent: Tuesday, December 18, 2007 1:14 PM To: r-help@r-project.org Subject: [R] R brakes when submitting a query to MySQL Hello,

[R] PCA - "cov.wt(z) : 'x' must contain finite values only"

2007-12-18 Thread Johnson, Bethany
I am trying to run PCA on a matrix (the first column and row are headers). There are several cells with NA's. When I run PCA with the following code: __ setwd("I:/PCA") AsianProp<-read.csv("Matrix.csv", sep=",", header=T, row.names=1) attach(AsianProp) AsianPro

[R] R brakes when submitting a query to MySQL

2007-12-18 Thread Marc Moragues
Hello, I would like to retrieve data stored in MySQL database, so I installed RMySQL package. I can successfully connect with the my database using the following code > dvr<-dbDriver("MySQL") > con2<-dbConnect(dvr,group="exbardiv") > mysqlDescribeConnection(con2) User: mmorag Host: localh

Re: [R] Scatterplot Showing All Points

2007-12-18 Thread Duncan Murdoch
On 12/18/2007 12:44 PM, Antony Unwin wrote: > On 18 Dec 2007, at 4:49 pm, Duncan Murdoch wrote: > >>> One good alternative here is the fluctuation diagram variant of a >>> mosaic plot: >>> xx<-as.factor(x) >>> yy<-as.factor(y) >>> imosaic(xx,yy, type="f") >> >> That plot is better than jitterin

Re: [R] Scatterplot Showing All Points

2007-12-18 Thread Duncan Murdoch
On 12/18/2007 11:21 AM, James W. MacDonald wrote: > Duncan Murdoch wrote: >> Yes, I agree. (As an aside, there's actually a capital S in >> smoothScatter(), and it's a bit of a pain to install, because >> geneplotter depends on something that depends on DBI, which is not so >> easily available

Re: [R] ggplot2 - getting at the grobs

2007-12-18 Thread hadley wickham
Hi Pedro, Could you be a bit more explicit about what you're trying to do? Have you read the last chapter of the draft ggplot book? Hadley On Dec 18, 2007 8:41 AM, Pedro de Barros <[EMAIL PROTECTED]> wrote: > Dear All, > > I continue trying to get several of my plotting functions to use > ggplo

Re: [R] regression towards the mean, AS paper November 2007

2007-12-18 Thread hadley wickham
> Thanks for the example, Hadley. To me, this suggests we should stop > teaching histograms in Stat 101 and instead use quantile plots, which > give excellent results for n=100 and even surprisingly good results > for n=10: It all depends on what you're trying to do - I don't think histograms are

[R] Sweave and Scientific Workplace

2007-12-18 Thread Dietrich Trenkler
Dear HelpeRs, a colleague of mine uses Scientific Workplace to write his LaTeX documents. I made his mouth water mentioning the advantages of using Sweave. Not using SW myself I wonder if anyone out there has gathered some experiences in using the combination of both. Thank you in advance Diet

Re: [R] calculating the number of days from dates

2007-12-18 Thread bogdan romocea
> Sorry for using library instead package, but > library() is one command for using packages. ... which is why all efforts to make folks say "package" instead of >> "library" << are doomed to fail, IMHO. Besides, in English, "library" also means "a collection of software or data usually reflecting

Re: [R] Scatterplot Showing All Points

2007-12-18 Thread Antony Unwin
On 18 Dec 2007, at 4:49 pm, Duncan Murdoch wrote: >> One good alternative here is the fluctuation diagram variant of a >> mosaic plot: >> xx<-as.factor(x) >> yy<-as.factor(y) >> imosaic(xx,yy, type="f") > > That plot is better than jittering, but there's the problem in the > mosaic plot of u

Re: [R] regression towards the mean, AS paper November 2007

2007-12-18 Thread Kevin Wright
On Dec 17, 2007 3:10 PM, hadley wickham <[EMAIL PROTECTED]> wrote: > > This has nothing to do really with the question that Troels asked, > > but the exposition quoted from the AA paper is unnecessarily > > confusing. > > The phrase ``Because X0 and X1 have identical margin

Re: [R] bar plot colors

2007-12-18 Thread John Kane
I think you're going to find that barchart with that many values in a bar is going to be pretty well uninterpretable. Jim Lemon gives the desired barchart but it is very difficult to read. Stealing his code to create the same matrix I'd suggest may be looking at a dotchart. I'm not sure if t

Re: [R] Scatterplot Showing All Points

2007-12-18 Thread James W. MacDonald
Duncan Murdoch wrote: > Yes, I agree. (As an aside, there's actually a capital S in > smoothScatter(), and it's a bit of a pain to install, because > geneplotter depends on something that depends on DBI, which is not so > easily available these days.) Somehow I always forget the capital S and

[R] [R-pkgs] New version of systemfit (not backward compatible)

2007-12-18 Thread Arne Henningsen
Dear R users, the systemfit package contains functions for fitting systems of simultaneous equations by various estimation methods (e.g. OLS, SUR, 2SLS, 3SLS). Currently version 0.8 of systemfit is available on CRAN. However, shortly we will upload version 1.0, which is NOT BACKWARD COMPATIBLE.

Re: [R] accessing dimension names

2007-12-18 Thread jim holtman
dimnames(y)[[paste('x', idx, sep="")]] On Dec 18, 2007 6:01 AM, <[EMAIL PROTECTED]> wrote: > I have a matrix y: > > > dimnames(y) > $x93 > [1] "1" "2" > > $x94 > [1] "0" "1" "2" > .. so on (there are other dimensions as well) > > > > I need to access a particular dimension, but a

Re: [R] Scatterplot Showing All Points

2007-12-18 Thread Duncan Murdoch
On 18/12/2007 10:02 AM, James W. MacDonald wrote: > Duncan Murdoch wrote: >> On 18/12/2007 7:31 AM, Antony Unwin wrote: >>> Wayne, >>> >>> Try the iplot command in iPlots. You can then vary both the >>> pointsize and the transparency of your scatterplot interactively and >>> decide which scatt

Re: [R] Scatterplot Showing All Points

2007-12-18 Thread Duncan Murdoch
On 18/12/2007 10:01 AM, Antony Unwin wrote: > On 18 Dec 2007, at 2:42 pm, Duncan Murdoch wrote: > >>> (I must admit to being very surprised that jittering and >>> sunflower plots have been suggested for a dataset of 5000 >>> points. Do those who mentioned these methods have examples on >>

Re: [R] Reshape Dataframe

2007-12-18 Thread Bert Jacobs
Thx Hadley, It works, but I need some finetuning. If I use the following expression: Newdf <-reshape(df, timevar="Var3", idvar=c("Var1","Var2"),direction="wide") Newdf Var1Var2Var3.W1 Var3.W2 Var3.W3 var3.W4 A Fa 1 3 A Si 2

Re: [R] Reshape Dataframe

2007-12-18 Thread Gabor Grothendieck
On Dec 18, 2007 9:54 AM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > > On Dec 18, 2007 9:07 AM, Bert Jacobs <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I'm having a bit of problems in creating a new dataframe. > > Below you'll find a description of the current dataframe and of the > > datafr

Re: [R] Scatterplot Showing All Points

2007-12-18 Thread James W. MacDonald
Duncan Murdoch wrote: > On 18/12/2007 7:31 AM, Antony Unwin wrote: >> Wayne, >> >> Try the iplot command in iPlots. You can then vary both the >> pointsize and the transparency of your scatterplot interactively and >> decide which scatterplot conveys the information best. Sometimes >> it's

Re: [R] Analyzing Publications from Pubmed via XML

2007-12-18 Thread Armin Goralczyk
On 12/18/07, David Winsemius <[EMAIL PROTECTED]> wrote: > David Winsemius <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > > > "Armin Goralczyk" <[EMAIL PROTECTED]> wrote in > > news:[EMAIL PROTECTED]: > > >> I tried the above function with simple search terms and it worked > >> fine for me

Re: [R] Scatterplot Showing All Points

2007-12-18 Thread Antony Unwin
On 18 Dec 2007, at 2:42 pm, Duncan Murdoch wrote: >> (I must admit to being very surprised that jittering and >> sunflower plots have been suggested for a dataset of 5000 >> points. Do those who mentioned these methods have examples on >> that scale where they are effective?) > > Sure.

Re: [R] Reshape Dataframe

2007-12-18 Thread Gabor Grothendieck
On Dec 18, 2007 9:07 AM, Bert Jacobs <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm having a bit of problems in creating a new dataframe. > Below you'll find a description of the current dataframe and of the > dataframe that needs to be created. > Can someone help me out on this one? > Thx in advance.

Re: [R] integration

2007-12-18 Thread Ravi Varadhan
Hi Davide, It is difficult to say what the problem is without knowing more about the nature of the integrand. So, you should do a couple of preliminary things before attempting compute the integral. First, is the integral is finite? You should establish this. Second, plot the integrand over

[R] ggplot2 - getting at the grobs

2007-12-18 Thread Pedro de Barros
Dear All, I continue trying to get several of my plotting functions to use ggplot, because I really do like the concept of the graphical objects, and working with them in the abstract. I am now trying to access the grobs to manipulate using grid. However, until now all I managed was to get the

Re: [R] Reshape Dataframe

2007-12-18 Thread hadley wickham
On 12/18/07, Bert Jacobs <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm having a bit of problems in creating a new dataframe. > Below you'll find a description of the current dataframe and of the > dataframe that needs to be created. > Can someone help me out on this one? library(reshape) dfm <- melt(

Re: [R] Scatterplot Showing All Points

2007-12-18 Thread hadley wickham
On 12/17/07, Jim Porzak <[EMAIL PROTECTED]> wrote: > Wayne, > > I am fond of the bagplot (think 2D box plot) to replace scatter plots > for large N. See > http://www.wiwi.uni-bielefeld.de/~wolf/software/aplpack/ and aplpack > in CRAN. The big drawback of the bagplot, like the boxplot, is that it's

[R] Reshape Dataframe

2007-12-18 Thread Bert Jacobs
Hi, I'm having a bit of problems in creating a new dataframe. Below you'll find a description of the current dataframe and of the dataframe that needs to be created. Can someone help me out on this one? Thx in advance. Bert Current Dataframe Var1Var2Var3Var4 A Fa W1

Re: [R] accessing dimension names

2007-12-18 Thread Petr PIKAL
Hard to help as i do not have "y" and it definitelly is not a matrix as you tried to pretend. 1. Try to look at structure of your y object by str(y) 2. Try to learn about how to extract parts of objects e.g. by reading ?"[" 3. Try to use what you learned on your y object 4.

[R] GLM and factor in forular

2007-12-18 Thread Knut Krueger
I used a GLM with a factor variable and wondered about that the first factor is missing in the results. means there is no result for Y1 Is it wrong to use factors in GLM or is there a statistical reason that there is no Y1 result ? X<-rnorm(31:40) Y<-factor(c(1:10)) glm(X~Y) Knut _

Re: [R] Scatterplot Showing All Points

2007-12-18 Thread Duncan Murdoch
On 18/12/2007 7:31 AM, Antony Unwin wrote: > Wayne, > > Try the iplot command in iPlots. You can then vary both the > pointsize and the transparency of your scatterplot interactively and > decide which scatterplot conveys the information best. Sometimes > it's helpful to use more than one

Re: [R] Capture warning messages from coxph()

2007-12-18 Thread Terry Therneau
Xinyi Li asked how to keep track of which coxph models, called from within a loop, were responsible for warning messges. One solution is to modify the coxph code so that those models are marked in the return coxph object. Below is a set of changes to the final 40 lines of coxph.fit, that will ca

Re: [R] Scatterplot Showing All Points

2007-12-18 Thread S Ellison
>> Antony Unwin <[EMAIL PROTECTED]> >> >I must admit to being very surprised that jittering and sunflower >plots have been suggested for a dataset of 5000 points. Do those who >mentioned these methods have examples on that scale where they are >effective?) You have a point. haha. But che

Re: [R] hazard ratio of interaction Cox model

2007-12-18 Thread Frank E Harrell Jr
Giulia Barbati wrote: > Dear Forum, > I have a question about interaction estimate in the Cox model: > why the hazard ratio of the interaction is not produced in the summary of the > model? > (Instead, the estimate of the coefficient is given in the print of the > model.) The 'hazard ratio of

Re: [R] Scatterplot Showing All Points

2007-12-18 Thread Antony Unwin
Wayne, Try the iplot command in iPlots. You can then vary both the pointsize and the transparency of your scatterplot interactively and decide which scatterplot conveys the information best. Sometimes it's helpful to use more than one scatterplot when presenting your results. (I must ad

[R] Odp: accessing dimension names

2007-12-18 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 18.12.2007 12:01:41: > I have a matrix y: > > > dimnames(y) > $x93 > [1] "1" "2" > > $x94 > [1] "0" "1" "2" > .. so on (there are other dimensions as well) > > > > I need to access a particular dimension, but a random mechanism tells me > whic

Re: [R] Scatterplot Showing All Points

2007-12-18 Thread Duncan Murdoch
Jari Oksanen wrote: > Wayne Aldo Gavioli fas.harvard.edu> writes: > > >> Hello all, >> >> I'm trying to graph a scatterplot of a large (5,000 x,y coordinates) of data >> with the caveat that many of the data points overlap with each other (share >> the >> same x AND y coordinates). In using t

Re: [R] ggplot-How to define fill colours?

2007-12-18 Thread Pedro de Barros
Thanks Thierry, Rigth on target. Cheers, Pedro At 10:35 2007/12/18, you wrote: >Pedro, > >I've had a similar problem. See this post for the solution: >http://thread.gmane.org/gmane.comp.lang.r.general/100649/focus=100673 > >Cheers, > >Thierry > > >--

Re: [R] axis names in triangle.plot

2007-12-18 Thread Thomas Hoffmann
Thanks for this advice. grain was not a data.frame but a matrix. Now it works:-) Cheers Thomas Stéphane Dray schrieb: > Hi Thomas, > This looks quite strange. By default, the function use the column > names as labels. > What is grain ? A data.frame ? Why have you duplicated row.names? > Pleas

Re: [R] Dual Core vs Quad Core

2007-12-18 Thread Prof Brian Ripley
On Tue, 18 Dec 2007, S Ellison wrote: > Hiding in the windows faq is the observation that "R's computation is > single-threaded, and so it cannot use more than one CPU". So multi-core > should make no difference other than allowing R to run with less > interruption from other tasks. That is often

Re: [R] clean programming

2007-12-18 Thread cgenolin
Gabor Grothendieck <[EMAIL PROTECTED]> a écrit : > Its a FAQ Oups... Sorry for that. Just to close the topic : cleanProg <- function(name,tolerance){ if(length(findGlobals(get(name),FALSE)$variables) > tolerance){ cat("More than",tolerance,"global variable(s) in ",name,"\a\n") } } cleanProg

Re: [R] Two repeated warnings when running gam(mgcv) to analyse my dataset?

2007-12-18 Thread Simon Wood
The model here is just a penalised GLM, and the warnings relate to the GLM fitting process. Fitted probabilities of 0 or 1 can be perfectly appropriate, but do indicate that the linear predictor is not really uniquely defined, and that some care may be needed in interpreting results (for example

[R] accessing dimension names

2007-12-18 Thread born . to . b . wyld
I have a matrix y: > dimnames(y) $x93 [1] "1" "2" $x94 [1] "0" "1" "2" .. so on (there are other dimensions as well) I need to access a particular dimension, but a random mechanism tells me which dimension it would. So, sometimes I might need to access dimnames(y)$x93, some ot

Re: [R] gene shaving method

2007-12-18 Thread Turner, Heather
Gene shaving is implemented in the GeneClust package for R which you can download from http://odin.mdacc.tmc.edu/~kim/geneclust/ For more details see "The Analysis of Gene Expression Data: Methods and Software" edited by Giovanni Parmiagiani, Elizabeth S. Garett, Rafael A. Irizarry and Scott L. Zeg

Re: [R] Dual Core vs Quad Core

2007-12-18 Thread S Ellison
Hiding in the windows faq is the observation that "R's computation is single-threaded, and so it cannot use more than one CPU". So multi-core should make no difference other than allowing R to run with less interruption from other tasks. That is often a significant advantage, though. >>> Andrew

Re: [R] axis names in triangle.plot

2007-12-18 Thread Stéphane Dray
Hi Thomas, This looks quite strange. By default, the function use the column names as labels. What is grain ? A data.frame ? Why have you duplicated row.names? Please return the results of class(grain) and names(grain) Cheers, PS: If you have questions related to ade4, you can use the adelist (

Re: [R] ggplot-How to define fill colours?

2007-12-18 Thread ONKELINX, Thierry
Pedro, I've had a similar problem. See this post for the solution: http://thread.gmane.org/gmane.comp.lang.r.general/100649/focus=100673 Cheers, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek /

Re: [R] Res: Scatterplot Showing All Points

2007-12-18 Thread S Ellison
?jitter is simpler: x<-rep(1:10,10) y<-x plot(x,y) #100 points, only 10 show plot(jitter(x),jitter(y)) #overlap removed. >>> Milton Cezar Ribeiro <[EMAIL PROTECTED]> 18/12/2007 04:36 >>> Hi Wayne, I have two suggestion to you. 1. You add some random noise on both x and y data or 2.

Re: [R] read.table() and precision?

2007-12-18 Thread Prof Brian Ripley
On Mon, 17 Dec 2007, Moshe Olshansky wrote: > Dear List, > > Following the below question I have a question of my > own: > Suppose that I have large matrices which are produced > sequentially and must be used sequentially in the > reverse order. I do not have enough memory to store > them and so I

  1   2   >