[R] Conditional Sums for Index creation

2007-05-14 Thread Patnaik, Tirthankar
Hi, Apologies for the long mail. I have a data.frame with columns of price/mcap data for a portfolio of stocks, and the date. To get the total value of the portfolio on a daily basis, I calculate rowSums of the data.frame. set.seed(1) ab - matrix(round(runif(100)*100),nrow=20,ncol=5)

Re: [R] Multivariate Outlier Detection - Robust

2007-05-14 Thread Dieter Menne
Fiona Sammut fiona.sammut at um.edu.mt writes: Whilst reading a book on robust statistics, in particular a section on multivariate outlier detection, I came across the functions outmve, outmgv and outpro. I tried the help.search command to try and find documentation on these 3 commands in

Re: [R] Conditional Sums for Index creation

2007-05-14 Thread gyadav
Hello My dear friend the problem is not very heavy its very light, but you have to assume somethings. as you say that any new stock can come anytime and go anytime, further, any time NA can come . both statements are so close that it would be nearly impossible to know which one is NA

[R] number of days

2007-05-14 Thread threshold
Hi, some of you knows how to calculate in R the number of days between given dates? issue relevant in option pricing thanks, robert -- View this message in context: http://www.nabble.com/number-of-days-tf3751163.html#a10600371 Sent from the R help mailing list archive at Nabble.com.

[R] Excel data into R

2007-05-14 Thread Ozlem Ipekci
Hello to all, How can I make R read the data from an Excel sheet? thanks, ozlem [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Make sign test show test statistics

2007-05-14 Thread Johan A. Stenberg
When I perform a two-tailed sign test with the following simple syntax, binom.test(59,100) R returns a P-value (0.088) but nothing else. As I want the result for a one-tailed test I take P/2 = 0.044). However, the journal to which I've submitted my results requests the test statistics, not

Re: [R] Excel data into R

2007-05-14 Thread Soare Marcian-Alin
library(xlsReadWrite) ?read.xls KR, Alin Soare 2007/5/12, Ozlem Ipekci [EMAIL PROTECTED]: Hello to all, How can I make R read the data from an Excel sheet? thanks, ozlem [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch

Re: [R] a question about spatial autocorrelation in R

2007-05-14 Thread Roger Bivand
On Mon, 14 May 2007 [EMAIL PROTECTED] wrote: Dear all, I am currently facing a problem related to the spatial autocorrelation of a sample of stations; these stations supply weekly data for a fixed time-window during the year (namely, 4-6 months per year). Could I suggest that you read

Re: [R] number of days

2007-05-14 Thread Bill.Venables
The standard answer is to use as.POSIXlt(2007-05-14) - as.POSIXlt(1950-01-01) Time difference of 20952 days If you want to ensure the time difference is in daily units, then difftime(as.POSIXlt(2007-05-14), as.POSIXlt(1950-01-01), units = days) Time difference of 20952 days

Re: [R] adding custom details to ggplot subplots

2007-05-14 Thread hadley wickham
Hi Antonio, Again, you can't do it in the current version, but it's pretty easy to do in the new version. The following example comes from the documentation: # Slopes and intercepts as data p - ggplot(mtcars, aes(x = wt, y=mpg), . ~ cyl) + geom_point() df - data.frame(intercept=25, slope=2) p +

[R] New mailing list: R for psychology research

2007-05-14 Thread Andy Fugard
Hello all, There's a new mailing list for researchers in psychology who are learning and using R. New users of R are especially welcome. To join, venture to http://www.jiscmail.ac.uk/archives/psych-r.html and click Join or leave the list (or change settings) You can also peruse the

Re: [R] Make sign test show test statistics

2007-05-14 Thread Ted Harding
On 14-May-07 10:07:53, Johan A. Stenberg wrote: When I perform a two-tailed sign test with the following simple syntax, binom.test(59,100) R returns a P-value (0.088) but nothing else. As I want the result for a one-tailed test I take P/2 = 0.044). 1: If you want a 1-sided P-value, use

Re: [R] shell.exec() on Windows, unexpected behavior

2007-05-14 Thread S Ellison
Richard; Windows file open behaviour is dictated by the complete set of file associations in the windows registry. You can inspect them in Explorer via tools|folder options|File types, by finding the file type and looking at the advanced options. I would suspect that installing acrobat and

