Re: [R] R CMD check package "mypkg-Ex.R" failed

2013-05-31 Thread Berend Hasselman
On 01-06-2013, at 02:56, Justin wrote: > I build a test package in order to publish my own package to bioconductor. > > I am using package.skeleton > Step 1. create test package "mypkg" > f <- function(x,y) x+y > package.skeleton(list=c("f"), name="mypkg") > > Step 2. build tar.gz file >

Re: [R] GLMM in R

2013-05-31 Thread Bert Gunter
You should seek local statistical help. This list is not the right place to seek what appears to be statistical consulting and, indeed, basic statistical instruction. -- Bert On Fri, May 31, 2013 at 6:27 PM, Luis Fernando García Hernández wrote: > Dear Friends, > > I am new on R so I ask you to

Re: [R] wilcox_test function in coin package

2013-05-31 Thread Janh Anni
Hello peter, Thanks for the comment. wilcox.exact is simpler as you pointed out but the fact that it is no longer being developed is somewhat concerning. Regards Janh On Fri, May 31, 2013 at 6:50 PM, Peter Ehlers wrote: > On 2013-05-30 20:20, Janh Anni wrote: > >> Hello Greg, >> >> Thank you

[R] R CMD check package "mypkg-Ex.R" failed

2013-05-31 Thread Justin
I build a test package in order to publish my own package to bioconductor. I am using package.skeleton Step 1. create test package "mypkg"   f <- function(x,y) x+y   package.skeleton(list=c("f"), name="mypkg") Step 2. build tar.gz file {mars:/local/workspace01/zhangju/R_autopackage_Elbow}../bi

[R] How to compute a P-value for a complex mixture of chi-squared distributions in R

2013-05-31 Thread Tiago V. Pereira
Hello, R users! I am struggling with the following problem: I need to compute a P-value for a mixture of two chi-squared distributions. My P-value is given by: P = 0.5*prob(sqrt(chi2(1)) <= x) + 0.5*prob(sqrt(chi2(2)) <= x) In words, I need to compute the p-value for 50–50 mixture of the square

[R] How to compute a P-value for a complex mixture of chi-squared distributions in R

2013-05-31 Thread Tiago V. Pereira
Hello, R users! I am struggling with the following problem: I need to compute a P-value for a mixture of two chi-squared distributions. My P-value is given by: P = 0.5*prob(sqrt(chi2(1)) <= x) + 0.5*prob(sqrt(chi2(2)) <= x) In words, I need to compute the p-value for 50–50 mixture of the square

Re: [R] R help on loops

