[R] main title x title and y title with ggplot2

2008-03-04 Thread guillaume chaumet
Hi R people, I'm a R newbie and I'm trying to put main title, x title and y title in my graph with no success. Any idea? I'm sorry for this newbie question.. Guillaume [[alternative HTML version deleted]] __ R-help@r-project.org mailing list ht

Re: [R] vertex labels in igraph from adjacency matrix

2008-03-04 Thread Charilaos Skiadas
On Mar 5, 2008, at 1:39 AM, Mark W Kimpel wrote: > I am getting some unexpected results from some functions of igraph and > it is possible that I am misinterpreting the vertex numbers. Eg., the > max betweenness measure seems to be from a vertex that is not > connected > to a single other vertex

[R] vertex labels in igraph from adjacency matrix

2008-03-04 Thread Mark W Kimpel
I am getting some unexpected results from some functions of igraph and it is possible that I am misinterpreting the vertex numbers. Eg., the max betweenness measure seems to be from a vertex that is not connected to a single other vertex. Below if my code snippet: require(igraph) my.graph <- gr

Re: [R] simulating the anova

2008-03-04 Thread Bill.Venables
Here is one possible way of proceeding: cohen.f <- 0.25 groups <- 4 between.var <- 19 within.var <- between.var/cohen.f^2 n <- 500 N <- groups*n sim.means <- rnorm(n = groups, mean = 0, sd = sqrt(between.var)) sim.data <- data.frame(group = gl(groups, 1, length = N), response

[R] Percentage Variance Stepwise Multiple Regression

2008-03-04 Thread frank frank
Dear R, > I am using stepwise multiple glm to select a subset of variables using the > step command. My question is how do you calculate the percentage variance for > each parameter and the cumulative percentage variance for all of the combined > parameters in the reduced model. > Thanks in a

Re: [R] simulating the anova

2008-03-04 Thread Charilaos Skiadas
On Mar 5, 2008, at 12:03 AM, Will Holcomb wrote: > I have been trying to figure out how to run a simple simulation of > the ANOVA > and I'm coming up just a bit short. The code I've got is: > > cohen.f = .25 > groups = 4 > between.var = 19 > within.var = between.var / cohen.f ^ 2 > n = 500 > s

[R] simulating the anova

2008-03-04 Thread Will Holcomb
I have been trying to figure out how to run a simple simulation of the ANOVA and I'm coming up just a bit short. The code I've got is: cohen.f = .25 groups = 4 between.var = 19 within.var = between.var / cohen.f ^ 2 n = 500 sim.means = rnorm(n = groups, mean = 0, sd = sqrt(between.var)) sim.data

Re: [R] summarizing replicates with multiple treatments

2008-03-04 Thread Levi Waldron
On Tue, Mar 4, 2008 at 5:32 PM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Try this: > > library(doBy) > summaryBy(. ~ day + treat, exampledata, FUN = c(mean, sd)) Outstanding, so much better. Thanks. __ R-help@r-project.org mailing list https:/

Re: [R] package for repeated measures ANOVA with various link functions REDUX

2008-03-04 Thread John Sorkin
Prof. Bates was correct to point out the lack of specifics in my original posting. I am looking for a package that will allow we to choose among link functions and account for repeated measures in a repeated measures ANOVA. My question is what package should I use to facilitate estimating rates

Re: [R] colored 3d scatter plot

2008-03-04 Thread Duncan Murdoch
On 04/03/2008 9:54 PM, Jim Lemon wrote: > SNN wrote: >> I tried >> >> scatterplot3d(data, color = rep(c("red", "blue"), c(100, 15)), pch=16) and I >> am getting the following error message, >> >> >> Error in plot.xy(xy.coords(x, y), type = type, ...) : >> invalid color name >> >> Does any

[R] Spidergram?

2008-03-04 Thread DinoDragon
This maybe a very stupid question. But, I'm trying to figure out how to draw the so-called "Spidergram" from a set of data, say, 15 chemical elements (on horizontal axis), and the concentration of each element from 60 stations (on vertical axis). So the matrix will be 15 x 60. The values of each st

Re: [R] colored 3d scatter plot

2008-03-04 Thread Jim Lemon
SNN wrote: > > I tried > > scatterplot3d(data, color = rep(c("red", "blue"), c(100, 15)), pch=16) and I > am getting the following error message, > > > Error in plot.xy(xy.coords(x, y), type = type, ...) : > invalid color name > > Does anyone know what he problem is? Hi Nancy, When y

Re: [R] Question on "assign(paste.."

2008-03-04 Thread Erik Iverson
Hello - I agree with Rolf that a (named) list may be better here. If you don't want to use a for loop, see if the following works using lapply? probTrt <- list(Trt1 = c(0.064,0.119,0.817), Trt2 = c(0.053,0.125,0.823), Trt3 = c(0.111,0.139,0.750),

Re: [R] connectivity measure for graph nodes

2008-03-04 Thread Charilaos Skiadas
Mark, if I understand what you are asking, then you likely want either the Floyd-Warshall algorithm: http://en.wikipedia.org/wiki/Floyd-Warshall_algorithm or Djikstra's algorithm http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm The package igraph seems to have some useful methods,

[R] rsprng, snow, rmpi interactions

2008-03-04 Thread Ross Boylan
The proper use of SPRNG is a little unclear to me in each of these packages, even more so when I put them all together. My immediate question: in snow I did clusterSetupSRNG. If a later want to (re) set the system to a known seed, how do I do it? That is, I want each distributed process to rec

Re: [R] Question on "assign(paste.."

2008-03-04 Thread Rolf Turner
Try: for(t in 4) { # Did you mean ``1:4''? nm <- paste("Trt",sep="") assign(nm,rmultinom(10,size=5,prob=probTrt[t,])) print(rowMeans(get(nm))) } Notes: (1) You were missing the ``get(t)''; I introduced ``nm'' to save some

[R] Question on "assign(paste.."

2008-03-04 Thread Kyeongmi Cheon
Hello, I'm having trouble in using "assign(paste ..." command . I could create several dataframes following trinomial distribution using it but it could not be used to check their row means of the created dataframe. For example, the following works: probTrt=matrix(0,4,3); probTrt; #malf, death, n

[R] XLSolutions 9 Courses: Upcoming March-April 2008 R/S+ Course Schedule by XLSolutions Corp

2008-03-04 Thread [EMAIL PROTECTED]
Our March-April 2008 R/S+ course schedule is now available. Please check out this link for additional information and direct enquiries to Sue Turner [EMAIL PROTECTED] Phone: 206 686 1578 --Can't see your city? Please email us! -- Ask for Group Discount

[R] connectivity measure for graph nodes

2008-03-04 Thread Mark W Kimpel
I am doing some work the Rgraphviz, a Bioconductor package, but since my question is of a more general nature, thought I would send to this list in hopes that a graph theory expert could answer my question. I wish to do some statistics on node-node relationships. In particular, I want to see if

Re: [R] degrees of freedom extraction

2008-03-04 Thread Henrique Dallazuanna
Try this: attr(logLik(lmx), "df") On 04/03/2008, Davood Tofighi <[EMAIL PROTECTED]> wrote: > Hello, > > II used the logLik() function to get the log-likelihood estimate of an > object. The function also prints the degrees of freedom. How can I extract > the degrees of freedom and assign it to

[R] degrees of freedom extraction

2008-03-04 Thread Davood Tofighi
Hello, II used the logLik() function to get the log-likelihood estimate of an object. The function also prints the degrees of freedom. How can I extract the degrees of freedom and assign it to a variable. Below is the output: > logLik(fit2pl) 'log Lik.' -4842.912 (df=36) Thanks, Davood Tofighi

Re: [R] How to make a 2-dim array being "interpreted" as an array rather than as a matrix

2008-03-04 Thread Erik Iverson
One more note: >> Is there any way in which I can "force" a2 to being "interpreted" as >> having class "array" rather than "matrix" so that foo will work on >> a2??? > Maybe try? a3 <- structure(1:10, dim = c(2,5), class = "array") Then class(a3) gives "array", and is.matrix and is.array are

Re: [R] How to make a 2-dim array being "interpreted" as an array rather than as a matrix

2008-03-04 Thread Erik Iverson
Hello - Søren Højsgaard wrote: > Dear List > > A 2-dimensional array seems to be "interpreted" as a matrix whereas > higher dimensional arrays are interpreted as arrays, e.g. > >> a1 <- array(1:8,c(2,2,2)) class(a1) > [1] "array" >> a2 <- array(1:4,c(2,2)) class(a2) > [1] "matrix" > Note that

Re: [R] ggplot2 - Problem with grid plot

2008-03-04 Thread Chris Friedl
ONKELINX, Thierry wrote: > > Dear Chris, > > You'll need to add information on the facet factor (color) to the > medians dataset. > > library(ggplot2) > medians <- aggregate(diamonds$price, list(cut = diamonds$cut, color = > diamonds$color), median) > ggplot(data=diamonds, aes(x=price)) + geo

Re: [R] How to make a 2-dim array being "interpreted" as an array rather than as a matrix

2008-03-04 Thread Henrique Dallazuanna
I don't know if is the best way: a3 <- array(a2, dim=c(nrow(a2), ncol(a2), 1)) foo(a3) On 04/03/2008, Søren Højsgaard <[EMAIL PROTECTED]> wrote: > Dear List > > A 2-dimensional array seems to be "interpreted" as a matrix whereas higher > dimensional arrays are interpreted as arrays, e.g. > >

[R] How to make a 2-dim array being "interpreted" as an array rather than as a matrix

2008-03-04 Thread Søren Højsgaard
Dear List A 2-dimensional array seems to be "interpreted" as a matrix whereas higher dimensional arrays are interpreted as arrays, e.g. > a1 <- array(1:8,c(2,2,2)) > class(a1) [1] "array" > a2 <- array(1:4,c(2,2)) > class(a2) [1] "matrix" If I write a generic function (apologies if this is th

Re: [R] RODBC: DNS vs. connection string

2008-03-04 Thread Olivier Lefevre
I meant a DSN, not a DNS... -- O.L. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducib

Re: [R] vector manipulations

2008-03-04 Thread Bill.Venables
No problems with it working. The main problem I have observed is unrealistic expectations. People write an *essentially* non-vectorized function and expect Vectorize to produce a version of it which will out-perform explicit loops every time. No magic bullets in this game. Bill. Bill Venable

Re: [R] vector manipulations

2008-03-04 Thread Duncan Murdoch
On 3/4/2008 5:41 PM, [EMAIL PROTECTED] wrote: > Your problem is that your function log1( , ) is not vectorized with > respect to its arguments. For a function to work in outer(...) it must > accept vectors for its first two arguments and it must produce a > parallel vector of responses. > > To

Re: [R] Error in Arules

2008-03-04 Thread Duncan Murdoch
On 3/4/2008 5:14 PM, Tibert, Brock wrote: > Thanks for getting back to me. > > Here are the basic commands: > > These commands work: > library("arules") > basket <- read.csv("C:/Documents and Settings/ /Desktop/mba2.csv", > na.strings=c(".", "NA", "", "?")) > basket2 <- as(split(basket$Produc

[R] Help on AIC model fiting

2008-03-04 Thread Humberto Dutra
I am doing a multiple regression My response variable is monthly insect abundance my predictors are 2 climate variables (monthly accumulated precipitation and monthly temperature) I want to verify which of these climate variables is best in predicting insect abundance. So far it is just a simpl

Re: [R] multiple plots with a title using postscript()

2008-03-04 Thread Peter Dalgaard
array chip wrote: > Thanks, yes, it worked. I got another problem. I > generated these plots into a postscript file, now the > title was truncated (only show lower half). I tried > changing region argument in the postscript(), but not > working. any suggestions? > I guess you need to increase th

Re: [R] package for repeated measures ANOVA with various link functions

2008-03-04 Thread Rolf Turner
On 5/03/2008, at 11:13 AM, Douglas Bates wrote: > > The "one size fits all" approach to data analysis - also > known as "give me a quart and a half of statistics and just make sure > that there is a p-value less than 5% somewhere in there" - doesn't fit > well into the R system. Gotta be a fort

Re: [R] vector manipulations

2008-03-04 Thread Bill.Venables
Your problem is that your function log1( , ) is not vectorized with respect to its arguments. For a function to work in outer(...) it must accept vectors for its first two arguments and it must produce a parallel vector of responses. To quote the help information for outer: "FUN is called with

[R] multiple plots with a title using postscript()

2008-03-04 Thread array chip
Thanks, yes, it worked. I got another problem. I generated these plots into a postscript file, now the title was truncated (only show lower half). I tried changing region argument in the postscript(), but not working. any suggestions? postscript("database.ps",horizontal=T,color.p=T,ps.region=c(50,

Re: [R] summarizing replicates with multiple treatments

2008-03-04 Thread Gabor Grothendieck
Try this: library(doBy) summaryBy(. ~ day + treat, exampledata, FUN = c(mean, sd)) On Tue, Mar 4, 2008 at 5:24 PM, Levi Waldron <[EMAIL PROTECTED]> wrote: > I have a dataframe with several different treatment variables, and > would like to calculate the mean and standard deviation of the > repli

[R] summarizing replicates with multiple treatments

2008-03-04 Thread Levi Waldron
I have a dataframe with several different treatment variables, and would like to calculate the mean and standard deviation of the replicates for each day and treatment variable. It seems like it should be easy, but I've only managed to do it for one treatment at a time using subset and tapply. He

Re: [R] Error in Arules

2008-03-04 Thread Tibert, Brock
Thanks for getting back to me. Here are the basic commands: These commands work: library("arules") basket <- read.csv("C:/Documents and Settings/ /Desktop/mba2.csv", na.strings=c(".", "NA", "", "?")) basket2 <- as(split(basket$Product, basket$Id), "transactions") the following command used t

Re: [R] package for repeated measures ANOVA with various link functions

2008-03-04 Thread Douglas Bates
On Tue, Mar 4, 2008 at 10:52 AM, John Sorkin <[EMAIL PROTECTED]> wrote: > R 2.6.0 > Windows XP > At the risk of raising the ire of the R gods . . . > I am looking for a package that will allow me to perform a poisson, > quasipoisson, or negative binomial regression with adjustment for repeated

Re: [R] problem

2008-03-04 Thread Douglas Bates
On Tue, Mar 4, 2008 at 10:35 AM, Erika Frigo <[EMAIL PROTECTED]> wrote: > Good evening to everybody, > I have problems to import in R a really big dataset (more than 100 > values). Which is the best package to install? > Is there someone who works with this kind of dataset and can help me,

[R] RODBC: DNS vs. connection string

2008-03-04 Thread Olivier Lefevre
I am able to connect to an SQL Server Express 2005 instance using either a local source or a connection string (i.e., the two forms of odbcConnect) but sqlColumns returns different results. Specifically two string columns are reported as being of type ntext and length 1073741823 in the first case v

Re: [R] multiple plots with a title

2008-03-04 Thread Peter Alspach
John ?mtext e.g. mtext('General title', outer=T, line=-1) HTH Peter Alspach > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of array chip > Sent: Wednesday, 5 March 2008 10:48 a.m. > To: [EMAIL PROTECTED] > Subject: [R] multiple plots with a tit

Re: [R] Error in Arules

2008-03-04 Thread Duncan Murdoch
On 04/03/2008 4:34 PM, Tibert, Brock wrote: > Hi everyone, > > > > This is my first posting and I am just starting to fumble my way thru R. > I have been working thru the Arules package, and I used to be able to > use the image function and I get the following message: > > > > Error in imag

[R] multiple plots with a title

2008-03-04 Thread array chip
Hi, I am wondering how can I add a common title to the top of a page that contains multiple plots using, e.g., par(mfrow=c(2,3))? thanks John Zhang __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

Re: [R] constrained clustering

2008-03-04 Thread Gavin Simpson
Steve Juggins hacked the Fortran for hclust to allow it to do constrained hierarchical clustering n the 1-D case (such as temporal ordering as constraint) If this is what you are looking for, you can grab the code as a package from: http://www.campus.ncl.ac.uk/staff/Stephen.Juggins/analysis.htm

[R] Error in Arules

2008-03-04 Thread Tibert, Brock
Hi everyone, This is my first posting and I am just starting to fumble my way thru R. I have been working thru the Arules package, and I used to be able to use the image function and I get the following message: Error in image.default(basket2) : 'z' must be a matrix I used to be able to

Re: [R] Graphic text

2008-03-04 Thread Roland Rau
Hi Maura, Maura E Monville wrote: > I tried to install "ade4TKGUI" but it failed maybe because I did not > install Tcl/Tk on my Linux/SuSE ??? > > * Installing *source* package 'ade4TkGUI' ... > ** R > ** inst > ** preparing package for lazy loading > Loading required package: ade4 > > Attaching

[R] constrained clustering

2008-03-04 Thread Tyler Smith
Having searched CRAN and the mailing list archives, I'm pretty sure there is no function in R that implements constrained clustering. Before I start writing my own, have I overlooked something? Thanks, Tyler __ R-help@r-project.org mailing list https:

Re: [R] memory constraints in ubuntu gutsy

2008-03-04 Thread Rod
On Tue, Mar 4, 2008 at 7:18 PM, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > A 64-bit version of R would be able to handle this (preferably with more > RAM), but you don't appear to have one. Check what .Machine$size.pointer > says: I expect 4. > > On Tue, 4 Mar 2008, Randy Griffiths wrote: > >

[R] looping through data frames in a workspace

2008-03-04 Thread lucy b
Thanks for helpful replies. Unfortunately, I didn't mention that I want to overwrite the existing data frame with the corrected one using the same name. Here's what I have: ## get names of data frames frames <- names(Filter(function(x) x=="data.frame", sapply(objects(),function(

Re: [R] grid.layout?

2008-03-04 Thread Paul Murrell
Hi Patrick Connolly wrote: > platform x86_64-unknown-linux-gnu > arch x86_64 > os linux-gnu > system x86_64, linux-gnu > status > major 2

Re: [R] colored 3d scatter plot

2008-03-04 Thread SNN
I tried scatterplot3d(data, color = rep(c("red", "blue"), c(100, 15)), pch=16) and I am getting the following error message, Error in plot.xy(xy.coords(x, y), type = type, ...) : invalid color name Does anyone know what he problem is? -- View this message in context: http://www.na

[R] Asking, are simple effects different from 0

2008-03-04 Thread Jarrett Byrnes
Hello, R-i-zens. I'm working on an data set with a factorial ANOVA that has a significant interaction. I'm interested in seeing whether the simple effects are different from 0, and I'm pondering how to do this. So, I have my.anova<-lm(response ~ trtA*trtB) The output for which gives me a

[R] grid.layout?

2008-03-04 Thread Patrick Connolly
platform x86_64-unknown-linux-gnu arch x86_64 os linux-gnu system x86_64, linux-gnu status major 2 minor 6.2

[R] query on within class standard deviation

2008-03-04 Thread Manisha Brahmachary
Hi, I would appreciate any help on the following question: How can I calculate within class standard deviation for a gene in R/Bioconductor, given that I have two classes? Thanks Manisha [[alternative HTML version deleted]]

Re: [R] Graphic text

2008-03-04 Thread Maura E Monville
I tried to install "ade4TKGUI" but it failed maybe because I did not install Tcl/Tk on my Linux/SuSE ??? * Installing *source* package 'ade4TkGUI' ... ** R ** inst ** preparing package for lazy loading Loading required package: ade4 Attaching package: 'ade4' The following object(s) are

Re: [R] (x,y) coordinates for grid.text()

2008-03-04 Thread David Afshartous
Thanks, yes "native" is the right one. The code below now works as desired: trellis.focus("panel", 1, 1) grid.text("put text here", x = 1, y = 1.5, default.units = "native") On 3/4/08 1:44 PM, "Erik Iverson" <[EMAIL PROTECTED]> wrote: > You want "native" coordinates. But since you are using

Re: [R] (x,y) coordinates for grid.text()

2008-03-04 Thread Erik Iverson
You want "native" coordinates. But since you are using lattice (built 'on top' of grid), you probably need some additional info, like the name of the viewport you want to write to I assume(?), but I can't help you with that part. David Afshartous wrote: > Okay, I see that default.units is set

Re: [R] (x,y) coordinates for grid.text()

2008-03-04 Thread David Afshartous
Okay, I see that default.units is set to "npc" and hence the behavior I mentioned. Looking at ?unit, I see the description of various units but it isn't clear which one I need to select to achieve the result I specified earlier. Maybe I'm missing something very basic, but I assume there must be

Re: [R] help needed on function call

2008-03-04 Thread rmail ye
Thanks for your help. By adding { eval(substitute(var)) }, it works for me. Patrick advise me not attaching a dataset in a function. I will try to avoid this. Best, Sean On Tue, Mar 4, 2008 at 11:15 AM, Erik Iverson <[EMAIL PROTECTED]> wrote: > It isn't clear to me what output you would like to

Re: [R] memory constraints in ubuntu gutsy

2008-03-04 Thread Prof Brian Ripley
A 64-bit version of R would be able to handle this (preferably with more RAM), but you don't appear to have one. Check what .Machine$size.pointer says: I expect 4. On Tue, 4 Mar 2008, Randy Griffiths wrote: > Hello All, > > I have a very large data set (1.1GB) that I am trying to read into R.

Re: [R] vector manipulations

2008-03-04 Thread Pete Dorothy
Thank you very much to both of you, and especially you Phil. I will tell you if it works. 2008/3/4, Phil Spector <[EMAIL PROTECTED]>: > > Pete - > As others have told you, outer only works with vectorized > functions. An alternative is to use expand.grid to find all > the combinations of bet

Re: [R] help needed on function call

2008-03-04 Thread Erik Iverson
It isn't clear to me what output you would like to have by your description. However, there certainly is a clearer way of getting there than your functions. If you better define what output you'd like to have (i.e., what your table should look like), I may be able to offer some suggestions. Y

[R] using "logLik" with AIC to compare models with different error

2008-03-04 Thread kyoung
Hi there, I’d like to use AIC to compare between models with different error distributions (eg: Dick 2004, Sileshi 2004, Burnham and Anderson 2002), namely a normal, Poisson and negative binomial. I realize there are differing views whether this is valid or not from reading past R help postings; h

Re: [R] Plot with two different coloured regression lines and legend

2008-03-04 Thread John Kane
Untested but abline(lm(sabund[[i]]~sbif[[i]]), col=i) may do it. It would be better to have a working example to test. --- yvo <[EMAIL PROTECTED]> wrote: > > It is a trivial problem, but in the book I couln`t > figure out how to put > different colours at different regression lines > > plot(bi

[R] help needed on function call

2008-03-04 Thread rmail ye
Hi there, I am confused about fucntion call. After defining a function, I called it within another function. dt<-cars; #a copy of R internal dataset "cars" created; dt$cat1<-ifelse(dt$speed<20,0,1); dt$ind<-ifelse(dt$speed<15,1,2); #group variable; freqtot <- function(data,var){ atta

Re: [R] vector manipulations

2008-03-04 Thread Erik Iverson
Did you read the help page for 'outer'? ?outer It says 'FUN' is called with these two extended vectors as arguments. Therefore, it must be a vectorized function (or the name of one), expecting at least two arguments. I don't think your logl function is vectorized according to

[R] vector manipulations

2008-03-04 Thread Pete Dorothy
Hello, I have simulated a set of data which i called "nir" (a vector). I have created a function "logl" which calculates the log-likelihood. logl is a function of 2 real parameters : "beta" and "zeta" (of length 1). This function works perfectly well when I try for example "logl(0.1,0.2)" Now

Re: [R] R function to convert a number to text

2008-03-04 Thread lin tang
Thank you all for the input ! Lin Dimitris Rizopoulos <[EMAIL PROTECTED]> wrote: check also the article by John Fox in Rnews volume 5/1, May 2005, Programmer's Niche 51-55: http://cran.r-project.org/doc/Rnews/Rnews_2005-1.pdf Best, Dimitris Dimitris Rizopoulos Biostatistical Centre Scho

Re: [R] problem

2008-03-04 Thread Roland Rau
Hi, Erika Frigo wrote: > Good evening to everybody, > I have problems to import in R a really big dataset (more than 100 > values). Which is the best package to install? > Is there someone who works with this kind of dataset and can help me, please? > Maybe the package SQLiteDF could be use

Re: [R] (x,y) coordinates for grid.text()

2008-03-04 Thread hadley wickham
On Tue, Mar 4, 2008 at 11:18 AM, hadley wickham <[EMAIL PROTECTED]> wrote: > > When using grid.text it seems my supplied (x,y) coordinates are being > > plotted only in npc (normalized parent coordinates) where (.5,.5) is the > > center of the graph. How do I allow (x,y) to be coordinates cor

Re: [R] R console closes on its own

2008-03-04 Thread Duncan Murdoch
On 3/4/2008 12:21 PM, Duncan Murdoch wrote: > On 2/20/2008 7:44 PM, Judith Flores wrote: >> Dear R-experts, >> >>I am running a script that has the following >> structure: >> >> windows(height=5.5,width=8) >> >> dat<-read.csv("myfile.csv") >> names(dat)<-c('a','b','c','d') >> dat<-dat[,1:4]

Re: [R] R console closes on its own

2008-03-04 Thread Duncan Murdoch
On 2/20/2008 7:44 PM, Judith Flores wrote: > Dear R-experts, > >I am running a script that has the following > structure: > > windows(height=5.5,width=8) > > dat<-read.csv("myfile.csv") > names(dat)<-c('a','b','c','d') > dat<-dat[,1:4] > > xyplot(dat$a~dat$b) > > >Then I usually save

Re: [R] (x,y) coordinates for grid.text()

2008-03-04 Thread hadley wickham
> When using grid.text it seems my supplied (x,y) coordinates are being > plotted only in npc (normalized parent coordinates) where (.5,.5) is the > center of the graph. How do I allow (x,y) to be coordinates corresponding > to the (x,y) values in the graph? The examples in ?grid.text seem t

Re: [R] package for repeated measures ANOVA with various link functions

2008-03-04 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of John Sorkin > Sent: Tuesday, March 04, 2008 8:52 AM > To: r-help@r-project.org > Subject: [R] package for repeated measures ANOVA with various > link functions > > R 2.6.0 > Windows XP > > At the ris

Re: [R] problem

2008-03-04 Thread jim holtman
Is it just a file with a million values or is it some type of a structure with a million rows of indeterinent columns? If it is just a million numbers, you can easily read with is 'scan' or 'read.table' with no problem. I work with data structures that have several million rows and 4-5 columns wi

[R] (x,y) coordinates for grid.text()

2008-03-04 Thread David Afshartous
All, When using grid.text it seems my supplied (x,y) coordinates are being plotted only in npc (normalized parent coordinates) where (.5,.5) is the center of the graph. How do I allow (x,y) to be coordinates corresponding to the (x,y) values in the graph? The examples in ?grid.text seem to do

Re: [R] Significance testing for paired counts data with small sample

2008-03-04 Thread Dieter Menne
michael watson (IAH-C bbsrc.ac.uk> writes: > The data is counts of a particular > molecule in different cell types taken from the same 5 subjects. The > data are paired as they come from the same subject. The aim is to > determine whether the cell types differ in terms of the abundance of > eac

[R] package for repeated measures ANOVA with various link functions

2008-03-04 Thread John Sorkin
R 2.6.0 Windows XP At the risk of raising the ire of the R gods . . . I am looking for a package that will allow me to perform a poisson, quasipoisson, or negative binomial regression with adjustment for repeated measures. I have looked at glm, it does not appear to allow repeated measures. Alt

[R] problem

2008-03-04 Thread Erika Frigo
Good evening to everybody, I have problems to import in R a really big dataset (more than 100 values). Which is the best package to install? Is there someone who works with this kind of dataset and can help me, please? Thank you very much, Regards Dr.ssa Erika Frigo Department of Veter

[R] how to mark significant entries xtable.aov

2008-03-04 Thread Julius Verrel
Dear all, is there a simple trick to make xtable.aov mark (e.g. star) significant entries in the Latex-output? Or did anyone already write a corresponding extension? Thanks in advance, Julius Verrel -- Julius Verrel Center for Lifespan Psychology MPI for Human Development Lentz

Re: [R] memory constraints in ubuntu gutsy

2008-03-04 Thread jim holtman
What type of data do you have? Will it be numeric or factors? If it is all numeric, then you will need over 4GB just to hold one copy of the object (700,000 * 800 * 8). That is to hold the final object; I don't know how much additional space is required during the processing. What are you going

Re: [R] how to plot image() without painting a map (the background)

2008-03-04 Thread Ptit_Bleu
Thanks for the fast answer (even negative) and for your help (ggplot is a very nice tool !!!). Have a nice evening (well, we are close to in France), Ptit Bleu. hadley wrote: > > On Tue, Mar 4, 2008 at 9:15 AM, Ptit_Bleu <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> Thanks to ggplot2 (and to Had

[R] paired t-Test in R

2008-03-04 Thread Keizer_71
Keizer_71 wrote: > > Hi Guys, > > I am having a real hard time trying to figure out for microarry. > > Here is my code > > One-Sample t-Test > > dim(data.sub) > [1] 1 140 ##there are 1 probesets and 140 columns > > Example of the table in excel > > sample_drug sample

Re: [R] Sampling letters

2008-03-04 Thread Dimitris Rizopoulos
you could try a simple for() loop, e.g. N <- 100 k <- 10 set.seed(12345) mat <- matrix(sample(0:1, N * k, TRUE), N, k) key <- sample(letters[1:4], k, TRUE) out <- matrix("", N, k) unq.key <- unique(key) for (i in 1:k) { ind <- mat[, i] == 1 out[ind, i] <- key[i] vals <- unq.key[!unq.

[R] memory constraints in ubuntu gutsy

2008-03-04 Thread Randy Griffiths
Hello All, I have a very large data set (1.1GB) that I am trying to read into R. The file is tab delimited and contains headers; there are over 800 columns and almost 700,000 rows. I am using the Ubuntu 7.10 Gutsy Gibbon version of R. I am using Kernel Linux 2.6.22-14-generic. I have 3.1GB of RAM

Re: [R] request if a variable is defined

2008-03-04 Thread Gabor Csardi
Bingo! See ?exists G. On Tue, Mar 04, 2008 at 04:38:31PM +0100, Paul Hammer wrote: > hi members, > > give it a function for requesting if a object, matrix, vector, variable > or whatever already exists? > > e.g. if (*exists*(a) {print("yes") } else { print("no") } > > thanks > paul > >

Re: [R] how to plot image() without painting a map (the background)

2008-03-04 Thread hadley wickham
On Tue, Mar 4, 2008 at 9:15 AM, Ptit_Bleu <[EMAIL PROTECTED]> wrote: > > Hi, > > Thanks to ggplot2 (and to Hadley Wickham) I managed to plot some nice graphs > (not as fast as in a movie but it is ok). > One thing I am still looking for is a way to add the values on the contour > lines (like w

[R] request if a variable is defined

2008-03-04 Thread Paul Hammer
hi members, give it a function for requesting if a object, matrix, vector, variable or whatever already exists? e.g. if (*exists*(a) {print("yes") } else { print("no") } thanks paul [[alternative HTML version deleted]] __ R-help@r-project.or

[R] Significance testing for paired counts data with small sample size and some genuine zero values

2008-03-04 Thread michael watson (IAH-C)
Dear All I will try and keep this succinct! The data is counts of a particular molecule in different cell types taken from the same 5 subjects. The data are paired as they come from the same subject. The aim is to determine whether the cell types differ in terms of the abundance of each of the

Re: [R] how to plot image() without painting a map (the background)

2008-03-04 Thread Ptit_Bleu
Hi, Thanks to ggplot2 (and to Hadley Wickham) I managed to plot some nice graphs (not as fast as in a movie but it is ok). One thing I am still looking for is a way to add the values on the contour lines (like with the contour function). I read the stat.contour help page but I haven't found my

[R] Sampling letters

2008-03-04 Thread Doran, Harold
I have a binary matrix of size N x 300. I then create the following: > set.seed(1234) > (key_file <- sample(letters[1:4], 300, replace=TRUE)) [1] "a" "c" "c" "c" "d" "c" "a" "a" "c" "c" "c" "c" "b" "d" "b" "d" "b" "b" "a" "a" "b" "b" "a" [24] "a" "a" "d" "c" "d" "d" "a" "b" "b" "b" "c" "a" "d"

Re: [R] renaming objects

2008-03-04 Thread Gabor Grothendieck
You might be able to just read in that single column rather than read the file in chunks by using colClasses arg of read.table with "NULL" for all columns except the one you want. The sqldf package is another way -- see example 6 on the home page. You specify what you want using SQL: http://sqld

Re: [R] paired or one-sample t-Test

2008-03-04 Thread Jorge Iván Vélez
Hi Keizer, Look at *"Computing Thousands of Test Statistics Simultaneously in R" *by Holger Schwender and Tina Müller in http://stat-computing.org/newsletter/v181.pdf HTH Jorge On Tue, Mar 4, 2008 at 6:05 AM, Keizer_71 <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > I am having a real hard tim

Re: [R] renaming objects

2008-03-04 Thread Giles . Crane
Thank you all for your enlightening replies. Hadley mentioned first that a mere assignment in R does not double storage. Hence once solution is: y <- x rm(x) Gabor gave a deeper solution which permits assigning a second name: makeActive Binding("y",function() x, .GlobalEnv) The reason for my qu

Re: [R] equivalent of excel "sumif"

2008-03-04 Thread Henrique Dallazuanna
You can try this: newData <- lapply(list(df1, df2), function(x)split(x[-1], x$lgdcm)) do.call('rbind', lapply(names(newData[[1]]), function(x)newData[[1]][[x]]+newData[[2]][[x]])) On 04/03/2008, Luis Ridao Cruz <[EMAIL PROTECTED]> wrote: > R-help, > > I have two data frames

[R] How to recognize objects in clusters

2008-03-04 Thread Maura E Monville
I have a set of objects ready for clustering, say {O1,O2,,On} Each such object carries an identifier/label/tag, say {a1,a2, . an}. My goal is to recognize the objects after clustering. That is I'd like to know which cluster object Oi has been assigned to and which are the other objects {Oj,

Re: [R] Best way to strsplit a column

2008-03-04 Thread Gabor Grothendieck
Or using the same strg as below: read.table(textConnection(strg), sep = ":", fill = TRUE, as.is = TRUE, na.strings = "") On Tue, Mar 4, 2008 at 9:06 AM, Dimitris Rizopoulos <[EMAIL PROTECTED]> wrote: > try the following: > > strg <- c("123:abc", "qwe:789f", "abcde", "a:fd", "567") > sapply(strsp

Re: [R] inheritence in S4

2008-03-04 Thread Martin Morgan
[EMAIL PROTECTED] writes: > Hi Martin, thanks for your answer > >> But a couple >> of other quick points. I would have written >> >> setMethod("initialize", "A", >> function(.Object, ..., xValue=numeric(0)){ >> callNextMethod(.Object, ..., x=xValue) >> }) >> > > I am

[R] Plot with two different coloured regression lines and legend

2008-03-04 Thread yvo
It is a trivial problem, but in the book I couln`t figure out how to put different colours at different regression lines plot(bif,abund,type="n", xlab= "number_bifurcations", ylab="abundances") sbif<-split(bif,stage) sabund<-split(abund,stage) points(sabund[[2]],sbif[[2]],pch=16, col="red") for(

  1   2   >