Re: [R] stacked bar plot

2011-03-22 Thread Chandra Salgado Kent
Many thanks!! That's a million times easier!! :-) All the best, Chandra From: istaz...@gmail.com on behalf of Ista Zahn Sent: Wed 3/23/2011 12:06 PM To: Chandra Salgado Kent Cc: r-help@r-project.org Subject: Re: [R] stacked bar plot FWIW, the ggplot option

Re: [R] adding vertical segments to an xyplot in lattice

2011-03-22 Thread Bert Gunter
My apologies. That should have been Paul Murrell. -- Bert On Tue, Mar 22, 2011 at 5:07 PM, Tóth Dénes wrote: > > You might also consider the Deducer package. You can build up a plot by > point and click and then have a look at (and amend) the code and learn the > syntax of ggplot2, which is a ni

Re: [R] adding vertical segments to an xyplot in lattice

2011-03-22 Thread Tóth Dénes
IMHO both methods (or languages) have advantages and disadvantages. Sometimes I even find basic graphics the most useful, it always depends on a lot of factors. So do not exclude any of them... > Thanks, the ggplot2 strategy looks promising. For making > information-dense graphs, I tend to vacil

Re: [R] stacked bar plot

2011-03-22 Thread Ista Zahn
FWIW, the ggplot option I suggested works fine with sums instead of means... library(ggplot2) .Table<-data.frame(Sex=c("M","F","M","F","F"), Number=c(10,3,1,2,3), Group_size=c(1,1,2,2,2)) ggplot(.Table, aes(Group_size, Number, fill=Sex)) + geom_bar(stat="summary", fun.y="sum") Best, Ista On We

Re: [R] Best HMM package to generate random (protein) sequences?

2011-03-22 Thread Dennis Murphy
Hi: I can't give you a direct answer, but I'd suggest trying library(sos) findFn('hidden Markov model') which should give you a pretty good idea of where to start looking. If you don't have the package, install it first from CRAN. HTH, Dennis On Tue, Mar 22, 2011 at 4:07 PM, Emmanuel Levy wrot

Re: [R] Urgent query about R!

2011-03-22 Thread Jorge Ivan Velez
Hi Rachel, You might also try apply(expand.grid(rep(list(1:6), 4)), 1, paste, collapse = "", sep = "") HTH, Jorge * * On Tue, Mar 22, 2011 at 6:41 PM, Rachel Chu <> wrote: > Hi there, > > I am currently working on a R programming project and got stuck. > I am supposed to generate a set of pos

Re: [R] Urgent query about R!

2011-03-22 Thread Joshua Wiley
Hi Rachel, First off, getting very stressed when you get stuck is probably not the most helpful approach. Seeking support from someone who knows what to do is an excellent idea, but in the case of classes or homework, it is best to go to your teacher, instructor, or professor. That is what he or

Re: [R] Urgent query about R!

2011-03-22 Thread David Winsemius
On Mar 22, 2011, at 6:41 PM, Rachel Chu wrote: Hi there, I am currently working on a R programming project and got stuck. I am supposed to generate a set of possibilities of 1296 different combinations of 4 numbers, ie. , 1234, 2361, (only contain 1 to 6) in a matrix form here is what I

Re: [R] Characteristic Path length calculation

2011-03-22 Thread Gábor Csárdi
It is the same indeed. Best, Gabor On Tue, Mar 22, 2011 at 7:18 PM, kparamas wrote: > Hi, > > I wish to calculate the characteristic path length of a graph. > > Is average.path.length(g) in 'igraph' the same as calculating the > characteristic path length of the graph? > > Thanks, > Kumar > > --

Re: [R] stacked bar plot

2011-03-22 Thread Chandra Salgado Kent
Hello, Many thanks for your responses! They were very helpful. FYI, ggplot didn't work for me because I needed the sum of the values. The fudged option of barplot was very helpful. Since my matrix is extremely large (the example is a subset), and I would need to take a lot of time to insert

[R] Urgent query about R!

2011-03-22 Thread Rachel Chu
Hi there, I am currently working on a R programming project and got stuck. I am supposed to generate a set of possibilities of 1296 different combinations of 4 numbers, ie. , 1234, 2361, (only contain 1 to 6) in a matrix form here is what I got which has not been working as it keeps coming out

Re: [R] adding vertical segments to an xyplot in lattice

2011-03-22 Thread Chris Ryan
Thanks, the ggplot2 strategy looks promising. For making information-dense graphs, I tend to vacillate between lattice and ggplot2. I should probably settle on one or the other and learn it better. I'll admit I like the default look of lattice plots better, but so far custom panel functions sti

Re: [R] Group labels in lattice barchart