2013-05-31 Thread jim holtman
Is this what you want? I was not clear on your algorithm, but is looks like you wanted descending values: > testx <- + function(n, verbose = FALSE) + { + mat <- cbind(optA = sample(n, n, TRUE), perm = seq(n)) + if (verbose){ + cat("***starting matrix\n") + print(mat) +

[R] GLMM in R

2013-05-31 Thread Luis Fernando García Hernández
Dear Friends, I am new on R so I ask you to excuse me if this question sounds fool. I want to see if there is a significativa relationship between the mating (response variable) and several explanatory variables such as individual number (categorical), leg movemente (continous) and the reuse of in

[R] R help on loops

2013-05-31 Thread Laz
Dear R Users, I created a function which returns a value every time it's run (A simplified toy example is attached on this mail). For example spat(a,b,c,d) # run the first time and it gives you ans1= 10, perm=1 ; run the second time and gives you ans2= 7, perm=2 etc I store both the result

[R] Y-lim minimum overrun in barplot

2013-05-31 Thread Nicole Prause
The code below produces the plot hosted here: http://www.span-lab.com/ChartStop.jpeg error.bar <- function(x, y, upper, lower=upper, length=0.1,...){ if(length(x) != length(y) | length(y) !=length(lower) | length(lower) != length(upper)) stop("vectors must be same length") arrows(

Re: [R] Returning combine output from R loop

2013-05-31 Thread arun
Hi, You could reduce those steps by: as.data.frame(do.call(rbind,a2)) A.K. - Original Message - From: Abdul Rahman bin Kassim (Dr.) To: John Kane ; "r-help@r-project.org" Cc: Sent: Friday, May 31, 2013 11:47 AM Subject: Re: [R] Returning combine output from R loop Dear Kane, Thanks

Re: [R] how to install R 3.0.1

2013-05-31 Thread Ranjan Maitra
On Fri, 31 May 2013 18:10:19 -0500 Robert Baer wrote: > On 5/31/2013 11:59 AM, Ranjan Maitra wrote: > > Hi John, > > > > I suspect you may be missing a c()? > > > > On Fri, 31 May 2013 06:05:45 -0800 John Kane > > wrote: > > > >> paks <- install.packages( "Hmisc", "plyr") > > paks <- install.p

Re: [R] measuring distances between colours?

2013-05-31 Thread John Fox
Dear Kevin, I generally prefer your solution. I didn't realize that col2rgb() worked with hex-colour input (as opposed to named colours), so my code converting hex numbers to decimal is unnecessary; and using ifelse() is clearer than replacing the non-matches. I'm not so sure about avoiding the c

Re: [R] how to install R 3.0.1

2013-05-31 Thread Robert Baer
On 5/31/2013 11:59 AM, Ranjan Maitra wrote: Hi John, I suspect you may be missing a c()? On Fri, 31 May 2013 06:05:45 -0800 John Kane wrote: paks <- install.packages( "Hmisc", "plyr") paks <- install.packages( c("Hmisc", "plyr")) install.packages(paks) You can use the command l

Re: [R] Replace row value with corresponding column name

2013-05-31 Thread arun
HI, Try this: data1 <- data.frame("var1"=c(1,2,3),"var2"=c("A","B","C"),"var3"=c(4,5,6)) #your example data2 <- data.frame("var1"=c(1,2,3),"var2"=c("5","6","9"),"var3"=c(4,5,6)) #your example data3<- data.frame(var1=c(5,6,5,5),var2=c(4,4,5,3),var3=c(1,4,3,5))  data4<- data.frame(var1=c(1,2,3),va

Re: [R] wilcox_test function in coin package

2013-05-31 Thread Peter Ehlers
On 2013-05-30 20:20, Janh Anni wrote: Hello Greg, Thank you so much for your kind assistance. It looks like there's no way around using the formula format. I longed in vain for a simpler script more like the wilcox.test format. Thanks again. Janh I don't see why the formula syntax would be

Re: [R] glmx specification of heteroskedasticity (and its use in Heckit)

2013-05-31 Thread Achim Zeileis
On Fri, 31 May 2013, Michal Kvasni?ka wrote: Hallo. Many thanks for your answer. Let me check please that I do understand it correctly. Does it mean that the estimated log-likelyhood function is (in the Gaussian case) sum y * log F(x'b / exp(z'g)) + sum (1 - y) * log(1 - F(x'b / exp(z'g)) wh

Re: [R] tree in tree package - Error: cannot allocate vector of size 2.0 Gb

2013-05-31 Thread David Winsemius
On May 31, 2013, at 2:38 PM, Stephen Sefick wrote: > R version 3.0.0 (2013-04-03) > Platform: x86_64-redhat-linux-gnu (64-bit) > > locale: > [1] LC_CTYPE=en_US.utf8 LC_NUMERIC=C > [3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8 > [5] LC_MONETARY=en_US.utf8LC_MESSAGES=en_US.utf8 > [

Re: [R] tree in tree package - Error: cannot allocate vector of size 2.0 Gb

2013-05-31 Thread Steve Lianoglou
Hi, On Fri, May 31, 2013 at 5:38 PM, Stephen Sefick wrote: > R version 3.0.0 (2013-04-03) > Platform: x86_64-redhat-linux-gnu (64-bit) > > locale: > [1] LC_CTYPE=en_US.utf8 LC_NUMERIC=C > [3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8 > [5] LC_MONETARY=en_US.utf8LC_MESSAGES=en_U

Re: [R] More discussion on R usage statistics

2013-05-31 Thread Ista Zahn
Hi Johnny, I like the ideas here, just one small request. Please don't try to take over the comment() function! comment() is already a function in the base package, please don't mask it with yours. Thanks for considering my humble request. Best, Ista On Fri, May 31, 2013 at 1:25 PM, Johnny Zha

[R] tree in tree package - Error: cannot allocate vector of size 2.0 Gb

2013-05-31 Thread Stephen Sefick
R version 3.0.0 (2013-04-03) Platform: x86_64-redhat-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.utf8 LC_NUMERIC=C [3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8 [5] LC_MONETARY=en_US.utf8LC_MESSAGES=en_US.utf8 [7] LC_PAPER=CLC_NAME=C [9] LC_ADDRESS=C

Re: [R] measuring distances between colours?

2013-05-31 Thread Kevin Wright
Thanks for the discussion. I've also wanted to be able to find nearest colors. I took the code and comments in this thread and simplified the function even further. (Personally, I think using closures results in Rube-Goldberg code. YMMV.) The first example below is what I use for 'group' color

Re: [R] Error in x[[1]] : subscript out of bounds

2013-05-31 Thread Uwe Ligges
On 31.05.2013 16:58, Gary Dong wrote: Dear R users, I am estimating a nested logit model using "mlogit", but keep getting this error message: "Error in x[[1]] : subscript out of bounds" We need a reproducible example. Uwe Ligges Anyone can tell me what this error means? Simple MNL mode

Re: [R] How can I write logical function in R?

2013-05-31 Thread David Carlson
Another possibility: IE <- speciesTime1[,-1] - speciesTime2[,-1] Imm <- data.frame(addmargins(as.matrix(ifelse(IE<0, -1, 0)*IE), 2)) Imm Exti <- data.frame(addmargins(as.matrix(ifelse(IE>0, 1, 0)*IE), 2)) Exti - David L Carlson Associate Professor of Anthropolo

Re: [R] how to install R 3.0.1

2013-05-31 Thread Upananda Pani
Hi All, Thanks all for your kind help else it would have been very tough to go ahead. I convey my regards to all of you. Upananda On Fri, May 31, 2013 at 10:35 PM, John Kane wrote: > Arh, a sloppy copy and paste. > > Thanks > > John Kane > Kingston ON Canada > > > > -Original Message-

Re: [R] More discussion on R usage statistics

2013-05-31 Thread Johnny Zhang
Thank you very much for your feedback either through r-help list or direct contact. It seemed that "Rinfo" could be a good alternative the package name. Based on the feedback I got, I have made the following changes: (1) A user can now use the functions download, rate, comment, like without time

Re: [R] Packages evd and fExtremes

2013-05-31 Thread David Winsemius
On May 31, 2013, at 4:21 AM, ELIAS Patrick wrote: > Hi > > At first, as a new user of R (why have I been waiting for so long ?), let me > tell you how I highly appreciate this fanstastic free tool! (The enthusiasm > of a new fan?!) > > When recently carrying out an extreme value analysis, I c

Re: [R] empty html pages for R-exts and R-intro

2013-05-31 Thread Prof Brian Ripley
This was a known problem which Kurt Hornik and I solved earlier today. Short version: the (Debian testing Linux) machine which produces them was updated to texinfo 5.1, and that is not compatible with R 3.0.1. This lack of back-compatibility is really rather annoying, and if you meet it, you n

Re: [R] Post-fit survival curve for shared frailty model

2013-05-31 Thread David Winsemius
On May 31, 2013, at 6:01 AM, Ulf Sandvik wrote: > Hi, > > I have fitted a shared frailty model using coxph in the survival > package with 'center' as random effect. Now I'm trying to obtain the > conditional survival curve for a new test case that comes from one of > the specified centers in the

Re: [R] how to install R 3.0.1

2013-05-31 Thread John Kane
Arh, a sloppy copy and paste. Thanks John Kane Kingston ON Canada > -Original Message- > From: maitra.mbox.igno...@inbox.com > Sent: Fri, 31 May 2013 11:59:05 -0500 > To: r-h...@stat.math.ethz.ch > Subject: Re: [R] how to install R 3.0.1 > > Hi John, > > I suspect you may be miss

Re: [R] how to install R 3.0.1

2013-05-31 Thread Ranjan Maitra
Hi John, I suspect you may be missing a c()? On Fri, 31 May 2013 06:05:45 -0800 John Kane wrote: > paks <- install.packages( "Hmisc", "plyr") paks <- install.packages( c("Hmisc", "plyr")) > install.packages(paks) > You can use the command library() to get a list of what is installe

Re: [R] how to install R 3.0.1

2013-05-31 Thread Berend Hasselman
On 31-05-2013, at 18:18, Upananda Pani wrote: > Does it mean the packages are already updated ? > Yes. Unless you got error messages. Try library(…) with one of the packages. Berend __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/

Re: [R] empty html pages for R-exts and R-intro

2013-05-31 Thread David Carlson
Try again. I'm not having any trouble accessing those pages though the help system or directly by pasting the urls into my browser. - David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77840-4352 -Original Message

Re: [R] Returning combine output from R loop

2013-05-31 Thread Abdul Rahman bin Kassim (Dr.)
Dear Kane, Great and thanks for the do.call function. Abd Rahman From: arun [smartpink...@yahoo.com] Sent: Saturday, June 01, 2013 12:23 AM To: Abdul Rahman bin Kassim (Dr.) Cc: R help; John Kane Subject: Re: [R] Returning combine output from R loop Hi, Y

Re: [R] merge_recurse in libray reshape - how does it work?

2013-05-31 Thread stephen sefick
Bert, I have not studied the help in enough depth. My, limited, understanding of recursion comes from the linux command line - e.g., rm -r will remove all files in a folder by descending (probably not the right word) into the folder , removing all of the files, and then removing the folder itself

Re: [R] question about trpaths

2013-05-31 Thread John Kane
This might supply a hint on what to look for. https://stat.ethz.ch/pipermail/r-help/2009-July/204388.html John Kane Kingston ON Canada > -Original Message- > From: ecol...@hotmail.com > Sent: Fri, 31 May 2013 12:06:38 + > To: r-help@r-project.org > Subject: [R] question about trpaths

Re: [R] how to install R 3.0.1

2013-05-31 Thread Upananda Pani
Does it mean the packages are already updated ? On Fri, May 31, 2013 at 9:35 PM, Prof Brian Ripley wrote: > On 31/05/2013 16:53, Upananda Pani wrote: > >> When I am updating packages, I got the following output: >> >> The downloaded binary packages are in >> C:\Users\upani\AppData\Local

Re: [R] empty html pages for R-exts and R-intro

2013-05-31 Thread Marc Schwartz
On May 31, 2013, at 7:50 AM, James F. Reid wrote: > Dear all, > > I've found the html versions of > 'An Introduction to R' [http://cran.r-project.org/doc/manuals/R-exts.html] > 'Writing R Extensions' [http://cran.r-project.org/doc/manuals/R-intro.html > ] > to be empty. Not sure if this intentio

[R] conditional maximum likelihood estimators

2013-05-31 Thread Hong Cai
Dear all, I am a new user of R. I use r to estimate a jump-diffusion AR model. When I calculate the standard error regarding of the parameters, I get negative variance. Could anyone explain why this happen or Could you give me some help to fix it? Attachment is the code. I thank you all in ad

[R] Post-fit survival curve for shared frailty model

2013-05-31 Thread Ulf Sandvik
Hi, I have fitted a shared frailty model using coxph in the survival package with 'center' as random effect. Now I'm trying to obtain the conditional survival curve for a new test case that comes from one of the specified centers in the model. The data set on which the model is fitted contains 10

[R] Packages evd and fExtremes

2013-05-31 Thread ELIAS Patrick
Hi At first, as a new user of R (why have I been waiting for so long ?), let me tell you how I highly appreciate this fanstastic free tool! (The enthusiasm of a new fan?!) When recently carrying out an extreme value analysis, I consumed a lot of time for dealing with the arguments of the qgpd

[R] empty html pages for R-exts and R-intro

2013-05-31 Thread James F. Reid
Dear all, I've found the html versions of 'An Introduction to R' [http://cran.r-project.org/doc/manuals/R-exts.html] 'Writing R Extensions' [http://cran.r-project.org/doc/manuals/R-intro.html ] to be empty. Not sure if this intentional, some transitional state of sort or if it is a genuine bug i

[R] biglm error:

2013-05-31 Thread Kumar Manglam Thakur
Trying to implement a simple regression using biglm package for quite some time. But is feeling frustrated with errors. Please suggest any way around for this error. > formula1 <- IsBadBuy ~ RefId > for (i in chunk(car, by=1000)) + { + if (i[1]==1) + { + message("first chun

[R] question about trpaths

2013-05-31 Thread Marina Chelak
Hello! I try to use Tinn R (latest Version) With Windows 8. Wnen try to send a command, always get the error trpaths[4]. I have configured profilesite, but it doesn’t work at all. Also I set the access to read and write from R folder, anyway, problem remain. Does anyone else usng Tinn-R in

Re: [R] R: Equivalence between lm and glm

2013-05-31 Thread peter dalgaard
On May 31, 2013, at 17:10 , Stefano Sofia wrote: > I find difficult to understand why in > lm(log(Y) ~ X) > Y is assumed lognormal. > I know that if Y ~ N then Z=exp(Y) ~ LN, and that if Y ~ LN then Z=log(Y) ~ N. > In > lm(log(Y) ~ X) > I assume Y ~ N(mu, sigma^2), and then exp(Y) would be distri

Re: [R] how to install R 3.0.1

2013-05-31 Thread Prof Brian Ripley
On 31/05/2013 16:53, Upananda Pani wrote: When I am updating packages, I got the following output: The downloaded binary packages are in C:\Users\upani\AppData\Local\Temp\RtmpmC7A9U\downloaded_packages So What to do after this ? Nothing. These will be removed when you quit R. On

Re: [R] how to install R 3.0.1

2013-05-31 Thread Upananda Pani
When I am updating packages, I got the following output: The downloaded binary packages are in C:\Users\upani\AppData\Local\Temp\RtmpmC7A9U\downloaded_packages So What to do after this ? On Fri, May 31, 2013 at 7:49 PM, Steve Friedman wrote: > Thanks for the clarification. > On May 31,

Re: [R] Returning combine output from R loop

2013-05-31 Thread Abdul Rahman bin Kassim (Dr.)
Dear Kane, Thanks for your response and improve R script. With additional R script below, my question has been resolved. Thanks again for your kind help. b1<-data.frame(a2[1]) b2<-data.frame(a2[2]) b3<-data.frame(a2[3]) bb<-rbind(b1,b2,b3) --- Abd Rahman ___

[R] R: Equivalence between lm and glm

2013-05-31 Thread Stefano Sofia
I find difficult to understand why in lm(log(Y) ~ X) Y is assumed lognormal. I know that if Y ~ N then Z=exp(Y) ~ LN, and that if Y ~ LN then Z=log(Y) ~ N. In lm(log(Y) ~ X) I assume Y ~ N(mu, sigma^2), and then exp(Y) would be distributed by a LN, not l og(Y). Where is my mistake? Moreover, in gl

[R] Error in x[[1]] : subscript out of bounds

2013-05-31 Thread Gary Dong
Dear R users, I am estimating a nested logit model using "mlogit", but keep getting this error message: "Error in x[[1]] : subscript out of bounds" Anyone can tell me what this error means? Simple MNL model worked with the same data. Thank you! Gary [[alternative HTML version deleted

Re: [R] Returning combine output from R loop

2013-05-31 Thread John Kane
One way is to put them in a list. Does this help? a0 <- data.frame(initial_size=sample(30,10),sp=gl(2,5,10), grow=as.numeric(as.character(gl(2,5,10)))*0.5) a2<- list() for( i in 1:3){ a1 <- a0$initial_size+a0$grow a2[[i]] <- cbind(sp=a0$sp,initial_size=a1+i,yr=i) } John Kane Kingsto

Re: [R] chooseCRANmirror

2013-05-31 Thread Prof Brian Ripley
On 31/05/2013 14:59, Duncan Murdoch wrote: On 31/05/2013 9:49 AM, Christian Hoffmann wrote: Obviously, chooseCRANmirror() is run at every start. Can I permanently store my choice with q() and 'yes' ? No, the result is not stored as an object in your global workspace, it is saved by setting

Re: [R] measuring distances between colours?

2013-05-31 Thread Michael Friendly
Hi John This has been an interesting discussion. Though you have a solution for your needs, you might be interested in this javascript implementation that allows you to visually compare color distances in various color spaces http://stevehanov.ca/blog/index.php?id=116 And, all the theory of c

Re: [R] how to install R 3.0.1

2013-05-31 Thread Prof Brian Ripley
On 31/05/2013 14:44, Steve Friedman wrote: You can't. You must copy them to the new installation directory. After that you can use the update package command to check for and install the upgrades packages. Not so if you organized your packages sensibly in a separate library. See http://cran.r

Re: [R] how to install R 3.0.1

2013-05-31 Thread Steve Friedman
Thanks for the clarification. On May 31, 2013 10:19 AM, "Prof Brian Ripley" wrote: > On 31/05/2013 14:44, Steve Friedman wrote: > >> You can't. You must copy them to the new installation directory. After >> that >> you can use the update package command to check for and install the >> upgrades pa

Re: [R] merge_recurse in libray reshape - how does it work?

2013-05-31 Thread Stephen Sefick
Thanks for the help. I think I have it figured out... inside of merge dfs[-1] lops off the first element in the list and merges with dfs[[1]] then this is repeated for the entire list? With Recall inside of a function this process repeats until there are no more objects to merge? many thank

Re: [R] how to install R 3.0.1

2013-05-31 Thread John Kane
There may be a better way but my practice is to simply create a vector of the optional packages that I am using and run an install.packages: Example: paks <- install.packages( "Hmisc", "plyr") install.packages(paks) You can use the command library() to get a list of what is installed

[R] chooseCRANmirror

2013-05-31 Thread Christian Hoffmann
Obviously, chooseCRANmirror() is run at every start. Can I permanently store my choice with q() and 'yes' ? Cheers Christian -- Christian W. Hoffmann, CH - 8915 Hausen am Albis, Switzerland Rigiblickstrasse 15 b, Tel.+41-44-7640853 c-w.hoffm...@sunrise.ch, christ...@echoffmann.ch, www.echoffm

Re: [R] chooseCRANmirror

2013-05-31 Thread Duncan Murdoch
On 31/05/2013 9:49 AM, Christian Hoffmann wrote: Obviously, chooseCRANmirror() is run at every start. Can I permanently store my choice with q() and 'yes' ? No, the result is not stored as an object in your global workspace, it is saved by setting an option to a URL. (See the help page, o

Re: [R] how to install R 3.0.1

2013-05-31 Thread Steve Friedman
You can't. You must copy them to the new installation directory. After that you can use the update package command to check for and install the upgrades packages. On May 31, 2013 9:43 AM, "Upananda Pani" wrote: > Hi John, > > Thanks for your reply .How to Update all the packages ( Which i am alre

Re: [R] how to install R 3.0.1

2013-05-31 Thread Upananda Pani
Hi John, Thanks for your reply .How to Update all the packages ( Which i am already using ) automatically to the new version.? With regards, Upananda On Fri, May 31, 2013 at 7:01 PM, John Kane wrote: > Sorry I misread your post. Just download the 3.0.1 for Windows and > install. You wil

Re: [R] how to install R 3.0.1

2013-05-31 Thread John Kane
Sorry I misread your post. Just download the 3.0.1 for Windows and install. You will need to reinstall any additional packages that you have installed. John Kane Kingston ON Canada > -Original Message- > From: upananda.p...@gmail.com > Sent: Fri, 31 May 2013 18:11:28 +0530 > To: r-hel

Re: [R] how to install R 3.0.1

2013-05-31 Thread Upananda Pani
Hi John, I am using Microsoft Window Vista Service Pack 2. Regards, Upananda On Fri, May 31, 2013 at 6:47 PM, John Kane wrote: > http://www.r-project.org/ and go from there I imagine. > > You did not supply any information about your operating system so it is > difficult to give more detailed

Re: [R] Pooled mean square error for regression

2013-05-31 Thread Adams, Jean
I'm not sure I understand. If you fit an ANCOVA using the lm() function, like this, fit <- lm(Y ~ X*as.factor(batch)) summary(aov(fit)) and the hypothesis for equality of slopes is rejected, i.e., the X:as.factor(batch)) term is significant, then this same model already has batch-specific

Re: [R] how to install R 3.0.1

2013-05-31 Thread John Kane
http://www.r-project.org/ and go from there I imagine. You did not supply any information about your operating system so it is difficult to give more detailed advice. John Kane Kingston ON Canada > -Original Message- > From: upananda.p...@gmail.com > Sent: Fri, 31 May 2013 18:11:28 +05

[R] how to install R 3.0.1

2013-05-31 Thread Upananda Pani
Hi All, I want to switch over from 2.13.1 to 3.0.1. Is it advisable to switch over. I am using Windows Vista. Please suggest me installation procedure as i am not very comfortable in Installing R and If any good documentations can be found, Please send me the link. Thanks and Regards, Upananda

Re: [R] merge without NA last

2013-05-31 Thread arun
library(plyr)  colnames(Y)[2]<- colnames(X)  join(X,Y,type="left",by="k1") #    k1 k2 #1    A  1 #2 NA #3    C  3 #4    B  2 A.K. - Original Message - From: nevil amos To: r-help Cc: Sent: Friday, May 31, 2013 4:07 AM Subject: [R] merge without NA last I am trying to create a merge

Re: [R] counting process in survival

2013-05-31 Thread Terry Therneau
It is hard to know exactly what you mean with such a generic question. If you mean "treat survival as a counting process", then the answer is yes. The survival package in S (which is the direct ancestor of the Splus package, which is the direct ancestor of the R package) was the very first to d

Re: [R] glmx specification of heteroskedasticity (and its use in Heckit)

2013-05-31 Thread Michal Kvasnička
Hallo. Many thanks for your answer. Let me check please that I do understand it correctly. Does it mean that the estimated log-likelyhood function is (in the Gaussian case) sum y * log F(x'b / exp(z'g)) + sum (1 - y) * log(1 - F(x'b / exp(z'g)) where F is standard normal CDF, and the rest is a

[R] Pooled mean square error for regression

2013-05-31 Thread David A.
Hi, I would like to compare two batches of a product over time to see if they behave similarly, i.e same slope and intercept. This is a stability study. I will be performing ANCOVA analysis for this. According to ICH and FDA guidelines, if the test rejects the hypothesis of equality of slopes,

Re: [R] glmx specification of heteroskedasticity (and its use in Heckit)

2013-05-31 Thread Achim Zeileis
On Fri, 31 May 2013, Michal Kvasni?ka wrote: Hallo. First many thanks to its authors for glmx package and hetglm() function especially. It is absolutely great. Glad it is useful for you! Now, let me ask my question: what model of heteroskedasticity hetglm() uses? Is the random part of the G

Re: [R] Mixture of beta distributions

2013-05-31 Thread Achim Zeileis
On Thu, 30 May 2013, Jim Silverton wrote: Hi, I am looking for an R package that can handle a mixture of two beta continuous distributions or a mixture of two beta discrete discrete distributions. The "betareg" package provides a function betamix() for finite mixture models of beta regress

[R] glmx specification of heteroskedasticity (and its use in Heckit)

2013-05-31 Thread Michal Kvasnička
Hallo. First many thanks to its authors for glmx package and hetglm() function especially. It is absolutely great. Now, let me ask my question: what model of heteroskedasticity hetglm() uses? Is the random part of the Gaussian probit model norm(0, sd = exp(X2*beta2)) where norm is the Gau

Re: [R] Returning combine output from R loop

2013-05-31 Thread Abdul Rahman bin Kassim (Dr.)
Dear Mr. Nello, Thank you very much for your prompt reply and solution to my question. I have tried the three options. Need to spend more to understand do.cal function. With best regards, Abd Rahman From: Blaser Nello [nbla...@ispm.unibe.ch] Sent: Frid

Re: [R] merge without NA last

2013-05-31 Thread Milan Bouchet-Valat
Le vendredi 31 mai 2013 à 18:07 +1000, nevil amos a écrit : > I am trying to create a merge where the first value contains NA values. I > wish to retain these in order. however when I use all.x=T and sort=F they > are retained but na values are placed last: > > > X<-data.frame(k1=c("A",NA,"C","B

Re: [R] Returning combine output from R loop

2013-05-31 Thread Blaser Nello
In line with what you are doing now, but saving the intermediate results you could use something like this. a3 <- a0 for( i in 1:3) { a1 <- a0$initial_size+a0$grow a2<- cbind(sp=a0$sp,initial_size=a1+i,yr=i) a3 <- cbind(a3, a2) } a3 However, I would suggest one of the following solutions i

[R] merge without NA last

2013-05-31 Thread nevil amos
I am trying to create a merge where the first value contains NA values. I wish to retain these in order. however when I use all.x=T and sort=F they are retained but na values are placed last: > X<-data.frame(k1=c("A",NA,"C","B")) > print (X) k1 1A 2 3C 4B > Y<-data.frame(k2=c(1,

Re: [R] measuring distances between colours?

2013-05-31 Thread Martin Maechler
> John Fox > on Thu, 30 May 2013 17:14:06 -0400 writes: > Dear all, > My thanks to everyone who addressed my question. I've > incorporated Eik Vettorazzi's suggestion for improved > conversion of hexadecimal RGB colours to decimal numbers, > and Martin Maechler's

Re: [R] measuring distances between colours?

2013-05-31 Thread Martin Maechler
> John Fox > on Thu, 30 May 2013 09:58:18 -0400 writes: > Dear Martin, >> -Original Message- From: Martin Maechler >> [mailto:maech...@stat.math.ethz.ch] Sent: Thursday, May >> 30, 2013 9:18 AM To: John Fox Cc: r-help@r-project.org >> Subject: Re: [R] measu