Re: [R] Make sign test show test statistics

2007-05-14 Thread S Ellison
Johan, Tests return objects of class htest; see ?t.test for a description. binom.test(59,100)$statistic confirms that Ted harding is right about the test statistic; it's just the number of successes. Steve Ellison Johan A. Stenberg [EMAIL PROTECTED] 14/05/2007 11:07:53 When I perform a

Re: [R] FW: [OT] Is data copyrightable?

2007-05-14 Thread Ben Klemens
Hadley, The relevant case law in the USA is Feist Publications v. Rural Telephone Corp. (499 U.S. 340, 1991). In this case, one phone book publisher basically lifted a competing publisher's listings wholesale. The courts found that this was _not_ copyright infringement. The logic is that

[R] x axis problems

2007-05-14 Thread Ener Borg
I have been searching for the R manual, unable to solve my problem. Questions 1) How can I put the x axis at the top of the plot? 2) I am plotting data from a CTD. I want to add series sal, obs and fluo at the same plot by using points(sal,deepth) ets. The data have different values so I want

Re: [R] Excel data into R

2007-05-14 Thread Wensui Liu
library(RODBC); # 1. READ DATA FROM EXCEL INTO R xlsConnect-odbcConnectExcel(C:\\temp\\demo.xls); demo-sqlFetch(xlsConnect, Sheet1); odbcClose(xlsConnect); rm(demo); On 5/12/07, Ozlem Ipekci [EMAIL PROTECTED] wrote: Hello to all, How can I make R read the data from an Excel sheet? thanks,

Re: [R] x axis problems

2007-05-14 Thread Duncan Murdoch
On 5/14/2007 7:45 AM, Ener Borg wrote: I have been searching for the R manual, unable to solve my problem. Questions 1) How can I put the x axis at the top of the plot? To stop it from being at the bottom: axes=FALSE in the plot() call. To draw the box: box() To draw an axis on the left:

Re: [R] Dropdown boxes in tcltk and R

2007-05-14 Thread Jonne Zutt
Hi Jake, Two things I noticed: - Don't tkdestroy(tt) too soon, you use comboBox later. - Don't use fruitChoice in OnOK if you only define it at the very end of your program. Here's your code with these two modifications. Greets, Jonne. require(tcltk) tclRequire(BWidget) tt - tktoplevel()

Re: [R] Conditional Sums for Index creation

2007-05-14 Thread gyadav
Hi Tirthankar this will help you ind is a matrix which indicates the start of any new stock. ind[i,j] means that in j + 1 column all the values from 1st row to i - 1 row are all NAs. x V2 V3 V4 V5 V6 [1,] 27 93 82 NA NA [2,] 37 21 65 NA NA [3,] 57 65 78 NA NA [4,] 91 13 55 NA NA

[R] R and batch

2007-05-14 Thread elyakhlifi mustapha
hello, I wanna know how can I use R in batch if it's possible thanks _ [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

[R] Problem with R CMD BATCH on R-2.5.0 due to Sys.unsetenv not available

2007-05-14 Thread Simon Penel
Hello, I am working on an unix SunOS machine ( sun4u sparc) and since the last release of R -R version 2.5.0 (2007-04-23) - , I have got troubles during the execution of batch command. For example with the instruction file multic.in cat multic.in

Re: [R] x axis problems

2007-05-14 Thread J . delasHeras
Quoting Ener Borg [EMAIL PROTECTED]: I have been searching for the R manual, unable to solve my problem. Questions 1) How can I put the x axis at the top of the plot? as others indicated, check ?axis... the parameter 'pos=3' will display the axis on top 2) I am plotting data from a

Re: [R] Social Network Analysis

2007-05-14 Thread Gabor Csardi
Tom, check the igraph package. Although structural balance is not implemented, for three or four nodes it might be straightforward to do a quick implemntation which works for small graphs. Btw. what is exactly you want to do? List the number of balanced and unbalanced triangles? Ot the