2011-03-22 Thread Dennis Murphy
Hi: The problem with your panel.text() code is that y = Count is either 0 or 1, so the labels never get off the ground, so to speak. Since groups = StimCount, you don't need to specify StimCount in panel.text(); the groups argument does that for you. The essential issue, AFAICT, is to coordinate p

Re: [R] Using the mahalanobis( ) function

2011-03-22 Thread Tyler Rinker
In my haste I did not include the full printout of my R session. My apologies. nd<-read.table("ex20.csv", header=TRUE, sep=",",na.strings="NA") attach(nd) age.frame<-data.frame(Age, Friend.Agression, Parent.Agression, Stranger.Agression) > age.frame Age Friend.Agression Parent.Agression St

Re: [R] assigning a list item using a variable for a name

2011-03-22 Thread Joshua Wiley
Hi RSVP, On Tue, Mar 22, 2011 at 4:47 PM, RSVP wrote: > I have a list. > > my.list <- list(Tom=c(1,2,3), Dick=c(4,5,6), Harry=c(7,8,9)) > > I assign one of the names of the list to a variable. > > name <- "Harry" > > I can access the value of the list using the variable as follows: > >  eval(pars

Re: [R] lm ~ v1 + log(v1) + ... improve adj Rsq ¿any sense?

2011-03-22 Thread Mike Marchywka
> Date: Tue, 22 Mar 2011 09:31:01 -0700 > From: crossp...@hotmail.com > To: r-help@r-project.org > Subject: [R] lm ~ v1 + log(v1) + ... improve adj Rsq ¿any sense? > > Dear all, > > I want to improve my adj - R sq. I 've chequed some established models

[R] Using the mahalanobis( ) function

2011-03-22 Thread Tyler Rinker
I want to calculate the Manhalanobis D as an effect size for a follow up to a MANOVA. I think I'm getting further but still not there. No one has weighed in yet to lend help and I would much appreciate it, particulalry those who are familiar with cluster analysis or MANOVA follow up/effect si

[R] assigning a list item using a variable for a name

2011-03-22 Thread RSVP
I have a list. my.list <- list(Tom=c(1,2,3), Dick=c(4,5,6), Harry=c(7,8,9)) I assign one of the names of the list to a variable. name <- "Harry" I can access the value of the list using the variable as follows: eval(parse(text=paste("my.list$", name, sep=""))) [1] 7 8 9 But how do I change

[R] Characteristic Path length calculation

2011-03-22 Thread kparamas
Hi, I wish to calculate the characteristic path length of a graph. Is average.path.length(g) in 'igraph' the same as calculating the characteristic path length of the graph? Thanks, Kumar -- View this message in context: http://r.789695.n4.nabble.com/Characteristic-Path-length-calculation-tp33

Re: [R] Popularity of R, SAS, SPSS, Stata, Statistica, S-PLUS updated

2011-03-22 Thread Bob Muenchen
On 3/22/2011 5:15 PM, Hadley Wickham wrote: I don't doubt that R may be the "most popular" in terms of discussion group traffic, but you should be aware that the traffic for SAS comprises two separate lists that used to be mirrored, but are no longer linked Usenet -- news://comp.soft-sys.sas (

Re: [R] manova question

2011-03-22 Thread John Fox
Dear Ranjan, Looking at your data, studentgroup is a numeric variable, so your call to lm() produces a multivariate regression, not a one-way MANOVA. Here's a correction: > morel$studentgroup <- as.factor(morel$studentgroup) > Manova( lm( cbind(aptitude, mathematics, language, generalknowledge)

Re: [R] rbind a heterogeneous row

2011-03-22 Thread Henrique Dallazuanna
You need a list object indeed of a vector, try this: rbind(df, dreps = c(rep(list(TRUE), 7), 5, 0)) On Tue, Mar 22, 2011 at 10:12 PM, Alexy Khrabrov wrote: > I have a dataframe with many rows like this: > >> df >                 X1   X2   X3   X4   X5   X6   X7 week         d > sim1 FALSE TRUE T

[R] rbind a heterogeneous row

2011-03-22 Thread Alexy Khrabrov
I have a dataframe with many rows like this: > df X1 X2 X3 X4 X5 X6 X7 week d sim1 FALSE TRUE TRUE TRUE TRUE TRUE TRUE1 0.3064985 sim1 is the rowname, X1..X7,week,d are the column names. X1..X7 are factors, booleans in this case. I need to add another r

Re: [R] manova question

2011-03-22 Thread Ranjan Maitra
Dear John, Peter and others, So, I now have a query at an even more elementary level and that is regarding my results from anova.mlm() not matching the car package's Manova(). Specifically, I have been trying the following out with regard to a simple one-way MANOVA setup. So, I try out the followi

Re: [R] adding vertical segments to an xyplot in lattice

2011-03-22 Thread Tóth Dénes
You might also consider the Deducer package. You can build up a plot by point and click and then have a look at (and amend) the code and learn the syntax of ggplot2, which is a nice alternative to the lattice package. The website of the Deducer package (www.deducer.org) is a good start. -- An

Re: [R] Rapache ( was Developing a web crawler )

2011-03-22 Thread Mike Marchywka
> Subject: Re: [R] Rapache ( was Developing a web crawler ) > From: m...@biostatmatt.com > To: marchy...@hotmail.com > CC: r-help@r-project.org > Date: Sun, 6 Mar 2011 13:51:53 -0500 > > On Sun, 2011-03-06 at 08:06 -0500, Mike Marchywka wrote: > > > > >

Re: [R] problem with xyplot

2011-03-22 Thread askh
Thank you all for the help. After I used proper subsetting, it all worked fine. And yes, I am open to receiving a prize for the most ancient version of R in use... Best, alina -- View this message in context: http://r.789695.n4.nabble.com/problem-with-xyplot-tp3391822p3398070.html Sent from t

[R] Best HMM package to generate random (protein) sequences?

2011-03-22 Thread Emmanuel Levy
Dear All, I would like to generate random protein sequences using a HMM model. Has anybody done that before, or would you have any idea which package is likely to be best for that? The important facts are that the HMM will be fitted on ~3 million sequential observations, with 20 different states

Re: [R] time series from timed data

2011-03-22 Thread Gabor Grothendieck
On Tue, Mar 22, 2011 at 6:49 PM, Sam Steingold wrote: > Hi, > thanks for your reply. > >> * Gabor Grothendieck [2011-03-18 17:51:03 -0400]: >> On Fri, Mar 18, 2011 at 2:19 PM, Sam Steingold wrote: >> >> 2. An alternative that won't generate a warning message but involves a >> double read is: >>

Re: [R] adding vertical segments to an xyplot in lattice

2011-03-22 Thread Bert Gunter
Well, a custom panel function is what you need (or one that may already exist somewhere: try googling on "high low intervals in R graphs" or some such). So if you haven;t already done so, try Paul Morrell's Chapter on lattice plots from his book for how panel functions work: http://www.stat.auckl

Re: [R] time series from timed data

2011-03-22 Thread Sam Steingold
Hi, thanks for your reply. > * Gabor Grothendieck [2011-03-18 17:51:03 -0400]: > On Fri, Mar 18, 2011 at 2:19 PM, Sam Steingold wrote: > > 2. An alternative that won't generate a warning message but involves a > double read is: > > library(zoo) > toPOSIXct <- function(x) as.POSIXct(trunc(as.POSI

Re: [R] Unexpected behavior of windows() command followed by print(LATTICEPLOT)

2011-03-22 Thread David Winsemius
On Mar 22, 2011, at 4:14 PM, Dennis Fisher wrote: Colleagues R: 2.12.2 Windows 7 (64-bit) I am experiencing unexpected behavior in the following situation: FILE1: windows() plot(1, 1,) FILE2: windows()

Re: [R] help need on working in subset within a dataframe

2011-03-22 Thread Umesh Rosyara
Thank you, Ista. It helps. Best Regards Umesh R _ From: istaz...@gmail.com [mailto:istaz...@gmail.com] On Behalf Of Ista Zahn Sent: Tuesday, March 22, 2011 8:58 AM To: Umesh Rosyara Cc: R mailing list Subject: Re: [R] help need on working in subset within a dataframe Hi Ume

Re: [R] Loading mdb

2011-03-22 Thread ROLL Josh F
I am trying the RODBC package and the odbcConnectAccess function but am getting an error: Error in odbcConnectAccess("T:/Models/LandUse/GenericLandSupplyModel/Projects/2008BaseYear/EugeneUGB/ Reporting/Summary.mdb") : odbcConnectAccess is only usable with 32-bit Windows I am on a 64 bit mach

Re: [R] Loading mdb

2011-03-22 Thread ROLL Josh F
I am getting into some more posts about having to have mdb-tools installed on my system (Windows XP) and have located the download but its not an executable install file and it looks like from what you said these tools are for non-windows based systems anyhow? Is the mdb.get function the only

[R] Group labels in lattice barchart

2011-03-22 Thread David Perlman
Hello, I've been searching on the web for a few hours and seem to be stuck on this. The code pasted below generates a histogram of subject responses in four different conditions in an experiment. This version of the graph is one I'm using for internal consistency checking, so I've set it up to

Re: [R] Part of density plot not showing up

2011-03-22 Thread John Kane
Without seeing your code it could be just about anything. PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained reproducible code. --- On Mon, 3/21/11, Jim Silverton wrote: > From: Jim Silverton > Subject: Re: [R] Part of

Re: [R] affymetrix human gene 1.0 st gene level

2011-03-22 Thread Peter Langfelder
On Tue, Mar 22, 2011 at 11:35 AM, Unger, Kristian, Dr. wrote: > Hi there > > I recently got some affymetrix human gene 1.0 st array. I only get out the > probe level data and I wonder if there is a function that is able to average > the probe level data for each gene? In the WGCNA package we ha

Re: [R] Loading mdb

2011-03-22 Thread Phil Spector
Josh - There are two ways that I know of to use Access in R on Windows: 1) odbcConnectAccess or odbcConnectAccess2007 in the ODBC package and 2) Configuring the Access ODBC connector in Control Panel -> Administrative Tools -> Data Sources(ODBC) and using connectODBC in the

