Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-08 Thread Girish A.R.
Thanks for the reply, Dieter. I'm sorry I should have made it clear in my original post - the number (output of which.max()) IS dependent on the grouping.. Thanks, -Girish -- View this message in context: http://r.789695.n4.nabble.com/lattice-xyplot-Help-needed-in-help-in-customizing-the-panel

Re: [R] hi have a question about merging.

2010-12-08 Thread Dieter Menne
helloR wrote: > > > this is the problem: > load this R data frame over the internet and save it to your hard drive. > http://rss.acs.unt.edu/Rdoc/library/twang/data/racepro ling.RData > ... > > please show how to save a dataset of males only (the variable male=1) to a > new dataframe. Then do

Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-08 Thread Dieter Menne
Girish A.R. wrote: > > Sorry, just realized that there was a typo in the following code of my > original post. The correct code is as shown below (corrected > 'data=swtop16' to 'data=DF'): > > sales <- xyplot(pct_inv_left ~ week_num|sku_num, data=DF,type = > "l",lwd=2,panel = function(...) { >

Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-08 Thread Dieter Menne
-- View this message in context: http://r.789695.n4.nabble.com/lattice-xyplot-Help-needed-in-help-in-customizing-the-panel-abline-function-tp3079656p3079697.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

Re: [R] Getting a periodogram for discrete data

2010-12-08 Thread Dieter Menne
nitish wrote: > > I have a dataset that goes like: dataset = > t |x > 0 |x1 > 1 |x2 > 2 |0 > 3 |0 > 4 |0 > 5 |0 > 6 |x3 > 7 |0 > 8 |0 > 9 |0 > 10 |x4 > > and so on. I wish to detect the periodicity of occurrences. t is in > seconds and x are arbitrary, whose magnitude i a

[R] Tiff compression bug

2010-12-08 Thread Ganqiang Liu
Is there a bug in tiff compression output in Mac version? My program is correct when I run on windows version; However, in Mac, the compression fail~ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/

[R] Determining period of a discrete dataset

2010-12-08 Thread Nitish Shukla
I have a dataset that goes like: dataset = t___|x___ 0|x1 1|x2 2|0 3|0 4|0 5|0 6|x3 7|0 8|0 9|0 10 |x4 and so on. I wish to detect the periodicity of occurrences. t is in seconds and x are arbitrary, whose magnitude i am not interested in. I just wish to ge

Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-08 Thread Girish A.R.
Sorry, just realized that there was a typo in the following code of my original post. The correct code is as shown below (corrected 'data=swtop16' to 'data=DF'): sales <- xyplot(pct_inv_left ~ week_num|sku_num, data=DF,type = "l",lwd=2,panel = function(...) { panel.abline(h = 75, lty

[R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-08 Thread Girish A.R.
Hi folks, I need some help in customizing the abline() function to be used in a lattice plot. I have attached a reproducible example below. I need help in the following snippet: disc <- xyplot(cnt_gt50pct_disc ~ week_num|sku_num, data=DF,type = "h",lwd=2,panel = function(...) { panel

Re: [R] hi have a question about merging.

2010-12-08 Thread Santosh Srinivas
Try this male.df <- subset(raceprofiling, (male==1)) female.df <- subset(raceprofiling, (male==0)) people.df <- rbind(male.df,female.df) works? -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of tanzia chaudhury Sent: 09 December 2010

Re: [R] hi have a question about merging.

2010-12-08 Thread Joshua Wiley
Hi, Just as a note, it is preferred that you use plain text rather than rich text or html emails for this list. On Wed, Dec 8, 2010 at 7:32 PM, tanzia chaudhury wrote: > > this is the problem: > load this R data frame over the internet and save it to your hard drive. > http://rss.acs.unt.edu/Rdo

[R] Error in vector("integer", length) : vector size cannot be NA

2010-12-08 Thread mathijsdevaan
Hello, I have uploaded a csv file that looks like this: > gc alpha_id beta_id 1 142053 1 2 9454 1 3 295618 2 442691 2 5 389224 3 6 9455 3 The alpha_id contains 310660 unique values and the beta_id contain

[R] One question about R

2010-12-08 Thread ZihangYin
When I make check the R 2.12 * DONE (mgcv) make[2]: Leaving directory `/usr/local/R-2.12.0/src/library/Recommended' make[1]: Leaving directory `/usr/local/R-2.12.0/src/library/Recommended' r...@ip-192-168-1-66:/usr/local/R-2.12.0# make check-all make[1]: Entering directory `/usr/local/R-2.12.0/tes

[R] hi have a question about merging.

2010-12-08 Thread tanzia chaudhury
this is the problem: load this R data frame over the internet and save it to your hard drive. http://rss.acs.unt.edu/Rdoc/library/twang/data/racepro ling.RData please show how to save a dataset of males only (the variable male=1) to a new dataframe. Then do the same thing for females (male=0). T

Re: [R] Converting data.frame from long to wide format

2010-12-08 Thread Matthew Pettis
Thank you Phil, your method worked great! Again, I was about to write back and add some facts -- all of the columns need to be 'character'... when I tried my and Jonathan's solutions with columns that were factors, I got errors. Here's what happened when I tried to use the 'dcast' method on my ac

Re: [R] Constraints when sampling from a distribution

2010-12-08 Thread Peter Ehlers
On 2010-12-08 17:07, Anup Nandialath wrote: Dear R-helpers, My question is related to how to impose constraints when when sampling from a distribution. For example, suppose I'm sampling a vector from a multivariate normal distribution vbeta<- 100*diag(2) mbeta<- c(1,1) ans<- beta<- c(rmvno

Re: [R] Converting data.frame from long to wide format

2010-12-08 Thread Phil Spector
Another way, using just base R is reshape(df,idvar='y',timevar='x',v.names='z',direction='wide') y z.A z.B z.C 1 D a b c 4 E d e f 7 F g h i - Phil Spector Statistical Computing Facility

Re: [R] Converting data.frame from long to wide format

2010-12-08 Thread Matthew Pettis
Hi Jonathan, Thank you very much! I was about to recall this after I found this discussion (https://stat.ethz.ch/pipermail/r-help/2008-June/164440.html), but I think your solution is more tidy. Thank you very much! Matt On Wed, Dec 8, 2010 at 8:33 PM, Jonathan Christensen wrote: > Matt, > > li

Re: [R] Converting data.frame from long to wide format

2010-12-08 Thread Jonathan Christensen
Matt, library(reshape2) wide.df <- dcast(df, y ~ x) Works great for me. Jonathan On Wed, Dec 8, 2010 at 7:26 PM, Matthew Pettis wrote: > Hi, > > I was wondering if there is an easy way that I am missing for turning a long > dataframe into a wide one.  Below is sample code that will make what

[R] Converting data.frame from long to wide format

2010-12-08 Thread Matthew Pettis
Hi, I was wondering if there is an easy way that I am missing for turning a long dataframe into a wide one. Below is sample code that will make what I have and, in comments, the form of what I want: # Have: dataframe like 'df' df <- expand.grid( x=LETTERS[1:3], y=LETTERS[4:6]) df$z <- lett

Re: [R] One question about R

2010-12-08 Thread Santosh Srinivas
Why 2.8? You should perhaps go for 2.12 ... I like 2.11 right now because most of my work has been tested on it already and it is quite stable with other packages. But, the ideally you should go for 2.12 which is the most recent release and has substantial enhancements. Then you should post the e

[R] One question about R

2010-12-08 Thread ZihangYin
I am a beginner with R. After I installed R 2.8.0, I tried to add a package. R CMD INSTALL RHIPE.tar.gz I got following error message: cannot extract package from RHIPE.tar.gz Can anyone tell me what's the problem? -- Best Regards, Zihang Yin 919-225-1717 Computer Science Duke University _

Re: [R] evaluating NAs in a dataframe

2010-12-08 Thread Wade Wall
Thanks Peter and David, Peter, that is exactly what I was looking for. Sadly I have even used is.na() in the past but forgot about it. David, thanks for the tip. I am embarrassed that I exposed the fact that I use a lot of loops. findInterval() seems very handy. Wade On Wed, Dec 8, 2010 at 4:

[R] Constraints when sampling from a distribution

2010-12-08 Thread Anup Nandialath
 Dear R-helpers, My question is related to how to impose constraints when when sampling from a distribution. For example, suppose I'm sampling a vector from a multivariate normal distribution vbeta <- 100*diag(2) mbeta <- c(1,1) ans <- beta <- c(rmvnorm(1,mbeta,vbeta)) ans will thus be a vect

Re: [R] the output of function lars

2010-12-08 Thread Peter Ehlers
I think the authors of lars could do a better job of the 'Value' section of the help page. Nevertheless, most of the list elements are pretty obvious if you understand the LARS procedure. Your questions indicate that you would benefit from studying the references listed on the help page before att

[R] convert non-ultrametric phylo to dendrogram

2010-12-08 Thread Matt Bakker
I am beginning to work with the 'ape' package in R, and have run into some trouble. I generated a UPGMA tree based on DNA sequence distance in Paup* and read it into R, where it became an object of class "phylo". However, I need it to be classified as a "dendrogram" for my purposes (to use it to or

Re: [R] how to add these

2010-12-08 Thread casperyc
thanks! problem solved! casper -- View this message in context: http://r.789695.n4.nabble.com/how-to-add-these-tp3078908p3079340.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/

Re: [R] Parallel Scan of Large File

2010-12-08 Thread Ryan Garner
Hi Jim, Thanks for your insight. I used Linux split to split my large file into smaller partitions. On the server I work on, multipath I/O access is enabled and we use RAID for storage; thus, I don't think I can put each partition on a spindle. I'm able to open multiple files at a time into stdin

Re: [R] sd() for numeric row entries

2010-12-08 Thread Jim Moon
This is very helpful, Phil. Being new to R and trying to get a handle on *apply, by, aggregate... this is great. Thank you. Jim -Original Message- From: Phil Spector [mailto:spec...@stat.berkeley.edu] Sent: Wednesday, December 08, 2010 2:36 PM To: Jim Moon Cc: r-help@r-project.org

[R] Trouble Loading doBy and coin Packages

2010-12-08 Thread Adam Carr
Good Evening R-Help Community: I have attached a file that contains the output from sessionInfo() and a summary of my Win XP system. I am running R 2.12.0 and using Tinn-R 2.3.6.2 as my interface. When I attempt to call either the doBy or coin packages R generates an error that I do not unders

Re: [R] How can i select a set of element in a list ?

2010-12-08 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Julian TszKin Chan > Sent: Wednesday, December 08, 2010 2:39 PM > To: r-help@r-project.org > Subject: [R] How can i select a set of element in a list ? > > How can i select a set

[R] How can i select a set of element in a list ?

2010-12-08 Thread Julian TszKin Chan
How can i select a set of element in a list ? x<-list(1,2,3,4,5) How can I create a new list which only have the last 4 elements of x. I can do it with a loop, but I want to avoid that. Thanks! example : y<-vector("list",4) for ( i in 1:length(y) ) y[[i]] <- x[[ i + length(x) - length(y) ]]

Re: [R] sd() for numeric row entries

2010-12-08 Thread Phil Spector
Jim - Suppose the data frame is named "df". Then df$std_dev = apply(df,1,sd,na.rm=TRUE) will do what you want, although it will generate some warning messages due to the first column. df$sd_dev = apply(df[,sapply(df,is.numeric)],1,sd) does the same, but won't produce warnings.

[R] sd() for numeric row entries

2010-12-08 Thread Jim Moon
How might one calculate standard deviation, row-wise, for the numeric values in a data frame such as this one V1 V2 V3 V4 V5 1 rs11089130 0.4565 0.4574 0.4569 0.4572 2 rs738829 0.6548 0.6519 0.6448 0.6549 3 rs915674 0.7503 0.7500 0.7517 0.7502 and place the standard d

Re: [R] how to add these

2010-12-08 Thread Peter Ehlers
On 2010-12-08 12:24, casperyc wrote: Thomas Stewart wrote: It isn't clear to me what you want to do. Do you want the axes to show? Do you want labels for the lines? Do you want a legend? What is your desired output? -tgs On Wed, Dec 8, 2010 at 2:42 PM, casperyc wrote: Hi All, How do

Re: [R] selecting for values above or within a range in the data matrix

2010-12-08 Thread Peter Ehlers
On 2010-12-08 12:03, akch...@bidmc.harvard.edu wrote: Hi All, I am new to the R program (only my 2nd day trying it out!) and this may seem like a really stupid question but I was wondering if someone could help. I have managed to calculate the pearson correlation coefficient for my data and now I

Re: [R] evaluating NAs in a dataframe

2010-12-08 Thread David Winsemius
On Dec 8, 2010, at 3:10 PM, Wade Wall wrote: Hi all, How can one evaluate NAs in a numeric dataframe column? For example, I have a dataframe (demo) with a column of numbers and several NAs. If I write demo.df >= 10, numerals will return TRUE or FALSE, but if the value is "NA", "NA" is re

Re: [R] LaTeX, MiKTeX, LyX: A Guide for the Perplexed

2010-12-08 Thread Mike Prager
On Tue, 7 Dec 2010 21:24:27 -0700, Greg Snow wrote: >> Sharing LaTeX documents with people using word processors only is no more difficult than giving driving directions to someone who is blindfolded . . . . If you just need basic input or approval then give them a paper version or pdf file and

[R] Question on ARIMA Prediction

2010-12-08 Thread Jiakang Lu
Dear all, I'm new to R and time series analysis. I'd appreciate if you could shed light on my problem. Here is what I have been trying to do: 1. I fit the model ARIMA(1,0,0) with the training dataset xdata[1:100] fitit = arima(xdata, order=c(1,0,0) 2. I have some current observations in the buff

Re: [R] evaluating NAs in a dataframe

2010-12-08 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Wade Wall > Sent: Wednesday, December 08, 2010 12:11 PM > To: r-h...@stat.math.ethz.ch > Subject: [R] evaluating NAs in a dataframe > > Hi all, > > How can one evaluate NAs in a

Re: [R] evaluating NAs in a dataframe

2010-12-08 Thread Philipp Pagel
Hi! > How can one evaluate NAs in a numeric dataframe column? For example, I have > a dataframe (demo) with a column of numbers and several NAs. If I write > demo.df >= 10, numerals will return TRUE or FALSE, but if the value is > "NA", "NA" is returned. But if I write demo.df == "NA", i

Re: [R] GIS Help: distance calculation based on ZIP Code

2010-12-08 Thread Mike Marchywka
> Date: Wed, 8 Dec 2010 19:25:09 + > Subject: Re: [R] GIS Help: distance calculation based on ZIP Code > From: b.rowling...@lancaster.ac.uk > To: lihaw...@gmail.com > CC: marchy...@hotmail.com; r-help@r-project.org > > On Wed, Dec 8, 2010 at 6:18

Re: [R] evaluating NAs in a dataframe

2010-12-08 Thread Peter Ehlers
On 2010-12-08 12:10, Wade Wall wrote: Hi all, How can one evaluate NAs in a numeric dataframe column? For example, I have a dataframe (demo) with a column of numbers and several NAs. If I write demo.df>= 10, numerals will return TRUE or FALSE, but if the value is "NA", "NA" is returned. But if

Re: [R] how to add these

2010-12-08 Thread casperyc
Thomas Stewart wrote: > > It isn't clear to me what you want to do. Do you want the axes to show? > Do > you want labels for the lines? Do you want a legend? What is your > desired > output? > > -tgs > > On Wed, Dec 8, 2010 at 2:42 PM, casperyc wrote: > >> >> Hi All, >> >> How do I add t

[R] selecting for values above or within a range in the data matrix

2010-12-08 Thread akchong
Hi All, I am new to the R program (only my 2nd day trying it out!) and this may seem like a really stupid question but I was wondering if someone could help. I have managed to calculate the pearson correlation coefficient for my data and now I have a correlation coefficient matrix with a whole s

[R] evaluating NAs in a dataframe

2010-12-08 Thread Wade Wall
Hi all, How can one evaluate NAs in a numeric dataframe column? For example, I have a dataframe (demo) with a column of numbers and several NAs. If I write demo.df >= 10, numerals will return TRUE or FALSE, but if the value is "NA", "NA" is returned. But if I write demo.df == "NA", it returns as

Re: [R] how to add these "axis" label?

2010-12-08 Thread Thomas Stewart
It isn't clear to me what you want to do. Do you want the axes to show? Do you want labels for the lines? Do you want a legend? What is your desired output? -tgs On Wed, Dec 8, 2010 at 2:42 PM, casperyc wrote: > > Hi All, > > How do I add these axis labels? > > #

Re: [R] read.table and factors

2010-12-08 Thread David Winsemius
On Dec 8, 2010, at 2:40 PM, Erin Hodgess wrote: Dear R People: Suppose I have the following in a file: 1 1.171504 1.010070 2 -0.9317064 1.860900 3 -0.06522837 0.6561147 4 -1.817026 0.02619137 5 1.426983 0.5995691 6 -0.2844911 1.155561 7 -0.6920972 0.7633124 8 0.3129615 5.121108 I want to use

Re: [R] read.table and factors

2010-12-08 Thread Greg Snow
Yes, just set the colClasses argument to read.table (this will also tend to speed up the reading, though only noticeable for really big files). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From:

Re: [R] Formatting 'names.arg' in barplot

2010-12-08 Thread Thomas Stewart
Try this modification of your code. -tgs ynames <- base.dat.sel2$base.dat.Covariate[order(base.dat.sel2$base.dat.US.Num.Obs.to.Achieve.Starting.Residual,decreasing=F)] ynames <- as.character(ynames) ynames[12]<-expression(theta[r]) ynames[13]<-expression(EC[gw]) ttt<-barplot(base.dat.sel2$base.d

[R] how to add these "axis" label?

2010-12-08 Thread casperyc
Hi All, How do I add these axis labels? ### p=seq(0,1,length.out=500) p=p[-c(1,length(p))] g1=log(p/(1-p)) g2=qnorm(p) g3=log(-log(1-p)) g4=-log(-log(p)) plot(p,g1, 'n',ylim=c(-5,5),las=1, bty='n', xaxt='n',yaxt='n', xla

[R] read.table and factors

2010-12-08 Thread Erin Hodgess
Dear R People: Suppose I have the following in a file: 1 1.171504 1.010070 2 -0.9317064 1.860900 3 -0.06522837 0.6561147 4 -1.817026 0.02619137 5 1.426983 0.5995691 6 -0.2844911 1.155561 7 -0.6920972 0.7633124 8 0.3129615 5.121108 I want to use read.table to bring it in and I want the first colu

Re: [R] Newbie trying to understand $ so I can understand acf function in stats

2010-12-08 Thread Peter Ehlers
On 2010-12-08 09:16, Dick Knox wrote: I am trying to understand the function acf stats:::acf shows me the function I am having trouble understanding the usage "$acf" in the following acf<- array(.C(R_acf, as.double(x), as.integer(sampleT), as.integer(nser), as.integer(lag.max), as

Re: [R] GIS Help: distance calculation based on ZIP Code

2010-12-08 Thread Barry Rowlingson
On Wed, Dec 8, 2010 at 6:18 PM, XINLI LI wrote: > Thank you very much, I will look into it. If it really is only 200 then I'd start typing them into Google's direction finder and typing in the distance/time given. Even if you only do one per minute they'll all be done in half a day easily. Job d

[R] change matrix based on look-up value from table

2010-12-08 Thread Jon Erik Ween
Hi! I have a large dataset where I need to recompute a value in each row based on z-sores from another look-up table. The look-up table is arranged by raw score in the first column and age in the first row, eg: 20 30 40 1 .3 .5 .7 2 .2 .3 .4 3 .1 .4 .7 the main matrix will have ages

[R] Formatting 'names.arg' in barplot

2010-12-08 Thread emorway
Hello, I've been looking through ?phantom and ?expression and this forum for examples of how I might be able to manipulate some of the names that appear on the y-axis of the barplot below. For example, the "gw" in "ECgw" would appear as a subscript...or "qr" would be the theta symbol followed by

[R] what function use to draw probability of finding data between certain constaints

2010-12-08 Thread madr
I have simple scatterplot of temperature data taken daily from many years so at particular date there are usually more than one measurement, but not all data is complete. Now I want to draw line that will show me probability of finding data between defined bands of temperatures, for example +5 de

Re: [R] Confidence Intervals for Odds Ratios in multivariate logistic regression

2010-12-08 Thread Charles C. Berry
On Wed, 8 Dec 2010, S.M. Raghavan wrote: Hi all, I am trying to fit a logistic regression for a bivariate response using five independent variables in a stepwise procedure. My outputs look okay but does any one know (or is there any literature on) how the confidence intervals are calculated for

[R] how to display a dataset on a dialog window

2010-12-08 Thread Felipe Carrillo
HI: Is there a way to display a dataset on a dialog window? I am creating an application with Visual Basic and R, and I want the user to be able to see the dataset used print out on a dialog window. Not sure if there is a better way to do this, but basically when the user click a button on a VB

Re: [R] GIS Help: distance calculation based on ZIP Code

2010-12-08 Thread XINLI LI
Thank you very much, I will look into it. Best, xing On 12/8/10, Mike Marchywka wrote: > > > > > > > > > > > > > >> From: ggrothendi...@gmail.com >> Date: Wed, 8 Dec 2010 10:50:40 -0500 >> To: lihaw...@gmail.com >> CC: r-help@r-project.org >> Subject: Re

Re: [R] RGL crashes

2010-12-08 Thread Duncan Murdoch
Matthew Dowle wrote: Might Wayland fix it in Narwhal ? I hope those names mean something to Rainer, because they mean nothing to me. Duncan Murdoch "Duncan Murdoch" wrote in message news:4cff7177.7030...@gmail.com... On 08/12/2010 6:07 AM, Rainer M Krug wrote: -BEGIN PGP SIGNED ME

Re: [R] I want to get smoothed splines by using the class gam

2010-12-08 Thread Gavin Simpson
On Wed, 2010-12-08 at 08:48 -0800, anna_m wrote: > Hi all, > I try to interpolate a data set in the form: > > time Erg > 0.00 48.65 > 1.50 56.08 > 3.00 38.33 > 4.50 49.65 > 6.00 61.39 > 7.50 51.25 > 9.00 50.450

[R] ReadWrite.xls problem

2010-12-08 Thread tkdweber
Dear community, I have now taken my R-file from lectures and intend to use it at home, but have a problem reading the Data from the file. I have installed and loaded the Package xlsReadWrite so far. I have also "Changed directory". This is what I have entered daten=read.xls("Daten A2") This is

Re: [R] Parallel Scan of Large File

2010-12-08 Thread jim holtman
You might be better off partitioning the file before processing with R. If you are planning on using "skip = n" to skip over records before processing, then the last thread you would start would have to read through 7/8 of the file before starting. The actual I/O, plus the looking for the line fe

Re: [R] Efficient way to use data frame of indices to initialize matrix

2010-12-08 Thread Cutler, Gene
Thanks for the three great answers! For those who are curious, I timed the three approaches: nr <- 15812 nc <- 64636 mymat <- matrix(nrow=nr, ncol=nc) mymat[1,1] <- 1 # see note below # mydf is created elsewhere dim(mydf) # 109102633 colnames(mydf) # "x" "y" "a" # approach 1: # mymat[

[R] the output of function lars

2010-12-08 Thread poko2000
Hi here is the code as example lars is in package lars > x<-matrix(rnorm(20*5,0,1),20,5) > bs<-matrix(sample(seq(1:10),5),5,1) > er<-rnorm(20,0,1) > y<-x%*%bs+er > lobj<-lars(x,y,type="lasso") > names(lobj) [1] "call" "type" "df" "lambda" "R2" [6] "RSS""Cp

[R] VARMA

2010-12-08 Thread Garten Stuhl
Hi all, I want to estimate parameters from a VARMA(p,q)-Modell. The equations of the model or the model structures is given by: Xt=beta1+beta2*Xt-1+beta3*Yt-1+epsilon1 Yt=beta4+beta5*Yt-1+espilon2 epsilon1 and espilon2 are white noise. Xt is given by a vector of n elements e.g. (2,

[R] Doing seasonal adjustment from within R

2010-12-08 Thread Abiel X Reinhart
Is anyone aware of a way to seasonally adjust time series data using X-12 ARIMA and TRAMO/SEATS from within R? I know that that one can seasonally adjust data with gretl, which I understand offers some level of R integration. However, all the examples I've seen of gretl/R integration involve wor

Re: [R] GIS Help: distance calculation based on ZIP Code

2010-12-08 Thread Mike Marchywka
> From: ggrothendi...@gmail.com > Date: Wed, 8 Dec 2010 10:50:40 -0500 > To: lihaw...@gmail.com > CC: r-help@r-project.org > Subject: Re: [R] GIS Help: distance calculation based on ZIP Code > > On Wed, Dec 8, 2010 at 10:41 AM, XINLI LI wrote: >

Re: [R] UniCox in R

2010-12-08 Thread jim holtman
Provide at least a subset of the data you want to plot (e.g., 10 data points). I assume that the data provides enough information to determine how long each of the branches/cross ties are for the elements that you want to plot. I don't use UniCox, nor do I know that the list of items that it retu

Re: [R] Confidence Intervals for Odds Ratios in multivariate logistic regression

2010-12-08 Thread David Winsemius
On Dec 8, 2010, at 11:59 AM, S.M. Raghavan wrote: Hi all, I am trying to fit a logistic regression for a bivariate response using five independent variables in a stepwise procedure. My outputs look okay but does any one know (or is there any literature on) how the confidence intervals a

Re: [R] Confidence Intervals for Odds Ratios in multivariate logistic regression

2010-12-08 Thread Bert Gunter
See McCullagh and Nelder's GLM book for details -- and also probably V&R's MASS for a concise summary, although I don't have it at hand and can't be sure it's there. Really, practically any book on GLM should have details. **HOWEVER** You should realize that all these references are "wrong" in the

[R] Newbie trying to understand $ so I can understand acf function in stats

2010-12-08 Thread Dick Knox
I am trying to understand the function acf stats:::acf shows me the function I am having trouble understanding the usage "$acf" in the following acf <- array(.C(R_acf, as.double(x), as.integer(sampleT), as.integer(nser), as.integer(lag.max), as.integer(type == "correlation"

[R] Confidence Intervals for Odds Ratios in multivariate logistic regression

2010-12-08 Thread S.M. Raghavan
Hi all, I am trying to fit a logistic regression for a bivariate response using five independent variables in a stepwise procedure. My outputs look okay but does any one know (or is there any literature on) how the confidence intervals are calculated for the reported odds ratios..? Thanks!

Re: [R] Summing up Non-numeric column

2010-12-08 Thread Bert Gunter
I think ?table is what you want. -- Bert On Wed, Dec 8, 2010 at 1:19 AM, Ivan Calandra wrote: > Hi, > > Still another way would be to count the levels of the factors (if it is > indeed a factor): > length(levels(example$V1)) > > Ivan > > Le 12/8/2010 06:08, Jorge Ivan Velez a écrit : >> >> Hi,

[R] I want to get smoothed splines by using the class gam

2010-12-08 Thread anna_m
Hi all, I try to interpolate a data set in the form: timeErg 0.0048.65 1.5056.08 3.0038.33 4.5049.65 6.0061.39 7.5051.25 9.0050.45 10.50 55.11 12.00 61.12000

[R] R Programming Techniques Courses***December 2010 - in Washington DC by XLSolutions Corporation

2010-12-08 Thread Sue Turner
Upcoming R Programming Techniques Courses http://www.xlsolutions-corp.com/Rcourses *** R Fundamentals and Programming Techniques Washington DC, Dec 16-17, 2010 San Francisco, Dec 16-17 More on website http://www.xlsolutions-corp.com/Rcourses Ask for group discount and reserve you

Re: [R] robustbase problem [bug?] in adjbox function.

2010-12-08 Thread Peter Ehlers
My apologies to Martin. I should have known how prompt he would be and I should have been more on the ball in checking incoming mail. The new version of robustbase on R-Forge does indeed fix this. Thanks to the robustbase team. Peter On 2010-12-08 07:57, Peter Ehlers wrote: On 2010-12-08 06:3

Re: [R] how to make partial mean() of a matrix only when second value matching some logic

2010-12-08 Thread Mike Rennie
try tapply() if you want the values for all levels of x, or calculate your mean after a subset() Check the documentation on both of these. Mike On Wed, Dec 8, 2010 at 9:54 AM, madr wrote: > > for example I have matrix with two columns > > x,y > 1,0.56 > 2,9.55 > 2,7.56 > 5,2.55 > 5,0.56 > 3,0.

Re: [R] robustbase problem [bug?] in adjbox function.

2010-12-08 Thread Peter Ehlers
On 2010-12-08 06:39, kv wrote: Thanks Peters, what i suspected (i.e. ties). For what it's worth i would add that the problem happends when length(data)>100 (i.e. the second condition in the mc.default() function). Best, I don't think that the length of 100 is special (other than in the 'doRef

Re: [R] understanding output of tapply/by cumsum

2010-12-08 Thread Gerrit Draisma
Thanks Jim, "Ave" does what I wanted. It is simpler and probably more efficient than unlisting Sn as I tried. Still I remain puzzled with the structure of the by() or tapply() output and how to access the individual cumsums. Yes the split command is useful for checking the result. Gerrit. Op 1

[R] how to make partial mean() of a matrix only when second value matching some logic

2010-12-08 Thread madr
for example I have matrix with two columns x,y 1,0.56 2,9.55 2,7.56 5,2.55 5,0.56 3,0.55 2,0.56 2,1.56 so I need to take average from y values placed where x==2 -- View this message in context: http://r.789695.n4.nabble.com/how-to-make-partial-mean-of-a-matrix-only-when-second-value-matching-s

Re: [R] How can I calculate the median for each factor combination?

2010-12-08 Thread Marianne Stephan
Thank you Jorge, this is exactly what I needed! Another solution that works too, suggested by Steve:group.med <- tapply( rt, list(group, session), median) From: jorgeivanve...@gmail.com Date: Wed, 8 Dec 2010 09:43:47 -0500 Subject: Re: [R] How can I calculate the median for each factor combinatio

Re: [R] GIS Help: distance calculation based on ZIP Code

2010-12-08 Thread Gabor Grothendieck
On Wed, Dec 8, 2010 at 10:41 AM, XINLI LI wrote: > Dear R Group Users: > >    If there is a resource or easy way to calculate the distance > between zipcodes, for example, if I have the zipcode for 200 patients, > and the zipcode of a hospital, how to calculate the travel distance of > these indiv

Re: [R] robustbase problem [bug?] in adjbox function.

2010-12-08 Thread kv
Prof. Maechler , Koller, Thank you very much, problem solved. Best, Seasons greetings. -- View this message in context: http://r.789695.n4.nabble.com/robustbase-problem-bug-in-adjbox-function-tp3077134p3078429.html Sent from the R help mailing list archive at Nabble.com. __

[R] GIS Help: distance calculation based on ZIP Code

2010-12-08 Thread XINLI LI
Dear R Group Users: If there is a resource or easy way to calculate the distance between zipcodes, for example, if I have the zipcode for 200 patients, and the zipcode of a hospital, how to calculate the travel distance of these individual patient to the hospital based on the zipcode. Your inp

Re: [R] robustbase problem [bug?] in adjbox function.

2010-12-08 Thread Martin Maechler
Thank you, Peter. (see inline) On Wed, Dec 8, 2010 at 14:58, Peter Ehlers wrote: > On 2010-12-07 12:01, kv wrote: >> >> hello list, >> >> i'm a bit puzzled by the error message i get when i copy past this in R: [.] >> in my computer adjbox says: >> >> "maximal number of iterations (10

Re: [R] Time out for a R Function

2010-12-08 Thread Santosh Srinivas
Thank you. I tried this but not sure if I have implemented this correctly ... basically if function1 hangs .. I need the timeout to be triggered and then the process moves to the next function call. I have this: function1 <- function(x){ setTimeLimit(elapsed = 5*60, transient = FALSE) step 1 ste

Re: [R] RGL crashes

2010-12-08 Thread Matthew Dowle
Might Wayland fix it in Narwhal ? "Duncan Murdoch" wrote in message news:4cff7177.7030...@gmail.com... > On 08/12/2010 6:07 AM, Rainer M Krug wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> On 12/08/2010 12:05 PM, Duncan Murdoch wrote: >>> Rainer M Krug wrote: >>> Hi >>> >>> rgl

Re: [R] How can I calculate the median for each factor combination?

2010-12-08 Thread Jorge Ivan Velez
Hi Marianne, Please consider the following: with(table, aggregate(rt, list(group, session), FUN = median)) HTH, Jorge On Wed, Dec 8, 2010 at 9:29 AM, Marianne Stephan <> wrote: > > Hello everybody, > I would like to calculate the median for each factor combination, with only > one value per fa

Re: [R] robustbase problem [bug?] in adjbox function.

2010-12-08 Thread kv
Thanks Peters, what i suspected (i.e. ties). For what it's worth i would add that the problem happends when length(data)>100 (i.e. the second condition in the mc.default() function). Best, -- View this message in context: http://r.789695.n4.nabble.com/robustbase-problem-bug-in-adjbox-function-t

[R] How can I calculate the median for each factor combination?

2010-12-08 Thread Marianne Stephan
Hello everybody, I would like to calculate the median for each factor combination, with only one value per factor combination as an output. Could anybody help me? For example: # make table g<-1:2 group<-rep(g, each=5) session<-c(1,1,2,2,2,1,1,1,2,2) rt<-seq(length=10,300, 800) rt<-round(rt, dig

Re: [R] robustbase problem [bug?] in adjbox function.

2010-12-08 Thread Peter Ehlers
On 2010-12-07 12:01, kv wrote: hello list, i'm a bit puzzled by the error message i get when i copy past this in R: data<-c(16,13,17,4,15,24,59,18,33,8,42,19,20,4,11,9,3,7,10,3,3,67,4,4,13,16,6,3,3,6,3,4,35,10,16,11,24,7,47,8,8,2,12,3,8,4,3,6,6,10,2,9,3,15,21,13,8,16,2,5,14,9,21,4,9,11,36,4,8,4

Re: [R] latex() hangs R console

2010-12-08 Thread Michael Friendly
On 12/7/2010 9:35 PM, Yihui Xie wrote: shell(paste("yap", "C:/WINDOWS/TEMP/Rtmpz0QkT8/file311f289a.dvi")) I can confirm that using shell() directly on the .dvi file generated by latex() works, while system() does not -- it hangs as before. However, Yihui's patch, in this form still hangs, so m

Re: [R] How can I change the longitude scale on the plotMap() PBSmapping package

2010-12-08 Thread Roger Bivand
You cannot, plotMap() decides things for you. For more flexibility than: polys <- data.frame(PID=rep(1,4), POS=1:4, X=c(0,1,1,0), Y=c(0,0,1,1)) plotMap(polys, xlim=c(-.5,1.5), ylim=c(-.5,1.5), projection="LL") from the help page, consider trying: library(sp) library(maptools) sp_polys <- PolySe

Re: [R] UniCox in R

2010-12-08 Thread Samuel Okoye
Thank you for your reply. My question was how to create Fig. 2? I am using UniCox; the aa=uniCoxCV gives list of  aa$ devcvm  aa$ncallcvm aa$se.devcvm, aa$devcv, aa$ ncallcv and aa$ folds, which data I should plot here to create the graph in Fig. 2? Many thanks, Sam --- On Wed, 8/12/10, jim h

Re: [R] set Gamma parameters in glm model

2010-12-08 Thread Ben Bolker
Rosario Garcia Gil slu.se> writes: > > Hello > > I hope my question makes sense. It is possible to specify the shape paramenters in a glm model with family Gamma? > It doesn't look that way, but you can do a Gamma model with a specified shape parameter (albeit much less efficiently) via li

Re: [R] UniCox in R

2010-12-08 Thread jim holtman
Do a little reading on how to use the graphics commands. I would look at plot lines segments a combination of those will let you easily create the output. It would seem you need some data object that has the dimensions of the bar lengths you want to create, but given that, it is not much of a p

Re: [R] Dont print plot on screen

2010-12-08 Thread Ivan Calandra
For (at least) boxplot() and hist(), you can set plot=FALSE But since we don't know what type of plot you want, difficult to be sure. Ivan Le 12/8/2010 14:14, Joel a écrit : Hi is there any command or setting that allows you to do the plot command but it dose not print the plot on screen? So wh

Re: [R] Parallel Scan of Large File

2010-12-08 Thread Mike Marchywka
> Date: Tue, 7 Dec 2010 17:22:57 -0800 > From: ryan.steven.gar...@gmail.com > To: r-help@r-project.org > Subject: [R] Parallel Scan of Large File > > > Is it possible to parallel scan a large file into a character vector in 1M > chunks using scan() wit

  1   2   >