Re: [R] Upgrade R?

2011-11-14 Thread Uwe Ligges
On 14.11.2011 22:42, Gene Leynes wrote: I have had similar problems. I have several installations of R and now I have no control over which one opens when I try opening a RData file. The RGUI is registered more than once, but they all have the exact same appearance in the "choose programs" menu

Re: [R] Upgrade R?

2011-11-14 Thread Bert Gunter
Haven't followed this thread, but... 1) IF you are on WIndows and 2) IF you like to open R and load .Rdata files by double clicking on the files THEN if you right click on the file, the "Open With" dialog allows you to browse to_particular_ RGui (presumably the latest) you wish to use and there i

Re: [R] changelog for MASS?

2011-11-14 Thread Xu Wang
Thanks Michael, But I can't see the dates on the NEWS so I have no idea what changed from last version or from whichever version we actually have installed. Do you see what I mean? Thanks, Xu -- View this message in context: http://r.789695.n4.nabble.com/changelog-for-MASS-tp4034473p4040941.ht

Re: [R] optim seems to be finding a local minimum

2011-11-14 Thread Dimitri Liakhovitski
Just to provide some closure: I ended up dividing the IV by its max so that the input vector (IV) is now between zero and one. I still used optim: myopt <- optim(fn=myfunc, par=c(1,1), method="L-BFGS-B", lower=c(0,0)) I was able to get great fit, in 3 cases out of 10 I've beaten Excel Solver, but

[R] gsDesign

2011-11-14 Thread Dongli Zhou
I'm trying to use gsDesign for a noninferiority trial with binary endpoint. Did anyone know how to specify the trial with different sample sizes for two treatment groups? Thanks in advance! [[alternative HTML version deleted]] __ R-help@r-proje

Re: [R] Removing or ignoring package version for generic function in locked environment

2011-11-14 Thread Oliver Mannion (COMPASS)
Thanks Joshua for your prompt reply, and my apologies for my much delayed one. I've only just been able to come back to this. I need the epicalc package for the pyramid function, and so it seems I do have to load the package. I've contacted the package maintainer but in the meantime I've taken

[R] Subset of a subset?

2011-11-14 Thread jck13
Hi All- I have created a subset of my original csv for the times I am interested in (9, 12, 3). I have a subset for all of those times then each individually. I would like to have specific case studies to analyze individually for those times. For example, I want to look at 2009/06/01-2009/06/10. I

Re: [R] Upgrade R?

2011-11-14 Thread Cem Girit
Hello all, I received many emails to my post on this issue. None of the answers were able to resolve all the issues experienced by many but helped me to understand the issues. . But consıderıng the avaılable OSs to install on, many packages to install, and the fact that R is a product of o

Re: [R] gsDesign

2011-11-14 Thread Marc Schwartz
On Nov 14, 2011, at 4:11 PM, Dongli Zhou wrote: > I'm trying to use gsDesign for a noninferiority trial with binary > endpoint. Did anyone know how to specify the trial with different sample > sizes for two treatment groups? Thanks in advance! Hi, Presuming that you are using the nBinomial() fu

Re: [R] Adding units to levelplot's colorkey

2011-11-14 Thread Dennis Murphy
You don't show code or a reproducible example, so I guess you want a general answer. Use the draw.colorkey() function inside the levelplot() call. It takes an argument key =, which accepts a list of arguments, including space, col, at, labels, tick.number, width and height (see p. 155 of the Lattic

[R] Checkinstall and R-2.14.0