[R] Error in X11(display, width, height, pointsize, if (is.null(gamma)) 1 else gamma, : invalid 'width' or 'height'

2007-05-14 Thread Gregory D. Laun
Hey, I've been using R for several years and I just upgraded my system and all of a sudden I'm getting the above message. Here it is again Error in X11(display, width, height, pointsize, if (is.null(gamma)) 1 else gamma, : invalid 'width' or 'height' I get it on two computers, one on

[R] parsing an lmer error with interaction term

2007-05-14 Thread Brian Riordan
I'm trying to specify a model using lmer with a binary response and interaction term, but I get an error I can't parse (see below). Here is some sample data: SubjectConcordAgeDisc SVC999MX148SU-Fyesuint TOU999JU030S1yesuint TOU999JU030S1yesuint

[R] R^2 from lme function

2007-05-14 Thread Cleber Borges
Hello allR How to access R^2 from lme object? or how to calculate it? ( one detail: my model do not have a intercept ) thanks in advanced Cleber ___ Experimente já e veja as novidades.

[R] Batch

2007-05-14 Thread elyakhlifi mustapha
I saw the R-help to run some R programs in batch I used it like this R CMD BATCH C:/Documents and Settings/melyakhlifi/Bureau/calcara.r Erreur : erreur de syntaxe dans R CMD but without success!!!I don't work on linux but on windows IS it the same command ?

Re: [R] R^2 from lme function

2007-05-14 Thread Martin Henry H. Stevens
Hi Cleber, I have been using this function I wrote for lmer output. It should be easy to convert to lme. As with everything, buyer beware. Note that it requires (full) maximum likelihood estimates. Rsq - function(reml.mod) { ## Based on ## N. J. D. Nagelkerke. A note on a general

Re: [R] Batch

2007-05-14 Thread Petr Klasterecky
1. why do you need R BATCH on Windows? This is mostly useful when running on a remote (usually Linux) server... 2. why didn't you tell us about Windows in your first post ? 3. why do you not quote the path to your script? This way R can only read c:/Documents Petr elyakhlifi mustapha

Re: [R] Batch

2007-05-14 Thread Vladimir Eremeev
elyakhlifi mustapha wrote: I saw the R-help to run some R programs in batch I used it like this R CMD BATCH C:/Documents and Settings/melyakhlifi/Bureau/calcara.r Erreur : erreur de syntaxe dans R CMD but without success!!!I don't work on linux but on windows IS it the same command ?

Re: [R] [OT] Is data copyrightable?

2007-05-14 Thread Thomas Lumley
This is an area where US law differs importantly from other countries. US law protects compilations of facts only to the extent that the selection of the facts is creative expression (and does not protect the facts themselves). Many other jurisdictions (eg European Union) also offer

Re: [R] R^2 from lme function

2007-05-14 Thread Cleber Borges
Hi Martin, many thanks for your tip! but,{ :-( } what it 'full MLE' ? how to calculate? it is a saturated model??? and it is valid for 'no-intercept model? Many thanks again... Cleber Hi Cleber, I have been using this function I wrote for lmer

Re: [R] Batch

2007-05-14 Thread Gabor Grothendieck
On 5/14/07, Vladimir Eremeev [EMAIL PROTECTED] wrote: elyakhlifi mustapha wrote: I saw the R-help to run some R programs in batch I used it like this R CMD BATCH C:/Documents and Settings/melyakhlifi/Bureau/calcara.r Erreur : erreur de syntaxe dans R CMD but without success!!!I

[R] Re : Batch

2007-05-14 Thread justin bem
You dont type this command in RGui but in you shell or dos command prompt Justin BEM Elève Ingénieur Statisticien Economiste BP 294 Yaoundé. Tél (00237)9597295. - Message d'origine De : elyakhlifi mustapha [EMAIL PROTECTED] À : R-help@stat.math.ethz.ch Envoyé le : Lundi, 14 Mai 2007,

Re: [R] program to recognize words

2007-05-14 Thread Gabor Grothendieck
Do you mean you want to separate out each sequence of characters that does not contain whitespace? scan can do that: Line - if C325=. then C743=(C152/C103)*100| else C743=(C152/C325)*100 scan(textConnection(Line), what = ) Read 6 items [1] ifC325=.then [4]

Re: [R] PRESS criterion in leaps

2007-05-14 Thread Thomas Lumley
On Fri, 11 May 2007, Andrew Smith wrote: I thought it would be simplest to build on already existing functions like regsubsets in package leaps. It's easy enough to calculate the PRESS criterion for a fitted lm object, but I'm having trouble deciphering the structure of the regsubsets objects

[R] set ignore flags for R CMD check

2007-05-14 Thread Arjun Ravi Narayan
Hi, I want to create an R package, with an Rnw file, and distribute it. However, I have restrictions on certain parts of my data, so I have a makefile which deletes the specific data upon creation of the package. However, I want my package (including the Rnw file which now references the deleted

[R] Nonlinear Mixed-Effects Models (DNase)

2007-05-14 Thread Maria Salomé Esteves Cabral
Hi! I tried to fit four-parameter logistic model (SSfpl) to DNase data based on log(conc) (mixed model) but I never get convergence. Can anyone help me? Thanks Salomé __ R-help@stat.math.ethz.ch mailing list

Re: [R] Problem with R CMD BATCH on R-2.5.0 due to Sys.unsetenv not available

2007-05-14 Thread Prof Brian Ripley
On Mon, 14 May 2007, Peter Dalgaard wrote: Simon Penel wrote: Hello, I am working on an unix SunOS machine ( sun4u sparc) and since the last release of R -R version 2.5.0 (2007-04-23) - , I have got troubles during the execution of batch command. For example with the instruction file

[R] JOB: Biostatistician/Statistical Programmer/Data Analyst

2007-05-14 Thread Gregory Warnes
Biostatistician/Statistical Programmer/Data Analyst The Department of Biostatistics and Computational Biology, University of Rochester Medical Center is seeking a Biostatistician/Statistical Programmer/Data Analyst to assist with several center-wide immunology and infectious disease

[R] Left/right hand side characters

2007-05-14 Thread Brooks, Anthony B
Hello all Is there a way reducing the number of characters in a list so that just the left n numbers of characters is given? For example, If I have a list, listnames, which consists of 4 strings of 6 characters; listnames [1] item12 item34 item56 item78 Is there a way to reduce this so

[R] Efficient computation of trimmed stats?

2007-05-14 Thread Benilton Carvalho
Hi everyone, I was wondering if there is anything already implemented for efficient (row-wise) computation of group-specific trimmed stats (mean and sd on the trimmed vector) on large matrices. For example: set.seed(1) nc = 300 nr = 25 x = matrix(rnorm(nc*nr), ncol=nc) g =

Re: [R] Left/right hand side characters

2007-05-14 Thread Gabor Csardi
See ?substr. Gabor On Mon, May 14, 2007 at 05:49:25PM +0100, Brooks, Anthony B wrote: Hello all Is there a way reducing the number of characters in a list so that just the left n numbers of characters is given? For example, If I have a list, listnames, which consists of 4 strings of 6

Re: [R] R^2 from lme function

2007-05-14 Thread Martin Henry H. Stevens
Hi Cleber, By full I simply meant not REML. the function assumes that the fixed effects were estimated using REML criteria, and using update() simply changes that to ML. If the model was fit originally with ML, it shouldn't make any difference. I am reasonably sure that it should not matter

Re: [R] Left/right hand side characters

2007-05-14 Thread J . delasHeras
check ?substr substr(item54,1,5) [1] item5 Jose Quoting Brooks, Anthony B [EMAIL PROTECTED]: Hello all Is there a way reducing the number of characters in a list so that just the left n numbers of characters is given? For example, If I have a list, listnames, which consists of 4

Re: [R] Problem with R CMD BATCH on R-2.5.0 due to Sys.unsetenv not available

2007-05-14 Thread Simon Penel
Prof Brian Ripley a écrit : On Mon, 14 May 2007, Peter Dalgaard wrote: Simon Penel wrote: Hello, I am working on an unix SunOS machine ( sun4u sparc) and since the last release of R -R version 2.5.0 (2007-04-23) - , I have got troubles during the execution of batch command. For

Re: [R] PRESS criterion in leaps

2007-05-14 Thread Richard M. Heiberger
The main reason for explicitly constructing the Q matrix is for the pedagogical value of seeing it. As Thomas points out, if you want to actually use Q in a calculation, there will almost always be a much more efficient way of constructing the real goal of the calculation. For help in that

Re: [R] what fun I need to put in this tapply

2007-05-14 Thread Sundar Dorai-Raj
Weiwei Shi said the following on 5/14/2007 11:04 AM: Hi, I happened to need generate the following t1 V1 V2 count count2 1 1 11 2 3 2 1 12 2 2 3 2 11 1 3 4 3 13 3 1 5 3 11 3 3 6 3 12 3 2 from V1 V2 1 1 11 2 1 12 3

Re: [R] R^2 from lme function

2007-05-14 Thread Douglas Bates
On 5/14/07, Martin Henry H. Stevens [EMAIL PROTECTED] wrote: Hi Cleber, By full I simply meant not REML. the function assumes that the fixed effects were estimated using REML criteria, and using update() simply changes that to ML. If the model was fit originally with ML, it shouldn't make

Re: [R] Hierarchical models in R

2007-05-14 Thread Cody_Hamilton
Franco, What about calling the BUGS model below from R using BRUGS? Regards, -Cody francogrex [EMAIL PROTECTED]

[R] creating a list of 3 dataframes from a list of 2 dataframes and a dataframe?

2007-05-14 Thread new ruser
#I wish to create a list of three dataframes (results2) from a list of two dataframes (temp) and a dataframe (c)? #Please advise. a - data.frame(x=c(1,2,3),y=c(5,7,9)) b - data.frame(x=c(2,4,7,9),y=c(2,3,5,4)) c - data.frame(x=c(22,34,7,9),y=c(52,63,5,4)) results1 - list(a,b,c) #what I want

Re: [R] creating a list of 3 dataframes from a list of 2 dataframes and a dataframe?

2007-05-14 Thread Rajarshi Guha
On May 14, 2007, at 2:48 PM, new ruser wrote: #I wish to create a list of three dataframes (results2) from a list of two dataframes (temp) and a dataframe (c)? #Please advise. a - data.frame(x=c(1,2,3),y=c(5,7,9)) b - data.frame(x=c(2,4,7,9),y=c(2,3,5,4)) c -

Re: [R] lmer function

2007-05-14 Thread Douglas Bates
On 5/14/07, Iasonas Lamprianou [EMAIL PROTECTED] wrote: Does anyone know if the lmer function of lme4 works fine for unbalanced designs? I have the examination results of 1000 pupils on three subjects, one score every term. So, I have three scores for English (one for every term), three

Re: [R] parsing an lmer error with interaction term

2007-05-14 Thread Douglas Bates
On 5/14/07, Brian Riordan [EMAIL PROTECTED] wrote: I'm trying to specify a model using lmer with a binary response and interaction term, but I get an error I can't parse (see below). Here is some sample data: SubjectConcordAgeDisc SVC999MX148SU-Fyesuint

Re: [R] Hierarchical models in R

2007-05-14 Thread francogrex
Hi, yes I know but in many cases BUGS and BRUGS just crash or worse still they can generate wrong results that's why i was wondering if there's a package like the MCMCpack etc that can allow hierarchical regression... Cody_Hamilton wrote: Franco, What about calling the BUGS model below from

Re: [R] Social Network Analysis

2007-05-14 Thread Tom Backer Johnsen
Gabor Csardi wrote: Tom, check the igraph package. Although structural balance is not implemented, for three or four nodes it might be straightforward to do a quick implemntation which works for small graphs. I will do so. My graphs are small, but not very small, having from 8 to 11

Re: [R] creating a list of 3 dataframes from a list of 2 dataframes and a dataframe?

2007-05-14 Thread Petr Klasterecky
Rajarshi Guha napsal(a): On May 14, 2007, at 2:48 PM, new ruser wrote: #I wish to create a list of three dataframes (results2) from a list of two dataframes (temp) and a dataframe (c)? #Please advise. a - data.frame(x=c(1,2,3),y=c(5,7,9)) b - data.frame(x=c(2,4,7,9),y=c(2,3,5,4)) c -

[R] function name collision

2007-05-14 Thread Bobby Prill
I am using the graph package, which has a function called union() that acts on graph objects. There is also a {base} function called union(). How do I explicitly specify union {graph} instead of the default union {base} ? union(g1, g2) evokes the wrong union(), which produces an error.

[R] Adaptive survival design

2007-05-14 Thread Cody_Hamilton
I am developing R code to implement the adaptive design approach of Schafer and Muller (Stats in Med 2001) for a survival endpoint. Would anyone be interested in collaborating with me on this code? I have fairly completed code, but would appreciate someone else's input on my work. Regards,

Re: [R] lmer function

2007-05-14 Thread Douglas Bates
On 5/14/07, Steven McKinney [EMAIL PROTECTED] wrote: Running lme4 0.9975-13 I'm still getting the warning $ operator not defined for this S4 class, returning NULL in: x$symbolic.cor It was my mistake. I fixed the problem in the development sources long ago but I haven't uploaded a new

[R] How to installation of R on Unix (SunOs 5.8)

2007-05-14 Thread Biao Xing
Hi there: Can someone help me with installing R on Unix? I tried the followings, but failed: (1) I downloaded http://cran.cnr.berkeley.edu/bin/linux/debian/stable/r-base_2.5.0.orig.tar.g z and unzipped the file. (2) I issued ./config command, which ended up with a long log file. I attached below

Re: [R] Query about RODBC to access MySQL from Windows

2007-05-14 Thread James Curran
I had exactly the same problem. I solved it by switching back to the early version of MySQL Connector/ODBC, 3.51. Interestingly, it was only the returning of results that wasn't working. Queries like create table and insert ... select worked just fine. James -- View this message in context:

[R] legend with mixed boxes and lines (not both)

2007-05-14 Thread Michael Toews
Hi, I seem to be unable to get a mixed legend that has lines *or* polygons (not both). For example: ppi - seq(0,2*pi,length.out=21)[-21] frame() plot.window(ylim=c(-5,5),xlim=c(-5,5),asp=1) polygon(cos(ppi)*4+rnorm(20,sd=.2),sin(ppi)*4+rnorm(20,sd=.2), col=green,border=FALSE)

[R] differentiate groups on barplot

2007-05-14 Thread Murray Pung
To differentiate between groups on the barplot, I guessed that col = colr[test$group] would have worked. How can I do this? Many Thanks Murray test - structure(list(patient = 1:20, score = c(100, 95, 80, 75, 64, 43, 42, 40, 37, 35, 30, 29, 27, 26, 23, 22, 19, 18, 17, 16), group = c(1, 0, 1, 0,

Re: [R] differentiate groups on barplot

2007-05-14 Thread Marc Schwartz
On Tue, 2007-05-15 at 11:36 +1000, Murray Pung wrote: To differentiate between groups on the barplot, I guessed that col = colr[test$group] would have worked. How can I do this? Many Thanks Murray test - structure(list(patient = 1:20, score = c(100, 95, 80, 75, 64, 43, 42, 40, 37, 35,

Re: [R] legend with mixed boxes and lines (not both)

2007-05-14 Thread Marc Schwartz
On Mon, 2007-05-14 at 18:13 -0700, Michael Toews wrote: Hi, I seem to be unable to get a mixed legend that has lines *or* polygons (not both). For example: ppi - seq(0,2*pi,length.out=21)[-21] frame() plot.window(ylim=c(-5,5),xlim=c(-5,5),asp=1)

[R] slightly OT: constrained least-squares estimation in a decomvolution model

2007-05-14 Thread Ranjan Maitra
Dear colleagues, This is not strictly a R question, but more a methodology-related question. I have the following linear model: Y = X\beta + e. Pretty standard stuff, but additionally, X is square, symmetric circulant. So, the LS estimate for \beta is given by just deconvolving Y with the

Re: [R] How to installation of R on Unix (SunOs 5.8)

2007-05-14 Thread Prof Brian Ripley
On Mon, 14 May 2007, Biao Xing wrote: Hi there: Can someone help me with installing R on Unix? I tried the followings, but failed: (1) I downloaded http://cran.cnr.berkeley.edu/bin/linux/debian/stable/r-base_2.5.0.orig.tar.g z and unzipped the file. That is not where the R FAQ says to get

Re: [R] Query about RODBC to access MySQL from Windows

2007-05-14 Thread Prof Brian Ripley
Please, you have shown no context here at all: your readers have no idea what 'exactly the same problem' is nor whom you are replying to, and this thread is not recent. On Mon, 14 May 2007, James Curran wrote: I had exactly the same problem. I solved it by switching back to the early version