[R] installing packages from a directory on the computer

2010-06-22 Thread Subramanian S
i tried pkgs <- c("pkg1", "pkg2", "pkg3") install.packages(pkgs, repos = NULL, + contriburl = "file:///C:/R/packages/bin/windows/contrib/2.11", + dependencies = TRUE) i have put the zip files in C:/R/packages/bin/windows/contrib/2.11 *** and extracted the package

Re: [R] [Rd] New errors with difftime()-objects in 2.11.1 (was Re: Request: difftime method for cut())

2010-06-22 Thread Peter Dalgaard
Gustaf Rydevik wrote: > Oh, I forgot to mention that the workaround of using as.double (or > as.numeric) works fine, and I've done that. > It's just that it can take quite a while (as in several hours) to > figure out that the reason for the error is that you have to force > difftime objects to be

[R] (help) This is an R workspace memory processing question

2010-06-22 Thread 나여나
Hi all! This is an R workspace memory processing question. There is a method which from the R will control 10GB data at 500MB units? my work environment : R version : 2.11.1 OS : WinXP Pro sp3 Thanks and best regards. Park, Young-Ju from Korea. [1][rKWLz

Re: [R] points marking

2010-06-22 Thread khush ........
Hej Gregory, Thanks for your reply and sorry for late reply, actually I was busy with some other stuff but It helped me alot. Thanks again sir. Thanks to both of you. Thank you Jeet On Wed, Jun 16, 2010 at 2:27 AM, Greg Snow wrote: > OK, I did not see the website before, here is some code to

Re: [R] Lattice legend

2010-06-22 Thread Felix Andrews
2010/6/23 Seth W Bigelow : >> "with(alt.data[[which.packet()[1]]]" statements. It all graphs out >> beautifully, but none of the usual tricks to get the proper legend to > plot >> are working, i.e., using auto.key, key, etc. You haven't told us exactly what you mean by "proper legend", but it is g

Re: [R] Verify the linear regression model used in R ( fundamental theory)

2010-06-22 Thread Gabor Grothendieck
On Tue, Jun 22, 2010 at 7:46 PM, Yi wrote: > Hi, folks, > > As I understand, Least-squares Estimate (second-moment assumption) and the > Method of Maximum Likelihood (full distribtuion assumption) are used for > linear regression. > > I do >?lm, but the help file does not tell me the model employe

Re: [R] need help when "make check" R-2.11.1

2010-06-22 Thread Kuan(謝冠生)
Hi Tim, I had solved the problem myself. I found that the problem was caused by VMware. After re-installing vmware-tools, the problem disappeared... Furthermore, the issue has nothing to do with xz software. I had uninstalled xz on my system and the "make check" still passed all test. If you a

Re: [R] Mahalanobis distance

2010-06-22 Thread Joris Meys
Say X is your data matrix with the variable, then you could do : X <- matrix(rnorm(2100),300,7) S <- var(X) dist <- as.dist( apply(X,1,function(i){ mahalanobis(X,i,S) } ) ) Cheers Joris On Tue, Jun 22, 2010 at 11:41 PM, yoo hoo wrote: > I am a new R user.  i have

Re: [R] How to 'understand' R functions besides reading R codes

2010-06-22 Thread Joris Meys
There is: 1) read the help files 2) read the vignette (see ?vignette ) 2) look up at www.rseek.org 3) check google 4) look at the references mentioned in the help files (or do first if you're not familiar with the method) 5) ask here If still nothing : use another function/method. Cheers Joris O

[R] How to 'understand' R functions besides reading R codes

2010-06-22 Thread Yi
Apologize for not being clearer earlier. I would like to ask again. Thank Joris and Markleeds for response. Two examples: 1. Function 'var'. In R, it is the sum of square divided by (n-1) but not by n. (I know this in R class) 2. Function 'lm'. In R, it is the residual sum of square divied by (n

Re: [R] constructing a data frame from ftable

2010-06-22 Thread Henrique Dallazuanna
Try this: x <- ftable(a.df$DATE, paste(a.df$GENDER, a.df$Co, sep = "-")) as.data.frame(`class<-`(`dimnames<-`(x, list(attr(x, 'row.vars')[[1]], attr(x, 'col.vars')[[1]])), 'matrix')) On Tue, Jun 22, 2010 at 6:50 PM, Erin Hodgess wrote: > Dear R People: > > I have the following data set with the

Re: [R] Verify the linear regression model used in R ( fundamental theory)

2010-06-22 Thread Joris Meys
It's normally always specified, unless in the case of least squares linear regression (lm), where it is considered obvious. Cheers Joris On Wed, Jun 23, 2010 at 1:46 AM, Yi wrote: > Hi, folks, > > As I understand, Least-squares Estimate (second-moment assumption) and the > Method of Maximum Like

[R] vowel plot and IPA installation

2010-06-22 Thread yoo hoo
anyone can give me a detailed instuction about how to install IPA in R and do vowel plot? Thx. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the po

[R] Remove squares from scatter3D

2010-06-22 Thread moleps
Dear All, I´ve been trying to find an option to scatter3D from rcmdr to remove the individual points from the plots but to no help so far. Removing the residuals is easy, but I cannot find a similar point option. Is there such an option that can be set to FALSE? Best, //M __

[R] Mahalanobis distance

2010-06-22 Thread yoo hoo
I am a new R user. i have a question about Mahalanobis distance.actually i have 300 rows and 7 columns. columns are different measurements, 300 rows are genes. since genes can classify into 4 categories. i used dist() with euclidean distance and cmdscale to do MDS plot. but find out Mahalanobi

Re: [R] Lattice legend

2010-06-22 Thread Seth W Bigelow
Here is the code for my recent query: The first part just sets up the data. It's the last part titled "individual depth graph" where the actual graphics code comes in Thx --Seth library(lattice) setwd("c:/sethdocs/3 Light and PLAS txs/8 Figures/Fg 6 Soil wetness") d <- read.table("2007 data.t

Re: [R] Popularity of R, SAS, SPSS, Stata...

2010-06-22 Thread Dr. David Kirkby
On 06/20/10 02:31 PM, Muenchen, Robert A (Bob) wrote: Hi All, I've been fiddling around with various ways to estimate the popularity of R, SAS, SPSS, Stata, JMP, Minitab, Statistica, Systat, BMDP, S-PLUS, R-PLUS and Revolution R. It's not an easy task. You can see what I've come up with so far a

[R] Verify the linear regression model used in R ( fundamental theory)

2010-06-22 Thread Yi
Hi, folks, As I understand, Least-squares Estimate (second-moment assumption) and the Method of Maximum Likelihood (full distribtuion assumption) are used for linear regression. I do >?lm, but the help file does not tell me the model employed in R. But in the book 'Introductory Statistics with R'

Re: [R] subset dataset using factor levels instead of factor names

2010-06-22 Thread Phil Spector
Rachel - Not exactly a reproducible example, but maybe t1 <- subset(nih2009, ic_name %in% levels(nih2009$ic_name)[c(27,51)]) - Phil Spector Statistical Computing Facility

[R] subset dataset using factor levels instead of factor names

2010-06-22 Thread Hayes, Rachel M
Hi All, I have a factor variable with 52 levels -with long, annoying names. I want to keep only rows with some variables. I can do this using this code: test1 <- subset(nih2009,ic_name %in% c('NATIONAL EYE INSTITUTE','Veterans Affairs')) dim(test1) [1] 2396 38 But this doesn't work: t1 <

[R] Lattice legend

2010-06-22 Thread Seth W Bigelow
I have a moderately complex graph with three panels. There are data points plotted, and fitted lines are added using a panel function, which includes "with(alt.data[[which.packet()[1]]]" statements. It all graphs out beautifully, but none of the usual tricks to get the proper legend to plot ar

Re: [R] constructing a data frame from ftable

2010-06-22 Thread Phil Spector
Erin - Perhaps this reproducible example will help: df = data.frame(a=sample(1:20,1,replace=TRUE), b=sample(c('M','F'),1,replace=TRUE), c=sample(LETTERS[1:8],1,replace=TRUE)) tt = as.data.frame(table(df)) tt$bc = paste(tt$b,tt$c,sep='.') tt$b=NULL tt

Re: [R] Subject: Re ZINB by Newton Raphson??

2010-06-22 Thread Ted Harding
Regarding Newton-Raphson, I would add that there are certain kinds of function for which the method *cannot* work. N-R is essentially a root-finding technique, and when used for finding a minimum (or maximum) it is applied to finding the root of the deriviative. As an example of a class of functi

[R] constructing a data frame from ftable

2010-06-22 Thread Erin Hodgess
Dear R People: I have the following data set with the columns DATE, GENDER, and Co. Co has 8 possible options. > a.df[1:10,] DATE GENDER Co 1 2009-04-16 F Rash 2 2009-04-16 F Other 3 2009-04-16 M Botulinic 4 2009-04-16 M

Re: [R] Popularity of R, SAS, SPSS, Stata...

2010-06-22 Thread Joshua Wiley
On Sun, Jun 20, 2010 at 12:46 PM, Ivan Calandra wrote: > Bob, > > I have no idea whether it is realistic, but if you look for the papers that > used R or SAS (or anything), you might get better results by searching for > the way R and SAS are cited. I wonder what the effects of different format

Re: [R] Labels for matplot x axis

2010-06-22 Thread Nick Torenvliet
Jim, I just checked your help out and everything works fine except the axis labels, I should probably have been more specific. I had already been able to draw the rownames() as labels, what I was looking for was the capacity to define major ticks, and hence draw only every nth rowname on the grap

Re: [R] lapply and boxplots with variable names

2010-06-22 Thread Henrique Dallazuanna
Try this: library(lattice) bwplot(values ~ TimePeriod | ind, cbind(stack(my.data), TimePeriod = my.data$TimePeriod)) On Tue, Jun 22, 2010 at 1:45 PM, Shawn Morrison < shawn.morri...@dryasresearch.com> wrote: > Hi all, > > I have a dataset with several variables, each of which is a separate > col

Re: [R] glm

2010-06-22 Thread Joris Meys
On Tue, Jun 22, 2010 at 1:00 AM, Samuel Okoye wrote: > Hi, > > I have the following data > > data1 <- data.frame(count = c(0,1,1,2,4,5,13,16,14), weeks = 1:9, >     treat=c(rep("1mg",3),rep("5mg",3),rep("10mg",3))) > and I am using > > library(splines) > > to fit > > glm.m <- glm(c

Re: [R] xyplot: adding pooled regression lines to a paneled type="r" plot

2010-06-22 Thread Deepayan Sarkar
On Tue, Jun 22, 2010 at 9:30 AM, Michael Friendly wrote: > Consider the following plot that shows separate regression lines ~ age for > each subject in the Pothoff-Roy Orthodont data, > with separate panels by Sex: > > library(nlme) > #plot(Orthodont) > xyplot(distance ~ age|Sex, data=Orthodont, t

Re: [R] Subject: Re ZINB by Newton Raphson??

2010-06-22 Thread Achim Zeileis
John, thanks for the comments, very useful. Just three short additions specific to the ZINB case: 1. zeroinfl() doesn't uses BFGS (by default) and not Newton-Raphson because we have analytical gradients but not an analytical Hessian. 2. If the default starting values do not work, zeroin

Re: [R] Popularity of R, SAS, SPSS, Stata...

2010-06-22 Thread Keo Ormsby
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Ivan Calandra Sent: Sunday, June 20, 2010 3:47 PM To: r-help@r-project.org Subject: Re: [R] Popularity of R, SAS, SPSS, Stata... Bob, I have no idea whether it is realistic, but if

[R] aov - subjects nested within groups & crossed with questions

2010-06-22 Thread Doug Adams
Hello, I was going to use lmer() on this data, but it seemed easier -- and more importantly, more meaningful -- to just analyze smaller sections of it individually. I'd like to ask for help to see if I'm analyzing the separate parts correctly. Each part is the same, and they all look like this:

Re: [R] Time in ggplot2

2010-06-22 Thread Ottar Kvindesland
Excellent, thanks. This solved it. ottar On 22 June 2010 11:39, Hadley Wickham wrote: > Hi Ottar, > > It's a bug in the code that automatically figures out the axis ticks. > I have some code to fix it, but it's waiting for a release of another > package. In the meantime, you can work aroun

[R] Subject: Re ZINB by Newton Raphson??

2010-06-22 Thread Prof. John C Nash
I have not included the previous postings because they came out very strangely on my mail reader. However, the question concerned the choice of minimizer for the zeroinfl() function, which apparently allows any of the current 6 methods of optim() for this purpose. The original poster wanted to u

Re: [R] Displaying Iteration Count

2010-06-22 Thread Paul
Downey, Patrick wrote: Hello, I'm running a very long for loop that usually takes hours. For my own piece of mind, it would be nice if I could check periodically and see which iteration the loop is on. A line of code that told R to print the iteration number every 100 or 200 iterations would be

Re: [R] k-sample Kolmogorov-Smirnov test?

2010-06-22 Thread Greg Snow
If you want to test the null that all datasets come from the same distribution, then I would probably do this as a permutation test. Find the largest K-S distance between 2 groups, then randomly permute the data into a new set of k groups (with same sample sizes) and find the largest K-S distan

Re: [R] lapply and boxplots with variable names

2010-06-22 Thread Shawn Morrison
Thanks Josh, I do want to see each plot. I took your code and modified it (below) and it appears to do what I wanted: my.data <- data.frame(var1=rnorm(1000), var2=rnorm(1000), TimePeriod=factor(rep((LETTERS[1:4]), 250))) str(my.data) lapply(names(my.data[ , 1:2]), function(y) { quartz() bo

Re: [R] lapply and boxplots with variable names

2010-06-22 Thread Joshua Wiley
Hello Shawn, Does this do what you want? I'm assuming you want to look at each plot, so I added a call to par(). ### my.data <- data.frame(var1=rnorm(1000), var2=rnorm(1000), TimePeriod=factor(rep((LETTERS[1:4]), 250))) str(my.data) lapply(names(my.data[ , 1:2]), function(y) { old.par <-

Re: [R] lapply and boxplots with variable names

2010-06-22 Thread Shawn Morrison
Many thanks Phil, that does help. If I could ask a follow-up, how do I put each plot in its own device window? Right now, all I get is the boxplot for var2 (var1 gets overwritten?). I tried putting quartz() before the boxplot command but got an error message. Cheers, Shawn On 22/06/10 11:13

[R] Latex outputs of multilevel models

2010-06-22 Thread Jonas Michaelis
Hi, I have a number of multilevel models and I would like some Latex outputs of them. I usually use the "apsrtable" package, but it does not accept "lme" outputs. Neither does the "mtable" function in the "memisc" package. Is there any good alternative that I am missing? Thanks, Jonas

Re: [R] Duplicate dates in zoo objects

2010-06-22 Thread Gabor Grothendieck
See the aggregate= argument to read.zoo which will aggregate them as it reads them in like this: > library(zoo) > Lines <- "02/10/1995 4925.5 + 30/10/1995 4915.9 + 23/01/1996 4963.5 + 23/01/1996 5009.2 + 04/03/1996 5031.9 # here + 04/03/1996 5006.5 # here + 03/04/19

Re: [R] k-sample Kolmogorov-Smirnov test?

2010-06-22 Thread Sam Albers
Hello, I am curious if anyone has had any success with finding a R version of a k-sample Kolmogorov-Smirnov test. Most of the references that I have able to find on this are fairly old and I am wondering if this type of analysis has fallen out of favour. If so, how do people tend to compare distr

Re: [R] Replacing elements of a list over a certain threshold

2010-06-22 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of David Winsemius > Sent: Tuesday, June 22, 2010 11:24 AM > To: johan...@huesing.name > Cc: r-help@r-project.org > Subject: Re: [R] Replacing elements of a list over a certain thres

Re: [R] "save scores" from sem

2010-06-22 Thread Joris Meys
PCA and factor analysis is implemented in the core R distribution, no extra packages needed. When using princomp, they're in the object. pr.c <- princomp(USArrests,scale=T) pr.c$scores # gives you the scores see ?princomp When using factanal, you can ask for regression scores or Bartlett scors

Re: [R] k-sample Kolmogorov-Smirnov test?

2010-06-22 Thread Sam Albers
Hello, I am curious if anyone has had any success with finding a R version of a k-sample Kolmogorov-Smirnov test. Most of the references that I have able to find on this are fairly old and I am wondering if this type of analysis has fallen out of favour. If so, how do people tend to compare di

Re: [R] Installing packages from folder on the computer

2010-06-22 Thread Uwe Ligges
On 22.06.2010 19:30, Subramanian S wrote: i am able to install zip files of packages from local zip files using the file.choose() for the package argument in install.packages() function in R console and also from the Packages menu>install from local zip files. But if there are many packages to

Re: [R] Replacing elements of a list over a certain threshold

2010-06-22 Thread David Winsemius
On Jun 22, 2010, at 2:14 PM, Johannes Huesing wrote: Jim Hargreaves [Mon, Jun 21, 2010 at 12:34:01PM CEST]: Dear List, I have a list of length ~1000 filled with numerics. I need to replace the elements of this list that are above a certain numerical threshold with the value of the threshold

Re: [R] New errors with difftime()-objects in 2.11.1 (was Re: Request: difftime method for cut())

2010-06-22 Thread David Winsemius
So the original email message was in error and you meant to type "is.numeric" in the first line and not "as.numeric"? (You might also note that sending duplicate messages to r-help and r- devel is not considered proper etiquette. My reply did not go to r- devel.) On Jun 22, 2010, at 2:01 PM

Re: [R] Replacing elements of a list over a certain threshold

2010-06-22 Thread Johannes Huesing
Jim Hargreaves [Mon, Jun 21, 2010 at 12:34:01PM CEST]: > Dear List, > > I have a list of length ~1000 filled with numerics. I need to > replace the elements of this list that are above a certain numerical > threshold with the value of the threshold. > > e.g > example=list(1, 2, 3, 4, 5, 6, 7, 8,

Re: [R] New errors with difftime()-objects in 2.11.1 (was Re: Request: difftime method for cut())

2010-06-22 Thread Gustaf Rydevik
On Tue, Jun 22, 2010 at 7:50 PM, David Winsemius wrote: > > On Jun 22, 2010, at 1:33 PM, Gustaf Rydevik wrote: > Cannot help you there, but have you looked at the help page for difftime? > > "The as.double method returns the numeric value expressed in the specified > units. Using units = "auto" m

Re: [R] Applying forecast functions to columns in a data frame

2010-06-22 Thread phani kishan
Hey, Thanks a lot everyone. Taking care of the NA's and setting right the type-casting I could apply lapply. I have read the documentation for R and it is mentioned that statistical and mathematical methods could be applied across data frames but when lapply didn't work (due to the above said error

Re: [R] New errors with difftime()-objects in 2.11.1 (was Re: Request: difftime method for cut())

2010-06-22 Thread David Winsemius
On Jun 22, 2010, at 1:33 PM, Gustaf Rydevik wrote: On Thu, Jun 10, 2010 at 3:39 PM, Gustaf Rydevik wrote: Hi all, The recent change in 2.11 that made as.numeric() return false on difftime-objects broke some of my code that calculated age classes of individuals using cut(). While this was no

Re: [R] installing packages from a directory on the computer

2010-06-22 Thread Peter Ehlers
Okay, Subramanian S, try this: pkgs <- c("pkg1", "pkg2", "pkg3") install.packages(pkgs, repos = NULL, contriburl = "file:///c:/r/repos/2.12", dependencies = TRUE) where I've got zipfiles in c:/r/repos/2.12. Comments: 1. Note the 3 slashes after "file:". 2. You

[R] New errors with difftime()-objects in 2.11.1 (was Re: Request: difftime method for cut())

2010-06-22 Thread Gustaf Rydevik
On Thu, Jun 10, 2010 at 3:39 PM, Gustaf Rydevik wrote: > Hi all, > > The recent change in 2.11 that made as.numeric() return false on > difftime-objects broke some of my code that calculated age classes of > individuals using cut(). While this was no big thing to fix for me, it > might be wise > t

Re: [R] Duplicate dates in zoo objects

2010-06-22 Thread Joris Meys
Oops, I was too fast. I meant : i <- length(x)- match(unique(index(x)),rev(index(x)))+1 (one has to reverse the indices again) But in any case, the aggregate-way is indeed far cleaner. Thx for pointing that out. Cheers Joris On Tue, Jun 22, 2010 at 7:24 PM, Achim Zeileis wrote: > On Tue, 22 Ju

[R] Installing packages from folder on the computer

2010-06-22 Thread Subramanian S
i am able to install zip files of packages from local zip files using the file.choose() for the package argument in install.packages() function in R console and also from the Packages menu>install from local zip files. But if there are many packages to install (say >15 or 20), then i have to factor

Re: [R] Duplicate dates in zoo objects

2010-06-22 Thread Achim Zeileis
On Tue, 22 Jun 2010, Joris Meys wrote: Try this : x.Date <- as.Date("2003-02-01") + c(1, 3, 7, 7, 14) - 1 x <- zoo(1:5, x.Date) x 2003-02-01 2003-02-03 2003-02-07 2003-02-07 2003-02-14 1 2 3 4 5 i <- match(unique(index(x)),rev(index(x))) x

Re: [R] list() assigning the same value to two items

2010-06-22 Thread Greg Snow
One approach is to use the within function: > within(list(), {a<-1; b<-a}) $b [1] 1 $a [1] 1 Now, whether that is simpler or more compact than other options is for you (or other users) to decide. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcar

Re: [R] lapply and boxplots with variable names

2010-06-22 Thread Phil Spector
Shawn - Does this example help? (Please don't use cbind when creating a data frame, since it first creates a matrix, which means everything must be of the same mode.) var1 = rnorm(1000) var2 = rnorm(1000) TimePeriod = rep((LETTERS[1:4]), 250) my.data = data.frame(var1,var2,TimePeriod) lapply

Re: [R] Problem with writing a CSV file in UTF-8 formate

2010-06-22 Thread Matt Shotwell
Duncan and I had nearly identical code examples in our replies. This is becoming a theme. Great minds think alike??? :-) UTF-8 is backward compatible with ASCII. Hence, if your "|" separated table contains only ASCII, the UTF-8 encoded file may be indistinguishable from an ASCII encoded file. Mayb

Re: [R] Bayesian Code for contingency tables

2010-06-22 Thread David Winsemius
On Jun 22, 2010, at 12:43 PM, Jim Silverton wrote: Hello, Is there anywhere I can find some Bayesian Code for 2 by 2 tables or even the non-central hypergeometric distribution in R? Packages would be helpful but the actual coding in R is much better. page 49 of ... https://home.comcast.

[R] X11 on Mac OS X 10.6 Version of R64

2010-06-22 Thread John Ramey
Hello, everyone. Recently, I started using the 64-bit version of R from the command line in Mac OS X 10.6.4. Usually, I launch R with the command "R64 --save." I am using R version 2.11.0. When I install a new package, an X11 window loads, but it takes a short while to do this. However, the X11

[R] lapply and boxplots with variable names

2010-06-22 Thread Shawn Morrison
Hi all, I have a dataset with several variables, each of which is a separate column. For each variable, I want to produce a boxplot and include the name of the variable (ie, column name) on each plot. I have included a sample dataset below. Can someone tell me where I am going wrong? Thank

Re: [R] xyplot: adding pooled regression lines to a paneled type="r" plot

2010-06-22 Thread RICHARD M. HEIBERGER
Michael, Look at the ancova function in the HH package. ## install.packages("HH") ## if not there yet. library(HH) library(nlme) ## for the Orthodont data ancova(distance ~ age*Sex, data=Orthodont) ancova(distance ~ age+Sex, data=Orthodont) ancova(distance ~ age, groups=Sex, data=Orthodont) anc

Re: [R] Bayesian Code for contingency tables

2010-06-22 Thread Jim Silverton
Hello, Is there anywhere I can find some Bayesian Code for 2 by 2 tables or even the non-central hypergeometric distribution in R? Packages would be helpful but the actual coding in R is much better. Thanks, Thanks Jim [[alternative HTML version deleted]]

Re: [R] Duplicate dates in zoo objects

2010-06-22 Thread Joris Meys
Try this : > x.Date <- as.Date("2003-02-01") + c(1, 3, 7, 7, 14) - 1 > x <- zoo(1:5, x.Date) > x 2003-02-01 2003-02-03 2003-02-07 2003-02-07 2003-02-14 1 2 3 4 5 > i <- match(unique(index(x)),rev(index(x))) > x[i] 2003-02-01 2003-02-03 2003-02-07 200

Re: [R] Popularity of R, SAS, SPSS, Stata...

2010-06-22 Thread Kjetil Halvorsen
On Tue, Jun 22, 2010 at 8:57 AM, Muenchen, Robert A (Bob) wrote: > Interesting! I had no idea there were R-help lists in other languages. I > don't see it on http://www.r-project.org/mail.html, but then that's in > English! Is there a list of such sites? It is listed here: https://stat.ethz.ch/

[R] xyplot: adding pooled regression lines to a paneled type="r" plot

2010-06-22 Thread Michael Friendly
Consider the following plot that shows separate regression lines ~ age for each subject in the Pothoff-Roy Orthodont data, with separate panels by Sex: library(nlme) #plot(Orthodont) xyplot(distance ~ age|Sex, data=Orthodont, type='r', groups=Subject, col=gray(.50), main="Individual linear

[R] EVENT PACKAGE

2010-06-22 Thread Pedro Mota Veiga
Hi people of R forum, I´m trying to install de "Event" Package, but I can´t find it. Where I can get it? Thanks in advance. Best Regards Pedro Mota Veiga -- View this message in context: http://r.789695.n4.nabble.com/EVENT-PACKAGE-tp2264357p2264357.html Sent from the R help mailing list archive

Re: [R] replication time series using permutations of the each "y" values

2010-06-22 Thread Joris Meys
Read the posting guide please. What's your data structure? That's quite important. As I see it, I can easily get a matrix with what you want by : x1 <- rep("a","b",each=3) x2 <- rep("c","d","f",times=2) x3 <- rep("g",6) x4 <- rep("h",6) result <- rbind(x1,x2,x3,x4) But that's not what you want pro

Re: [R] contour plots

2010-06-22 Thread Duncan Murdoch
On 22/06/2010 9:29 AM, dbeest wrote: Hi All, I'm having difficulty making a contour plot a would like some help. A standard contourplot can be made by having an x,y, and some matrix (shape x*y) with contents: x = 1:10 y = 1:10 cont <- matrix(runif(100,min=1,max=2),nrow=10,ncol=10) filled.conto

Re: [R] How do you install R package?

2010-06-22 Thread Joris Meys
open the R console. type: ?install.packages. press enter. read. say "Doh, that's easy." do what you read. cheers Joris On Tue, Jun 22, 2010 at 5:38 PM, Amy Li wrote: > Hi I'm a new user. I need to install some new packages. Can someone show me? > > Amy > >        [[alternative HTML version de

[R] Stylesheet line in xml output

2010-06-22 Thread Nick Straw
I'm probably being dense but I can't work out how to add the second line: ... ... I can get the first line using: saveXML(xml$value(), prefix='', encoding="ISO-8859-1") Any ideas? Thanks. __ R-help@r-project.org mailing list https://stat.ethz.

Re: [R] Duplicate dates in zoo objects

2010-06-22 Thread Achim Zeileis
On Tue, 22 Jun 2010, Research wrote: Hello, I have a zoo time series read from an excel file which has some dates the same, such as the following example: 02/10/1995 4925.5 30/10/1995 4915.9 23/01/1996 4963.5 23/01/1996 5009.2 04/03/1996 5031.9 # here 04/03/1996 5

[R] Adding style sheet line to xml output

2010-06-22 Thread Nick
I'm probably being dense but I can't work out how to add the second line: ... ... I can get the first line using: saveXML(xml$value(), prefix='', encoding="ISO-8859-1") Any ideas? Thanks. __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] Generalised Estimating Equations on approx normal outcome with limited range

2010-06-22 Thread J D
Dear R users I am analysing data from a group of twins and their siblings. The measures that we are interested in are all correlated within families, with the correlations being stronger between twins than between non-twin siblings. The measures are all calculated from survey answers and by defini

Re: [R] Displaying Iteration Count

2010-06-22 Thread Filoche
for (i in 1:1) { if( (i - 100) %%100 == 0) print(i); } -- View this message in context: http://r.789695.n4.nabble.com/Displaying-Iteration-Count-tp2264088p2264124.html Sent from the R help mailing list archive at Nabble.com. __

[R] "save scores" from sem

2010-06-22 Thread Steve Powell
Dear expeRts, sorry for such a newbie question - in PCA/factor analysis e.g. in SPSS it is possible to save scores from the factors. Is it analogously possible to "save" the implied scores from the latent variables in a measurement model or structural model e.g. using the sem or lavaan package

[R] creating a loop for dive files

2010-06-22 Thread Jana Jeglinski
Dear all, I have a very large amount of dive files that need to be double checked after the Zoccing process. i would like to load these file sequentially but automatically into R, plot depth against duration with a simple scatterplot with labels (DiveNumber) for each individual point and proceed to

[R] contour plots

2010-06-22 Thread dbeest
Hi All, I'm having difficulty making a contour plot a would like some help. A standard contourplot can be made by having an x,y, and some matrix (shape x*y) with contents: x = 1:10 y = 1:10 cont <- matrix(runif(100,min=1,max=2),nrow=10,ncol=10) filled.contour(x,y,cont) Looks very nice. Somet

Re: [R] How do you install R package?

2010-06-22 Thread David Winsemius
On Jun 22, 2010, at 11:38 AM, Amy Li wrote: Hi I'm a new user. Please read the Posting Guide. I need to install some new packages. Can someone show me? ?install.packages Or use a GUI package installer, which would then of course depend on what OS you are using Amy [[alternat

Re: [R] Time in ggplot2

2010-06-22 Thread Hadley Wickham
Hi Ottar, It's a bug in the code that automatically figures out the axis ticks. I have some code to fix it, but it's waiting for a release of another package. In the meantime, you can work around it by specifying where you want the breaks: ggplot(data, aes(time, PU) ) + geom_line() + scale_x

Re: [R] Applying forecast functions to columns in a data frame

2010-06-22 Thread Bert Gunter
Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of phani kishan Sent: Tuesday, June 22, 2010 8:10 AM To: David Winsemius Cc: r-help@r-project.org Subject: Re: [R] Applying forecast fun

[R] How do you install R package?

2010-06-22 Thread Amy Li
Hi I'm a new user. I need to install some new packages. Can someone show me? Amy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.

Re: [R] Applying forecast functions to columns in a data frame

2010-06-22 Thread David Winsemius
On Jun 22, 2010, at 11:10 AM, phani kishan wrote: Hey! On Tue, Jun 22, 2010 at 8:11 PM, David Winsemius > wrote: On Jun 22, 2010, at 10:32 AM, Henrique Dallazuanna wrote: Try this: lapply(DF, auto.arima) I am getting the following error: "Error in if (PVAL == min(tablep)) warning("p-value

Re: [R] Applying forecast functions to columns in a data frame

2010-06-22 Thread phani kishan
Hey! On Tue, Jun 22, 2010 at 8:11 PM, David Winsemius wrote: > > On Jun 22, 2010, at 10:32 AM, Henrique Dallazuanna wrote: > > Try this: >> >> lapply(DF, auto.arima) >> > I am getting the following error: "Error in if (PVAL == min(tablep)) warning("p-value smaller than printed p-value") else wa

Re: [R] Generate a list of all subsequence of length k from an array

2010-06-22 Thread Henrique Dallazuanna
You could try this: embed(a, k) On Tue, Jun 22, 2010 at 3:35 AM, Ron Shefi wrote: > > Hi, > I would like to generate a list of all subsequence of length k from an > array with length n (k < n). The result should be organized in a matrix. > So the matrix should look like the following whereas e

Re: [R] Converting 3 columns of a data frame into a matrix

2010-06-22 Thread David Winsemius
On Jun 22, 2010, at 4:57 AM, Jeff08 wrote: Okay, it crosstab seems to work when I clear out a bunch of my variables, went from 800 mb Vcol to 100 mb Can anyone explain how memory works in R, because my lack of understanding with memory was clearly the problem. Making the assumption th

Re: [R] Generate a list of all subsequence of length k from an array

2010-06-22 Thread David Winsemius
On Jun 22, 2010, at 2:35 AM, Ron Shefi wrote: Hi, I would like to generate a list of all subsequence of length k from an array with length n (k < n). The result should be organized in a matrix. So the matrix should look like the following whereas each row is one of a subsequence of len

Re: [R] Problem with writing a CSV file in UTF-8 formate

2010-06-22 Thread Duncan Murdoch
On 22/06/2010 10:39 AM, venkata kirankumar wrote: Hi Murdoch, first of all thanks allot for your suggestion. I tried the way you suggested but while opening in notepad and checking its showing that the file is in ANSI can any thing else I can do for this What makes you think notepad is able

Re: [R] Applying forecast functions to columns in a data frame

2010-06-22 Thread David Winsemius
On Jun 22, 2010, at 10:32 AM, Henrique Dallazuanna wrote: Try this: lapply(DF, auto.arima) I cannot comment on the relative merits of auto.arima or the forecast function, but I did notice that earlier today that Gabor Grothendieck (who, I suspect, could comment knowledgeably) mentioned t

Re: [R] Problem with writing a CSV file in UTF-8 formate

2010-06-22 Thread venkata kirankumar
Hi Murdoch, first of all thanks allot for your suggestion. I tried the way you suggested but while opening in notepad and checking its showing that the file is in ANSI can any thing else I can do for this Thanks in advance kiran On Tue, Jun 22, 2010 at 7:02 PM, Duncan Murdoch wrote: > On 22/06/2

[R] Duplicate dates in zoo objects

2010-06-22 Thread Research
Hello, I have a zoo time series read from an excel file which has some dates the same, such as the following example: 02/10/1995 4925.5 30/10/1995 4915.9 23/01/1996 4963.5 23/01/1996 5009.2 04/03/1996 5031.9 # here 04/03/1996 5006.5 # here 03/04/1996 5069.2

Re: [R] Applying forecast functions to columns in a data frame

2010-06-22 Thread Henrique Dallazuanna
Try this: lapply(DF, auto.arima) On Tue, Jun 22, 2010 at 11:26 AM, phani kishan wrote: > Hey, > I have a list of 30 odd time-series (products) in columns of a data-frame. > I want to apply time-series forecasting functions across all the columns of > the data-frame in order to determine which is

[R] Applying forecast functions to columns in a data frame

2010-06-22 Thread phani kishan
Hey, I have a list of 30 odd time-series (products) in columns of a data-frame. I want to apply time-series forecasting functions across all the columns of the data-frame in order to determine which is the best model to use. How do I go about this? Phani [[alternative HTML version deleted

Re: [R] Warped Text in mtext in a Quartz-Window

2010-06-22 Thread David Winsemius
On Jun 21, 2010, at 10:28 PM, Bernhard Pollner wrote: Hello, With one procedure, I get a strangely warped text in the mtext-area of a quartz-window, while with an other the text comes out OK - see attached PDF. (Number of Trials is the x-Axis label, which always comes out OK) The two pr

Re: [R] Project

2010-06-22 Thread Joris Meys
Presuming you're talking about Perl, I might be able to help with specific issues, but read the posting guide before you actually call upon our help. http://www.R-project.org/posting-guide.html One book I definitely can recommend is Phil Spectors Data Manipulation with R http://www.springer.com/

Re: [R] Popularity of R, SAS, SPSS, Stata...

2010-06-22 Thread JLucke
Yes. When my young son told someone that I was a "doctor", he had to further explain I was a "number doctor", not a "people doctor". Barry Rowlingson Sent by: r-help-boun...@r-project.org 06/22/2010 09:45 AM To Marc Schwartz cc r-help@r-project.org, Patrick Burns Subject Re: [R] Popular

Re: [R] Popularity of R, SAS, SPSS, Stata...

2010-06-22 Thread david.jessop
To me R is just another programming language. In fact it seems to share quite a lot of the characteristics of "fashionable" languages such as python - for example dynamic typing amonst others. The fact it happens to be good for statistics and other mathematical stuff is a bonus. David --

Re: [R] random sequence

2010-06-22 Thread David Winsemius
On Jun 22, 2010, at 7:15 AM, sta...@quo.org wrote: Hi Barbara, You could use: samples = matrix(rep(0,(5000*40)),ncol=40) for(i in 1:5000) { samples[i,] = sample(1:40,40) } Might also be a good time to use replicate(): samples = matrix(replicate(5000, sample(1:40) ), ncol=40, byrow=TRUE)

  1   2   >