Re: [R] Popularity of R, SAS, SPSS, Stata, Statistica, S-PLUS updated

2011-03-22 Thread Hadley Wickham
> I don't doubt that R may be the "most popular" in terms of discussion group > traffic, but you should be aware that the traffic for SAS comprises two > separate lists that used to be mirrored, but are no longer linked > Usenet --  news://comp.soft-sys.sas  (what you counted) > listserve -- "SAS-L

Re: [R] Loading mdb

2011-03-22 Thread Kenn Konstabel
I've used RODBC to read in ms access files... or if you're as lazy as me you could use the following below (it can handle some other ms office file types too and thinks it can recognize file types but as has been pointed out in this list, using it with excel probably means trouble) read.mso <- fun

Re: [R] Infinite loop

2011-03-22 Thread jim holtman
Some systems (both hardware and software) may have "watchdog" timers; I was just using it to illustrate a point as to one way of breaking out. In the case of this loop, it probably run too fast to try and put a timer on it; counting the iterations is good enough. There are some ways of creating t

Re: [R] Popularity of R, SAS, SPSS, Stata, Statistica, S-PLUS updated

2011-03-22 Thread Michael Friendly
On 3/22/2011 6:37 AM, Muenchen, Robert A (Bob) wrote: Greetings, I've just put out the latest version of "The Popularity of Data Analysis Software" at http://r4stats.com/popularity. This update includes complete data for 2010, the addition of number of blogs for each software, more coverage of