2011-11-14 Thread Andrej Kastrin
Dear all, I try to install the latest R version using checkinstall (v. 1.6.2) on Ubuntu 11.10. After solving all the dependencies (installed using apt-get build-dep r-base) checkinstall fails to build and install R package with the following error (the same commands build and install R-2.13.2

Re: [R] Checkinstall and R-2.14.0

2011-11-14 Thread Rich Shepard
On Tue, 15 Nov 2011, Andrej Kastrin wrote: I try to install the latest R version using checkinstall (v. 1.6.2) on Ubuntu 11.10. mkdir: cannot create directory `/usr/local/share/man': No such file or directory Andrej, This usually means that you don't have write permissions for that direc

Re: [R] Subset of a subset?

2011-11-14 Thread R. Michael Weylandt
You haven't really said much about your overall project, but if you are subsetting by time, it seems like you might want to use the xts time series class. It implements ISO8601 for quick subsetting, which seems perfect for what you are doing. Here's a made up example: X = xts(cumsum(rnorm(1e4)),

Re: [R] Upgrade R?

2011-11-14 Thread Duncan Murdoch
On 14/11/2011 5:42 PM, Cem Girit wrote: Hello all, I received many emails to my post on this issue. None of the answers were able to resolve all the issues experienced by many but helped me to understand the issues. . But consıderıng the avaılable OSs to install on, many packages to inst

Re: [R] gsub help

2011-11-14 Thread Sarah Goslee
Hi, On Mon, Nov 14, 2011 at 7:59 PM, Debs Majumdar wrote: > Hi, > >  I am working with the following list of files: > > [1] "study_chr1.one.phased.impute2.chunk1" > [2] "study_chr1.one.phased.impute2.chunk1_info" > [3] "study_chr1.one.phased.impute2.chunk1_info_by_sample" > [4] "study_chr1.one.ph

[R] Sweave and accented letters

2011-11-14 Thread Giuseppe
I often use Lyx/Sweave and I typically write in english. Today I had to write a document in Italian and, as many of you know, many italian popular words use è, ù, é. ò, etc. I discovered that if I type in Italian (that is there is at least one letter with accent) with the Sweave module selected

[R] gsub help

2011-11-14 Thread Debs Majumdar
Hi,  I am working with the following list of files: [1] "study_chr1.one.phased.impute2.chunk1"   [2] "study_chr1.one.phased.impute2.chunk1_info"  [3] "study_chr1.one.phased.impute2.chunk1_info_by_sample" [4] "study_chr1.one.phased.impute2.chunk1_summary"   [5] "study_ch

Re: [R] optim seems to be finding a local minimum

2011-11-14 Thread Kevin Wright
Actually, Interval Analysis can be used to find _all_ optima (including the global optimum) within a starting box. It's not particularly well-known in statistical circles. See this (for example): http://bib.tiera.ru/ShiZ/math/other/Global%20Optimization%20Using%20Interval%20Analysis%20-%20E.%20H

[R] Problem creating reference manuals from latex

2011-11-14 Thread Tyler Rinker
R Community, I often am in need of viewing the reference manuals of packages and do not have Internet access. I have used the code: path <- find.package('tm') system(paste(shQuote(file.path(R.home("bin"), "R")),"CMD", "Rd2pdf",shQuote(path))) someone kindly provided from this help list to

Re: [R] Problem creating reference manuals from latex

2011-11-14 Thread Duncan Murdoch
On 11-11-14 9:44 PM, Tyler Rinker wrote: R Community, I often am in need of viewing the reference manuals of packages and do not have Internet access. I have used the code: path<- find.package('tm') system(paste(shQuote(file.path(R.home("bin"), "R")),"CMD", "Rd2pdf",shQuote(path))) someone

Re: [R] Problem creating reference manuals from latex

2011-11-14 Thread Gabor Grothendieck
On Mon, Nov 14, 2011 at 9:44 PM, Tyler Rinker wrote: > > R Community, > > I often am in need of viewing the reference manuals of packages and do not > have Internet access.  I have used the code: > > path <- find.package('tm') > system(paste(shQuote(file.path(R.home("bin"), "R")),"CMD", > "Rd2pd

[R] Remove names and more from list with capture.output()

2011-11-14 Thread Sverre Stausland
Hi R users, I end up with a list object after running an anova: > lm(speed ~ 1 + dist + speed:dist, data = cars) -> Int > lm(speed ~ 1 + dist, data = cars) -> NoInt > anova(Int, NoInt) -> test > test <- test[c("Df", "F", "Pr(>F)")][2,] > is.list(test) [1] TRUE > test Df FPr(>F) 2 -1 18

Re: [R] gsDesign

2011-11-14 Thread Dongli Zhou
Hi, Marc, Thank you very much for the reply. I'm using the gsDesign function to create an object of type gsDesign. But the inputs do not include the 'ratio' argument. Dongli On Nov 14, 2011, at 5:50 PM, Marc Schwartz wrote: > On Nov 14, 2011, at 4:11 PM, Dongli Zhou wrote: > >> I'm trying t

[R] mapply then export

2011-11-14 Thread RisConfusingMe
To use the gauss.quad function: gauss.quad(n,type) which returns two lists $nodes and $weights whose length will each equal n. I'd like to do this for n=1 to 40 (type will not change) and have a dataset with 40 rows and 81 columns with all the nodes and weights. The first record would have N1 a

Re: [R] Adding units to levelplot's colorkey

2011-11-14 Thread Carlisle Thacker
Thanks, Dennis. Yes, I can do that, but that locks the physical units to locations of the labels. I had hoped that there might be something a bit more flexible, like a subtitle or more general text. Carlisle On 11/14/11 6:03 PM, Dennis Murphy wrote: You don't show code or a reproducible exam

[R] Colored output in terminal emulator

2011-11-14 Thread Jakson Alves de Aquino
Hi, I wrote a small patch to make it possible to get colored output from R running in a Linux terminal emulator. It's a dirty patch. I hope that someone with better knowledge of R source code and C programming will improve it. To force the use of Rstd_WriteConsoleEx function (src/unix/sys-std.c) I

Re: [R] Problem creating reference manuals from latex

2011-11-14 Thread Tyler Rinker
Duncan, Thank you for your reply. I was not clear about the Internet access. I do have access, just at times I don't, hence the need to produce the manuals from latex rather than simply using the Internet. Please pardon my lack of knowledge around your response. You said I'd have to inst

[R] Question about linear regression in R

2011-11-14 Thread Miles Yang
Hi all, I wrote a r program as below: x <- 1:10 y <- c(3,3,3,3,3,3,3,3,3,3) fit <- lm(log(y) ~ x) summary(fit) And I expect to get some error message from R, because "y" is constant. But, I got the message as below: > summary(fit) Call: lm(formula = log(y) ~ x) Residuals: Min 1

[R] Remove thw data from the dataframe

2011-11-14 Thread arunkumar1111
Hi, I want to remove the entire row from the dataset if any of the row contains blank or NA my dataset look like State YearY X2 X3 X4 X5 X6 State1 196027.8397.5 42.250.778.365.8 State2 196029.9413.3 38.152 79.266.9

Re: [R] Sweave and accented letters

2011-11-14 Thread Rolf Turner
On 15/11/11 14:21, Giuseppe wrote: I often use Lyx/Sweave and I typically write in english. Today I had to write a document in Italian and, as many of you know, many italian popular words use è, ù, é. ò, etc. Note that you can render these in LaTex as \`{e}, \`{u}, \'{e}, and \`{o}, respective

Re: [R] Remove thw data from the dataframe

2011-11-14 Thread R. Michael Weylandt
I'm not aware of a way that one can have "blank" data.frame elements in Rsomething about this seems mighty suspicious... For the NA's, if you wish to omit them, I might suggest na.omit() I don't know if you've seen this, but you should have a look at the apropos() command. Very helpful Micha

Re: [R] Sweave and accented letters

2011-11-14 Thread Yihui Xie
It might be better to post it to the LyX mailing list (lyx-us...@lists.lyx.org) since you are using LyX. Anyway, the problem came from Sweave: you did not tell us your R version, and I suppose you are using the latest version of R (2.14.0). There are two ways of telling Sweave your UTF8 encoding (s

Re: [R] Question about linear regression in R

2011-11-14 Thread R. Michael Weylandt
What exactly is it that's worrying you? It's a problematic regression for a few reasons, but ultimately it seems pretty ok, though I'd be ever so slightly worried about the R^2 value being misinterpreted. Michael On Mon, Nov 14, 2011 at 10:49 PM, Miles Yang wrote: > Hi all, > I wrote a r program

Re: [R] Remove names and more from list with capture.output()

2011-11-14 Thread R. Michael Weylandt
The easiest thing is almost certainly going to be to redefine print.aov as desired. You can get it at by typing stats:::print.aov. Copy the code edit and then reassign it to print.aov in the global environment and voila! Michael On Mon, Nov 14, 2011 at 11:49 PM, Sverre Stausland wrote: > Hi R us

Re: [R] mapply then export

2011-11-14 Thread R. Michael Weylandt
Perhaps something like: sapply(1:40, function(n) c(gauss.quad(n)$nodes, rep(NA, 40-n))) sapply(1:40, function(n) c(gauss.quad(n)$weights, rep(NA, 40-n))) You'll have to decide how you want the records combined but this should get you going in the right direction Michael PS -- it's polite to say

Re: [R] Checkinstall and R-2.14.0

2011-11-14 Thread Andrej
Thanks for reply, tried as sudo, but error still persist. Andrej __ 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, minima

[R] getting R2 (goodness of fit) result after using biglm()

2011-11-14 Thread sean st.clair
Hello. I had been struggling with running linear regression using lm() primarily because my data has a few categorical variables with at least a thousand levels. I tried the biglm() function and it worked. My problem now is that i don't know how to get the R2 results. Could someone help? Thank

Re: [R] What is the CADF test criterion="BIC" report?

2011-11-14 Thread p99323005
Hello Bernhard: Thank you for your kindly help. Actually, I have tried to read the source code, but I can not understand it clearly. But with your recommendation, I do think you are right. I guess, when I use the criterion of "BIC" in CADFtest, I set the max.lag.y=14. It seems to reduce t

Re: [R] max & min values within dataframe

2011-11-14 Thread B Laura
Thanks for these various tips. Sarah, this is not a howework, but a simplified dataset speecificly for this question. Laura . 2011/11/14 Dennis Murphy > Groupwise data summarization is a very common task, and it is worth > learning the various ways to do it in R. Josh showed you one way to > u

Re: [R] getting R2 (goodness of fit) result after using biglm()

2011-11-14 Thread Tal Galili
Hello Sean, It appears that you can fetch it using: summary(a)$rsq Full code: require(biglm) data(trees) ff<-log(Volume)~log(Girth)+log(Height) a <- biglm(ff,trees) summary(a)$rsq summary(lm(ff,trees))$r.squared # we get the same result To see how it is computed, have a look at: getAnywhere

<    1   2