[R] could not find function Varcov after upgrade of R?
After upgrading R to 2.9.2, I can't use the anova() fuction. It says could not find function Varcov . What's wrong with my computer? Help needed, thanks! Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China [[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.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] could not find function Varcov after upgrade of R?
I uses the Design library. take this example: library(Design) n - 1000 set.seed(731) age - 50 + 12*rnorm(n) label(age) - Age sex - factor(sample(c('Male','Female'), n, rep=TRUE, prob=c(.6, .4))) cens - 15*runif(n) h - .02*exp(.04*(age-50)+.8*(sex=='Female')) dt - -log(runif(n))/h label(dt) - 'Follow-up Time' e - ifelse(dt = cens,1,0) dt - pmin(dt, cens) units(dt) - Year dd - datadist(age, sex) options(datadist='dd') Srv - Surv(dt,e) f - cph(Srv ~ rcs(age,4) + sex, x=TRUE, y=TRUE) cox.zph(f, rank) # tests of PH anova(f) # Error in anova.Design(f) : could not find function Varcov Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China 2009/9/12 Ronggui Huang ronggui.hu...@gmail.com I cannot reproduce the problem you mentioned. ctl - c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt - c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group - gl(2,10,20, labels=c(Ctl,Trt)) weight - c(ctl, trt) anova(lm.D9 - lm(weight ~ group)) sessionInfo() R version 2.9.2 (2009-08-24) i386-pc-mingw32 locale: LC_COLLATE=Chinese (Simplified)_People's Republic of China.936;LC_CTYPE=Chinese (Simplified)_People's Republic of China.936;LC_MONETARY=Chinese (Simplified)_People's Republic of China.936;LC_NUMERIC=C;LC_TIME=Chinese (Simplified)_People's Republic of China.936 attached base packages: [1] stats graphics grDevices utils datasets methods base 2009/9/12 zhu yao mailzhu...@gmail.com: After upgrading R to 2.9.2, I can't use the anova() fuction. It says could not find function Varcov . What's wrong with my computer? Help needed, thanks! Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China [[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.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- HUANG Ronggui, Wincent Doctoral Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html [[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.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] could not find function Varcov after upgrade of R?
On Sep 12, 2009, at 5:24 AM, zhu yao wrote: After upgrading R to 2.9.2, I can't use the anova() fuction. It says could not find function Varcov . What's wrong with my computer? Help needed, thanks! You have not given us very much information but from the naming conventions I would guess that you need to reinstall the Design/Hmisc combination of packages after having updated your R from an an earlier version of R that was different in the second digit. The libraries for the 2.9 series of R versions is stored in a different directory than the 2.8 or 2.7 versions. There is a simple command to the update.packages function that will reinstall updated versions of the packages you had previously installed. My practice, unnecessarily incremental, has been to reinstall each of the packages from scratch. The automatic method would be: update.packages() # which will ask you to confirm eachnpackage # or update.packages(ask=FALSE) # which will not ask -- David Winsemius, MD Heritage Laboratories West Hartford, CT __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] could not find function Varcov after upgrade of R?
I've had the same problem with predict.Design, and have sent an email to the maintainer of the Design package at Vanderbilt University. I wasn't even able to run the examples given on the help page of predict.Design - I received the same error about Varcov that you did. I *think* it's a problem with the package, rather than R 2.9.2, and I hope the problem will soon be fixed. I was able to use predict.Design with 2.9.2 until I updated the Design package a few days ago. david freedman zhu yao wrote: I uses the Design library. take this example: library(Design) n - 1000 set.seed(731) age - 50 + 12*rnorm(n) label(age) - Age sex - factor(sample(c('Male','Female'), n, rep=TRUE, prob=c(.6, .4))) cens - 15*runif(n) h - .02*exp(.04*(age-50)+.8*(sex=='Female')) dt - -log(runif(n))/h label(dt) - 'Follow-up Time' e - ifelse(dt = cens,1,0) dt - pmin(dt, cens) units(dt) - Year dd - datadist(age, sex) options(datadist='dd') Srv - Surv(dt,e) f - cph(Srv ~ rcs(age,4) + sex, x=TRUE, y=TRUE) cox.zph(f, rank) # tests of PH anova(f) # Error in anova.Design(f) : could not find function Varcov Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China 2009/9/12 Ronggui Huang ronggui.hu...@gmail.com I cannot reproduce the problem you mentioned. ctl - c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt - c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group - gl(2,10,20, labels=c(Ctl,Trt)) weight - c(ctl, trt) anova(lm.D9 - lm(weight ~ group)) sessionInfo() R version 2.9.2 (2009-08-24) i386-pc-mingw32 locale: LC_COLLATE=Chinese (Simplified)_People's Republic of China.936;LC_CTYPE=Chinese (Simplified)_People's Republic of China.936;LC_MONETARY=Chinese (Simplified)_People's Republic of China.936;LC_NUMERIC=C;LC_TIME=Chinese (Simplified)_People's Republic of China.936 attached base packages: [1] stats graphics grDevices utils datasets methods base 2009/9/12 zhu yao mailzhu...@gmail.com: After upgrading R to 2.9.2, I can't use the anova() fuction. It says could not find function Varcov . What's wrong with my computer? Help needed, thanks! Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China [[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.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- HUANG Ronggui, Wincent Doctoral Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html [[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.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- View this message in context: http://www.nabble.com/could-not-find-function-%22Varcov%22-after-upgrade-of-R--tp25412881p25414017.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] could not find function Varcov after upgrade of R?
Did you type library(Hmisc,T) before loading Design? Carlos -- From: David Freedman 3.14da...@gmail.com Sent: Saturday, September 12, 2009 8:26 AM To: r-help@r-project.org Subject: Re: [R] could not find function Varcov after upgrade of R? I've had the same problem with predict.Design, and have sent an email to the maintainer of the Design package at Vanderbilt University. I wasn't even able to run the examples given on the help page of predict.Design - I received the same error about Varcov that you did. I *think* it's a problem with the package, rather than R 2.9.2, and I hope the problem will soon be fixed. I was able to use predict.Design with 2.9.2 until I updated the Design package a few days ago. david freedman zhu yao wrote: I uses the Design library. take this example: library(Design) n - 1000 set.seed(731) age - 50 + 12*rnorm(n) label(age) - Age sex - factor(sample(c('Male','Female'), n, rep=TRUE, prob=c(.6, .4))) cens - 15*runif(n) h - .02*exp(.04*(age-50)+.8*(sex=='Female')) dt - -log(runif(n))/h label(dt) - 'Follow-up Time' e - ifelse(dt = cens,1,0) dt - pmin(dt, cens) units(dt) - Year dd - datadist(age, sex) options(datadist='dd') Srv - Surv(dt,e) f - cph(Srv ~ rcs(age,4) + sex, x=TRUE, y=TRUE) cox.zph(f, rank) # tests of PH anova(f) # Error in anova.Design(f) : could not find function Varcov Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China 2009/9/12 Ronggui Huang ronggui.hu...@gmail.com I cannot reproduce the problem you mentioned. ctl - c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt - c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group - gl(2,10,20, labels=c(Ctl,Trt)) weight - c(ctl, trt) anova(lm.D9 - lm(weight ~ group)) sessionInfo() R version 2.9.2 (2009-08-24) i386-pc-mingw32 locale: LC_COLLATE=Chinese (Simplified)_People's Republic of China.936;LC_CTYPE=Chinese (Simplified)_People's Republic of China.936;LC_MONETARY=Chinese (Simplified)_People's Republic of China.936;LC_NUMERIC=C;LC_TIME=Chinese (Simplified)_People's Republic of China.936 attached base packages: [1] stats graphics grDevices utils datasets methods base 2009/9/12 zhu yao mailzhu...@gmail.com: After upgrading R to 2.9.2, I can't use the anova() fuction. It says could not find function Varcov . What's wrong with my computer? Help needed, thanks! Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China [[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.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- HUANG Ronggui, Wincent Doctoral Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html [[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.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- View this message in context: http://www.nabble.com/could-not-find-function-%22Varcov%22-after-upgrade-of-R--tp25412881p25414017.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] could not find function Varcov after upgrade of R?
I am unable to reproduce that problem, either. Have both of you updated both the Design and Hmisc packages? Varcov is in Hmisc. -- David Winsemius On Sep 12, 2009, at 8:26 AM, David Freedman wrote: I've had the same problem with predict.Design, and have sent an email to the maintainer of the Design package at Vanderbilt University. I wasn't even able to run the examples given on the help page of predict.Design - I received the same error about Varcov that you did. I *think* it's a problem with the package, rather than R 2.9.2, and I hope the problem will soon be fixed. I was able to use predict.Design with 2.9.2 until I updated the Design package a few days ago. david freedman zhu yao wrote: I uses the Design library. take this example: library(Design) n - 1000 set.seed(731) age - 50 + 12*rnorm(n) label(age) - Age sex - factor(sample(c('Male','Female'), n, rep=TRUE, prob=c(.6, .4))) cens - 15*runif(n) h - .02*exp(.04*(age-50)+.8*(sex=='Female')) dt - -log(runif(n))/h label(dt) - 'Follow-up Time' e - ifelse(dt = cens,1,0) dt - pmin(dt, cens) units(dt) - Year dd - datadist(age, sex) options(datadist='dd') Srv - Surv(dt,e) f - cph(Srv ~ rcs(age,4) + sex, x=TRUE, y=TRUE) cox.zph(f, rank) # tests of PH anova(f) # Error in anova.Design(f) : could not find function Varcov Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China 2009/9/12 Ronggui Huang ronggui.hu...@gmail.com I cannot reproduce the problem you mentioned. ctl - c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt - c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group - gl(2,10,20, labels=c(Ctl,Trt)) weight - c(ctl, trt) anova(lm.D9 - lm(weight ~ group)) sessionInfo() R version 2.9.2 (2009-08-24) i386-pc-mingw32 locale: LC_COLLATE=Chinese (Simplified)_People's Republic of China.936;LC_CTYPE=Chinese (Simplified)_People's Republic of China.936;LC_MONETARY=Chinese (Simplified)_People's Republic of China.936;LC_NUMERIC=C;LC_TIME=Chinese (Simplified)_People's Republic of China.936 attached base packages: [1] stats graphics grDevices utils datasets methods base 2009/9/12 zhu yao mailzhu...@gmail.com: After upgrading R to 2.9.2, I can't use the anova() fuction. It says could not find function Varcov . What's wrong with my computer? Help needed, thanks! Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China -- HUANG Ronggui, Wincent Doctoral Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html David Winsemius, MD Heritage Laboratories West Hartford, CT __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] could not find function Varcov after upgrade of R?
I apologize for this change in the Hmisc package which breaks the current version of Design in CRAN. Design should be updated by early next week. In the meantime there are two solutions: 1. Install the rms package which is a replacement for Design with better graphics, and note the few changes you would need to make in your code as described in http://biostat.mc.vanderbilt.edu/Rrms (the main change is for plot(fit object)), or 2. Run source('http://biostat.mc.vanderbilt.edu/tmp/Varcov.r') to define the Varcov functions until Design is updated Frank David Freedman wrote: I've had the same problem with predict.Design, and have sent an email to the maintainer of the Design package at Vanderbilt University. I wasn't even able to run the examples given on the help page of predict.Design - I received the same error about Varcov that you did. I *think* it's a problem with the package, rather than R 2.9.2, and I hope the problem will soon be fixed. I was able to use predict.Design with 2.9.2 until I updated the Design package a few days ago. david freedman zhu yao wrote: I uses the Design library. take this example: library(Design) n - 1000 set.seed(731) age - 50 + 12*rnorm(n) label(age) - Age sex - factor(sample(c('Male','Female'), n, rep=TRUE, prob=c(.6, .4))) cens - 15*runif(n) h - .02*exp(.04*(age-50)+.8*(sex=='Female')) dt - -log(runif(n))/h label(dt) - 'Follow-up Time' e - ifelse(dt = cens,1,0) dt - pmin(dt, cens) units(dt) - Year dd - datadist(age, sex) options(datadist='dd') Srv - Surv(dt,e) f - cph(Srv ~ rcs(age,4) + sex, x=TRUE, y=TRUE) cox.zph(f, rank) # tests of PH anova(f) # Error in anova.Design(f) : could not find function Varcov Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China 2009/9/12 Ronggui Huang ronggui.hu...@gmail.com I cannot reproduce the problem you mentioned. ctl - c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt - c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group - gl(2,10,20, labels=c(Ctl,Trt)) weight - c(ctl, trt) anova(lm.D9 - lm(weight ~ group)) sessionInfo() R version 2.9.2 (2009-08-24) i386-pc-mingw32 locale: LC_COLLATE=Chinese (Simplified)_People's Republic of China.936;LC_CTYPE=Chinese (Simplified)_People's Republic of China.936;LC_MONETARY=Chinese (Simplified)_People's Republic of China.936;LC_NUMERIC=C;LC_TIME=Chinese (Simplified)_People's Republic of China.936 attached base packages: [1] stats graphics grDevices utils datasets methods base 2009/9/12 zhu yao mailzhu...@gmail.com: After upgrading R to 2.9.2, I can't use the anova() fuction. It says could not find function Varcov . What's wrong with my computer? Help needed, thanks! Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China [[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.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- HUANG Ronggui, Wincent Doctoral Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] could not find function Varcov after upgrade of R?
Hi Zhu, could not find function Varcov after upgrade of R? Frank Harrell (author of Design) has noted in another thread that Hmisc has changed... The problem is that functions like anova.Design call a function in the _old_ Hmisc package called Varcov.default. In the new version of Hmisc this is called something else (vcov.default). The best way to fix this is to install the new (i.e. current) version of Hmisc and Frank's replacement for his Design package, which is called rms (Regression Modeling Strategies). Regards, Mark. zhu yao wrote: I uses the Design library. take this example: library(Design) n - 1000 set.seed(731) age - 50 + 12*rnorm(n) label(age) - Age sex - factor(sample(c('Male','Female'), n, rep=TRUE, prob=c(.6, .4))) cens - 15*runif(n) h - .02*exp(.04*(age-50)+.8*(sex=='Female')) dt - -log(runif(n))/h label(dt) - 'Follow-up Time' e - ifelse(dt = cens,1,0) dt - pmin(dt, cens) units(dt) - Year dd - datadist(age, sex) options(datadist='dd') Srv - Surv(dt,e) f - cph(Srv ~ rcs(age,4) + sex, x=TRUE, y=TRUE) cox.zph(f, rank) # tests of PH anova(f) # Error in anova.Design(f) : could not find function Varcov Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China 2009/9/12 Ronggui Huang ronggui.hu...@gmail.com I cannot reproduce the problem you mentioned. ctl - c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt - c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group - gl(2,10,20, labels=c(Ctl,Trt)) weight - c(ctl, trt) anova(lm.D9 - lm(weight ~ group)) sessionInfo() R version 2.9.2 (2009-08-24) i386-pc-mingw32 locale: LC_COLLATE=Chinese (Simplified)_People's Republic of China.936;LC_CTYPE=Chinese (Simplified)_People's Republic of China.936;LC_MONETARY=Chinese (Simplified)_People's Republic of China.936;LC_NUMERIC=C;LC_TIME=Chinese (Simplified)_People's Republic of China.936 attached base packages: [1] stats graphics grDevices utils datasets methods base 2009/9/12 zhu yao mailzhu...@gmail.com: After upgrading R to 2.9.2, I can't use the anova() fuction. It says could not find function Varcov . What's wrong with my computer? Help needed, thanks! Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China [[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.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- HUANG Ronggui, Wincent Doctoral Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html [[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.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- View this message in context: http://www.nabble.com/could-not-find-function-%22Varcov%22-after-upgrade-of-R--tp25412881p25414257.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] could not find function Varcov after upgrade of R?
Thanks for the reminder - actually I think I've become sloppy about the 'T' (and the order of loading the Hmisc and Design packages), but that doesn't seem to be the problem. Also, all of my packages have been updated david Carlos Alzola wrote: Did you type library(Hmisc,T) before loading Design? Carlos -- From: David Freedman 3.14da...@gmail.com Sent: Saturday, September 12, 2009 8:26 AM To: r-help@r-project.org Subject: Re: [R] could not find function Varcov after upgrade of R? I've had the same problem with predict.Design, and have sent an email to the maintainer of the Design package at Vanderbilt University. I wasn't even able to run the examples given on the help page of predict.Design - I received the same error about Varcov that you did. I *think* it's a problem with the package, rather than R 2.9.2, and I hope the problem will soon be fixed. I was able to use predict.Design with 2.9.2 until I updated the Design package a few days ago. david freedman zhu yao wrote: I uses the Design library. take this example: library(Design) n - 1000 set.seed(731) age - 50 + 12*rnorm(n) label(age) - Age sex - factor(sample(c('Male','Female'), n, rep=TRUE, prob=c(.6, .4))) cens - 15*runif(n) h - .02*exp(.04*(age-50)+.8*(sex=='Female')) dt - -log(runif(n))/h label(dt) - 'Follow-up Time' e - ifelse(dt = cens,1,0) dt - pmin(dt, cens) units(dt) - Year dd - datadist(age, sex) options(datadist='dd') Srv - Surv(dt,e) f - cph(Srv ~ rcs(age,4) + sex, x=TRUE, y=TRUE) cox.zph(f, rank) # tests of PH anova(f) # Error in anova.Design(f) : could not find function Varcov Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China 2009/9/12 Ronggui Huang ronggui.hu...@gmail.com I cannot reproduce the problem you mentioned. ctl - c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt - c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group - gl(2,10,20, labels=c(Ctl,Trt)) weight - c(ctl, trt) anova(lm.D9 - lm(weight ~ group)) sessionInfo() R version 2.9.2 (2009-08-24) i386-pc-mingw32 locale: LC_COLLATE=Chinese (Simplified)_People's Republic of China.936;LC_CTYPE=Chinese (Simplified)_People's Republic of China.936;LC_MONETARY=Chinese (Simplified)_People's Republic of China.936;LC_NUMERIC=C;LC_TIME=Chinese (Simplified)_People's Republic of China.936 attached base packages: [1] stats graphics grDevices utils datasets methods base 2009/9/12 zhu yao mailzhu...@gmail.com: After upgrading R to 2.9.2, I can't use the anova() fuction. It says could not find function Varcov . What's wrong with my computer? Help needed, thanks! Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China [[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.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- HUANG Ronggui, Wincent Doctoral Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html [[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.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- View this message in context: http://www.nabble.com/could-not-find-function-%22Varcov%22-after-upgrade-of-R--tp25412881p25414017.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- View this message in context: http://www.nabble.com/could-not-find-function-%22Varcov%22-after-upgrade-of-R--tp25412881p25416444.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] could not find function Varcov after upgrade of R?
David Freedman wrote: Thanks for the reminder - actually I think I've become sloppy about the 'T' (and the order of loading the Hmisc and Design packages), but that doesn't seem to be the problem. Also, all of my packages have been updated Note that Frank Harrell already answered that there is a Hmisc - Design issue which will be fixed early next week. You had the unfortune to be too up to date and got the bug that was introduced very recently (and most people who answered had not so recent packages). Uwe Ligges david Carlos Alzola wrote: Did you type library(Hmisc,T) before loading Design? Carlos -- From: David Freedman 3.14da...@gmail.com Sent: Saturday, September 12, 2009 8:26 AM To: r-help@r-project.org Subject: Re: [R] could not find function Varcov after upgrade of R? I've had the same problem with predict.Design, and have sent an email to the maintainer of the Design package at Vanderbilt University. I wasn't even able to run the examples given on the help page of predict.Design - I received the same error about Varcov that you did. I *think* it's a problem with the package, rather than R 2.9.2, and I hope the problem will soon be fixed. I was able to use predict.Design with 2.9.2 until I updated the Design package a few days ago. david freedman zhu yao wrote: I uses the Design library. take this example: library(Design) n - 1000 set.seed(731) age - 50 + 12*rnorm(n) label(age) - Age sex - factor(sample(c('Male','Female'), n, rep=TRUE, prob=c(.6, .4))) cens - 15*runif(n) h - .02*exp(.04*(age-50)+.8*(sex=='Female')) dt - -log(runif(n))/h label(dt) - 'Follow-up Time' e - ifelse(dt = cens,1,0) dt - pmin(dt, cens) units(dt) - Year dd - datadist(age, sex) options(datadist='dd') Srv - Surv(dt,e) f - cph(Srv ~ rcs(age,4) + sex, x=TRUE, y=TRUE) cox.zph(f, rank) # tests of PH anova(f) # Error in anova.Design(f) : could not find function Varcov Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China 2009/9/12 Ronggui Huang ronggui.hu...@gmail.com I cannot reproduce the problem you mentioned. ctl - c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt - c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group - gl(2,10,20, labels=c(Ctl,Trt)) weight - c(ctl, trt) anova(lm.D9 - lm(weight ~ group)) sessionInfo() R version 2.9.2 (2009-08-24) i386-pc-mingw32 locale: LC_COLLATE=Chinese (Simplified)_People's Republic of China.936;LC_CTYPE=Chinese (Simplified)_People's Republic of China.936;LC_MONETARY=Chinese (Simplified)_People's Republic of China.936;LC_NUMERIC=C;LC_TIME=Chinese (Simplified)_People's Republic of China.936 attached base packages: [1] stats graphics grDevices utils datasets methods base 2009/9/12 zhu yao mailzhu...@gmail.com: After upgrading R to 2.9.2, I can't use the anova() fuction. It says could not find function Varcov . What's wrong with my computer? Help needed, thanks! Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China [[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.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- HUANG Ronggui, Wincent Doctoral Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html [[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.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- View this message in context: http://www.nabble.com/could-not-find-function-%22Varcov%22-after-upgrade-of-R--tp25412881p25414017.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.