[R] Unexpected behavior of windows() command followed by print(LATTICEPLOT)

2011-03-22 Thread Dennis Fisher
Colleagues R: 2.12.2 Windows 7 (64-bit) I am experiencing unexpected behavior in the following situation: FILE1: windows() plot(1, 1,) FILE2: windows() PLOT<- code.to.create.a.lattice.object()

Re: [R] Problem with plot histogram

2011-03-22 Thread Dennis Murphy
Hi: Try this instead of your original lines() statement: lines(x + 0.1, att, type="h", col="red") or plot(numgoal, goal, type="h", lwd = 3) x <- 0:5 y<-dpois(x, lambda) att<-y*380 lines(x + 0.1, att, type="h", col="red", lwd = 3) legend(x="topright", legend=c("Osservate", "Attese"), col=c("blac

Re: [R] Loading mdb

2011-03-22 Thread Phil Spector
I believe that you are misinterpreting the error message. The mdb-get function relies on external programs named "mdb-tables" and "mdb-schema" to do its work. Those programs must be installed on your computer (and in directories in your search path), for the function to work. I don't know what op

[R] Data frame and function that requires vector as input

2011-03-22 Thread Gian Luca Negri
Hi, I have a data.frame(zscores) that looks like this: gA gB g1 0.20.6 g2 0.3Na My problem is that I need to use a function and the output is a vector of only the non NA values, so shorter than the list I would obtain dropping the data.frame. What is the cleanest way to

[R] command prompt shell suppressing stdout?

2011-03-22 Thread Michael Neely
After four years of using R, I finally have run into a problem to which I can't find a solution in the guides or forums and thus I am making my first post. Our lab has Fortran code for population modeling. I have been using R as a wrapper to process the raw data, generate a batch script that co

[R] lm ~ v1 + log(v1) + ... improve adj Rsq ¿any sense?

2011-03-22 Thread agent dunham
Dear all, I want to improve my adj - R sq. I 've chequed some established models and they introduce two times the same variable, one transformed, and the other not. It also improves my adj - R sq. But, isn't this bad for the collinearity? Do I interpret coefficients as usual?

[R] CONFERENCE: useR! 2011, August 16-18, University of Warwick, early bird deadline

2011-03-22 Thread useR! 2011, Resource
This is a reminder that the deadline for abstract submission and early bird registration for the R User Conference 2011 is April 1st. useR! 2011 http://www.R-project.org/useR-2011 A conference centred on the use of R for data analysis and statistical computing. August 16-18, University of

[R] Loading mdb

2011-03-22 Thread LCOG1
Well im thoroughly frustrated after 25 minutes of checking and rechecking my path. What do i not know about loading a mdb that is keeping me from loading my data. i have loaded the Hmisc library and pointed it too my data using mdb.get and continue to get the following error. Error in system(

Re: [R] Exponential distribution

2011-03-22 Thread danielepippo
Thank you very very much... It's perfect to my goal... -- View this message in context: http://r.789695.n4.nabble.com/Exponential-distribution-tp3394476p3396803.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org maili

[R] Problem with plot histogram

2011-03-22 Thread danielepippo
Hi R-users, I'm trying to built a plot of two series of data, but thees series result "superimposed". The R-code is like this: goal <- c(125, 143, 81, 26, 2, 3) numgoal <- 0:5 lambda <- sum(goal*numgoal)/sum(goal) plot(numgoal, goal, type="h") x <- 0:5 y<-dpois(x, lambda) att<-y*380

Re: [R] ks and contour plot labels

2011-03-22 Thread Peter Ehlers
On 2011-03-22 03:57, Erich Neuwirth wrote: Is there an easy way to control the font size for the contour lines in plots of kde objects in package ks? The label size seems not obey the cex parameter (which probably would be the R way of doing it). Erich, Try the argument 'labcex'. Peter Ehlers

Re: [R] Looking for a repeated measure two groups comparison and a two factor ANOVA in Circular distribution

2011-03-22 Thread Ben Bolker
Bert Gunter gene.com> writes: > > 1. I suggest you try posting on the r-sig-geo list, as I would guess > that circular distributions are a relevant topic of concern there > (spatial statistics) for which expertise would be available. > > 2. Also check out the lme4 package and glmer. You might

Re: [R] linear regression in a ragged array

2011-03-22 Thread Greg Snow
In general when you want to split up your data and do the same thing on each piece then combine the results back together it is good to look at the plyr package. But for this specific case you should look at the lmList function in the nlme package which may do exactly what you want with the lea

[R] adding vertical segments to an xyplot in lattice

2011-03-22 Thread Christopher W Ryan
I have a dataframe that looks like this: > str(chr) 'data.frame': 84 obs. of 7 variables: $ county: Factor w/ 3 levels "Broome","Nassau",..: 3 3 3 3 3 3 3 3 3 3 ... $ item : Factor w/ 28 levels "Access to healthy foods",..: 21 19 20 18 16 3 2 6 17 8 ... $ value : num 8644 15 3.5 3.9 7.7 .

Re: [R] EM and Mixtools

2011-03-22 Thread Jim Silverton
I have 2 questions concerning the EM algorithm. Is it true that the EM algorithm gives unique answers for the means and variances of a mixture of 2 normals? I am using mixtools and I am surprised that it works better than a Bayesian program I wrote. If so can someone say why the mixing probabilitie

Re: [R] affymetrix human gene 1.0 st gene level

2011-03-22 Thread David Winsemius
On Mar 22, 2011, at 2:35 PM, Unger, Kristian, Dr. wrote: Hi there I recently got some affymetrix human gene 1.0 st array. I only get out the probe level data and I wonder if there is a function that is able to average the probe level data for each gene? The BioConductor list is probably

[R] affymetrix human gene 1.0 st gene level

2011-03-22 Thread Unger, Kristian, Dr.
Hi there I recently got some affymetrix human gene 1.0 st array. I only get out the probe level data and I wonder if there is a function that is able to average the probe level data for each gene? Best wishes Kristian Unger Helmholtz Zentrum M?nchen Deutsches

[R] Help in Compiling R for AIX 5.3 servers

2011-03-22 Thread Lars Bishop
Dear List, I've used R fr a while now, but I'm totally unfamiliar with the compiling process. In particular, I'd like to compile R for AIX 5.3. servers. I'll appreciate your guidance on the best place to get started on this. Thanks in advance, Lars. [[alternative HTML version deleted]]

Re: [R] Looping Problem

2011-03-22 Thread Dieter Menne
armstrwa wrote: > > for(i in 1:length(gagehandles)){ > > dates<-get(paste(gagehandles[i],"_amsd",sep="")) > Error in get(paste(gagehandles[i], "_amsd", sep = "")) : > variable names are limited to 256 bytes > > It didn't have a problem with the variable names before, so I'm not sure > wh

Re: [R] Infinite loop

2011-03-22 Thread Hosack, Michael
Thank you so much Martyn. Now I can most likely avoid having to rerun my program multiple times. Mike -Original Message- From: Martyn Byng [mailto:martyn.b...@nag.co.uk] Sent: Tuesday, March 22, 2011 1:21 PM To: Hosack, Michael Cc: r-help@R-project.org Subject: RE: [R] Infinite loop

Re: [R] Infinite loop

2011-03-22 Thread Hosack, Michael
Thank you Jim, I was not aware of watchdog timers. R is my first computer language. I searched through the archives and found the function setTimeLimit and applied it with low values for cpu and elapsed time. It provides a way out of the loop which is what I needed. It's not a counter, but I cou

Re: [R] lm ~ v1 + log(v1) + ... improve adj Rsq ¿any sense?

2011-03-22 Thread Frank Harrell
If you care about confidence interval coverage, type I error, or predictive accuracy, trying different models in this way is not the way to go. Frank agent dunham wrote: > > Dear all, > > I want to improve my adj - R sq. I 've chequed some established models and > they introduce two times the

Re: [R] Infinite loop

2011-03-22 Thread Martyn Byng
Hi, This might do what you want: iter <- 0 repeat { iter <- iter + 1 ss <- numeric(40) ss[1] <- sample(1:40,1) for (i in 1:39) { ## calculate all possible step sizes that will give a new value in the 1:40 range pmove <- sample((1 - ss[i]):(40-ss[i])) ## drop all step sizes tha

Re: [R] how to convert a data.frame to a list of dist objects for individual differences MDS?

2011-03-22 Thread Michael Friendly
On 3/22/2011 12:47 PM, Phil Spector wrote: Michael - I think this does what you want: *Perfectly* helm.raw <- read.table("http://euclid.psych.yorku.ca/datavis/Private/mdshelm.dat",header=TRUE, row.names=1) trans = c('A'='RPur','C'='Red','E'='Yel','G'='Gy1','I'='Gy2','K'='Green','M'='Blue

Re: [R] Basic Looping Trouble

2011-03-22 Thread armstrwa
Thanks, Petr.  Your insight has helped me out a lot. Billy Petr Savicky-2 [via R] wrote: On Mon, Mar 21, 2011 at 02:28:32PM -0700, armstrwa wrote: > Hi all, > > Forgive me for this basic question.  I've been doing so

Re: [R] Kendall v MannKendall Functions

2011-03-22 Thread armstrwa
Thank you very much, Peter.  That does make it clearer. Billy Peter Ehlers [via R] wrote: On 2011-03-21 14:16, armstrwa wrote: > Hi, > > I am running a correlation analysis on a temporal dataset.  I was wondering

[R] Looping Problem

2011-03-22 Thread armstrwa
Hi all, I am trying to write a script that will automate the task of running a Kendall's Tau correlation test on 75 time series that I am interested in. The code I have written is: for(i in 1:length(gagehandles)){ dates<-get(paste(gagehandles[i],"_amsd",sep="")) q<-get(paste(gagehandles[i],"_a

Re: [R] Infinite loop

2011-03-22 Thread jim holtman
The simple thing to do is to put a sanity counter in the 'repeat' statement and if you have been through it a certain number of times, then exit. Anytime you have a loop that might run forever, you should have some sanity/watchdog timer on it. On Tue, Mar 22, 2011 at 11:02 AM, Hosack, Michael wr

Re: [R] how to convert a data.frame to a list of dist objects for individual differences MDS?

2011-03-22 Thread Phil Spector
Michael - I think this does what you want: helm.raw <- read.table("http://euclid.psych.yorku.ca/datavis/Private/mdshelm.dat",header=TRUE, row.names=1) trans = c('A'='RPur','C'='Red','E'='Yel','G'='Gy1','I'='Gy2','K'='Green','M'='Blue','O'='BlP','Q'='Pur1','S'='Pur2') cnames = do.call(rbind,

Re: [R] Problem with mclapply -- losing output/data

2011-03-22 Thread Elizabeth Purdom
Hello, I forgot to mention that I am looping over ~70K objects. If I do mclapply on the first 200, its fine (i.e. doesn't give NULL values); if I go up to 2K (or over all of them), then I start to see NULL values. Also the function I call uses commands 'restrict', 'gaps' and 'width' from the

Re: [R] memory increasing

2011-03-22 Thread David Winsemius
On Mar 22, 2011, at 12:06 PM, David Winsemius wrote: On Mar 22, 2011, at 10:17 AM, graziella wrote: Dear All, I am an Italian researcher in Economics. I work with large sample data. I need to increase the memory in R-project in order to upload a file ".dta". How can I do this? http:/

Re: [R] Accelerating the calculation of the moving average

2011-03-22 Thread William Dunlap
filter(), in the stats package, can do moving averages (with any weights). Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Tonja Krueger > Sent: Tuesday, March 22, 2011

Re: [R] Find Principal Component Score per year

2011-03-22 Thread Carlos Ortega
Hello, First, you can try to split your data frame in this way: list.year<-split(pca, unique(pca$year)) And then apply the principal component analysis over the list "list.year". Regards, Carlos Ortega www.qualityexcellence.es On Tue, Mar 22, 2011 at 12:35 PM, mathijsdevaan wrote: > Hi, > > I

Re: [R] memory increasing

2011-03-22 Thread David Winsemius
On Mar 22, 2011, at 10:17 AM, graziella wrote: Dear All, I am an Italian researcher in Economics. I work with large sample data. I need to increase the memory in R-project in order to upload a file ".dta". How can I do this? http://search.r-project.org/cgi-bin/namazu.cgi?query=read+stat

Re: [R] new distribution

2011-03-22 Thread Arne Henningsen
Dear Graziella On 22 March 2011 16:08, graziella wrote: > I need to introduce new distribution for the error components of a frontier > model. For this reason, I use the package Frontier 4.1, The software "Frontier 4.1" is not related to R. However, the R package "frontier" is based on "Frontier

Re: [R] Looking for a repeated measure two groups comparison and a two factor ANOVA in Circular distribution

2011-03-22 Thread Bert Gunter
1. I suggest you try posting on the r-sig-geo list, as I would guess that circular distributions are a relevant topic of concern there (spatial statistics) for which expertise would be available. 2. Also check out the lme4 package and glmer. You might be able to write your own family function the

Re: [R] Looking for a repeated measure two groups comparison and a two factor ANOVA in Circular distribution

2011-03-22 Thread Tyler Rinker
I don't know if this is what you're looking for but it describes how to do a 2 way repeated measures with R. You problem may be different and I lack the stats knowledge to know that. If that's the case I apoligize: http://rtutorialseries.blogspot.com/2011/02/r-tutorial-series-two-way-repeated

[R] how to convert a data.frame to a list of dist objects for individual differences MDS?

2011-03-22 Thread Michael Friendly
I have a 45 x 16 data frame consisting of dissimilarities among 10 colors, giving in each column the 45 = 10*9/2 pairwise judgments for one of 16 subjects. The rownames identify each pair of colors, e.g, "AC" = ("A","C"), and the pairs are ordered by columns in the lower triangle of each dista

Re: [R] Need help with error

2011-03-22 Thread Savitri N Appana
Thank you very much Peter. It works fine now Best, Savi >>> Peter Ehlers 3/22/2011 5:49 AM >>> On 2011-03-21 10:37, Savitri N Appana wrote: > Thank you for your suggestion Allan. I should have paid attention to > the posting instructions. > > > Pls find below the sample code from the ?splsd

[R] "R Cookbook" available in print edition

2011-03-22 Thread Paul Teetor
Dear R community members: The print edition of the "R Cookbook" is now available: http://www.amazon.com/dp/0596809158/ The Cookbook is also available from the publisher in a variety of e-book formats, including ePub, mobi, and PDF (http://oreilly.com/catalog/9780596809157). The book is

Re: [R] memory increasing

2011-03-22 Thread graziella
Thank you Jonathan. A file .dta is a dataset uploaded on Stata 10, that is another Statistical Program of data processing. I think that you help me. Thank you very much. graziella -- View this message in context: http://r.789695.n4.nabble.com/memory-increasing-tp3396511p3396679.html Sent from the

Re: [R] appending collums in for loop

2011-03-22 Thread Who Am I?
Got it working with a package called 'xlsReadWritePro' (which requires a license after 30 day's...) This is my code: setwd("J:/Stage/Datasets2/Datasets/outData") masterTable<-read.table("AR1000900A_N_241110_(Mapping250K_Nsp)_2,Mapping250K_Nsp,CNprobes.tab _SNP_IDs.xls",sep="\t", dec=",", fill=T, h

[R] new distribution

2011-03-22 Thread graziella
Dear All, I need to introduce new distribution for the error components of a frontier model. For this reason, I use the package Frontier 4.1, but I need to introduce other distribution function than Normal and Half-Normal (that are those given by default). I hope that someone help me. Thanks. graz

Re: [R] Accelerating the calculation of the moving average

2011-03-22 Thread Gabor Grothendieck
On Tue, Mar 22, 2011 at 11:05 AM, Tonja Krueger wrote: > > Dear List, > I have a data frame with approximately 50 rows that looks like this: > >  Date    time    value > … > 19.07.1956  12:00:00   4.84 > 19.07.1956  13:00:00   4.85 > 19.07.1956 

Re: [R] Accelerating the calculation of the moving average

2011-03-22 Thread Kenn Konstabel
On Tue, Mar 22, 2011 at 3:05 PM, Tonja Krueger wrote: > > Dear List, > I have a data frame with approximately 50 rows that looks like this: > > Datetimevalue > … > 19.07.1956 12:00:00 4.84 > 19.07.1956 13:00:00 4.85 > 19.07.1956

Re: [R] memory increasing

2011-03-22 Thread Jonathan P Daily
1) What kind of file is a .dta? 2) Do you have more RAM than R is using? Check this with ?memory.limit 3) Are you on a 64 bit OS with 64 bit R? I can tell you that starting R with --max-mem-size= may help, but you probably want to look into R interfaces with databases first. ---

[R] Accelerating the calculation of the moving average

2011-03-22 Thread Tonja Krueger
Dear List, I have a data frame with approximately 50 rows that looks like this:  Date    time    value … 19.07.1956  12:00:00   4.84 19.07.1956  13:00:00   4.85 19.07.1956  14:00:00   4.89 19.07.1956  15:00:00   4

[R] Infinite loop

2011-03-22 Thread Hosack, Michael
R experts, Hello, I am trying to sample a vector 1:40 without replacement such that no element in the new vector is within 7 units of either of its immediate neighbors. This is part of a larger program I am working on. The following code works well about 65 % of the time (14/40). The problem I

[R] Looking for a repeated measure two groups comparison and a two factor ANOVA in Circular distribution

2011-03-22 Thread Jon Toledo
Hi, I am looking for a way to study some phase data with a circular distribution measured in rad.I would like to do a two way ANOVA (if possible mixed, with inter and intrasubject).I haven´t found a package that does that in R?Does sombeody know if there is one or how to do the analysis.Thanks

[R] Diagonal population density

2011-03-22 Thread Julio Rojas
Dear all. I have to plot a the marginal population density for a heat map that represents the population density of a city. I have been able to plot the heat map in the lower left corner, the marginal density in x in the upper left corner and the marginal density in y in the lower left corner. W

Re: [R] How to substract a valur from dataframe with condition

2011-03-22 Thread joe82
Thank you all !! On Tue, Mar 22, 2011 at 3:53 AM, Peter Ehlers [via R] < ml-node+3395720-1679132054-222...@n4.nabble.com> wrote: > On 2011-03-21 14:39, joe82 wrote: > > > Hello All, > > > > I need help with my dataframe, it is big but here I am using a small > table > > as an example. > > > > My

[R] memory increasing

2011-03-22 Thread graziella
Dear All, I am an Italian researcher in Economics. I work with large sample data. I need to increase the memory in R-project in order to upload a file ".dta". How can I do this? Thank you. graziella -- View this message in context: http://r.789695.n4.nabble.com/memory-increasing-tp3396511p339651

Re: [R] Same color key for multiple lattice contour plots

2011-03-22 Thread joepvanderzanden
Hi Deepayan, Meanwhile I found another solution by simply creating more steps within the colorscale, so one could not notice when the colours mismatch one or two units. Your solution is more elegant though. Joep -- View this message in context: http://r.789695.n4.nabble.com/Same-color-key-for-

Re: [R] Combination that adds a value

2011-03-22 Thread Julio Rojas
Thx Petr. It worked likea charm. Regards. __ 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, re

Re: [R] stacked bar plot

2011-03-22 Thread Ista Zahn
Hi Chandra, You could use ggplot2: library(ggplot2) ggplot(dat, aes(Group_size, Number, fill=Sex)) + geom_bar(stat="summary", fun.y="mean") Best, Ista On Tue, Mar 22, 2011 at 7:30 AM, Chandra Salgado Kent wrote: > Hello, > > > > I'm wondering if someone may be able to help me, and do apologiz

Re: [R] help need on working in subset within a dataframe

2011-03-22 Thread Ista Zahn
Hi Umesh, I use the plyr package for this sort of thing: library(plyr) daply(dataframe, .(ped), myfun) Best, Ista On Tue, Mar 22, 2011 at 3:48 AM, Umesh Rosyara wrote: > Dear R-experts > > Execuse me for an easy question, but I need help, sorry for that. > > >From days I have been working with a

[R] Find Principal Component Score per year

2011-03-22 Thread mathijsdevaan
Hi, I am trying to calculate Principal Component Scores per id per year using the psych package. The following lines provide the scores per obeservation pca = data.frame(read.table(textConnection("id year A B C D 1001 1972 64 56 14 23 1003 1972 60 55

  1   2   >