[Rd] R CMD problem on windows XP (PR#8031)
I get this on windows XP, rw2011, precompiled from CRAN: C:\R\rw2011\src\gnuwin32>R CMD build -- binary ./../library/tseriesChaos R CMD build -- binary ./../library/tseriesChaos * checking for file 'binary/DESCRIPTION' ... NO and there it stopped, while the following works: C:\R\rw2011\src\gnuwin32>Rcmd build --binary ./../library/tseriesChaos Rcmd build --binary ./../library/tseriesChaos * checking for file './../library/tseriesChaos/DESCRIPTION' ... OK * preparing './../library/tseriesChaos': * checking DESCRIPTION meta-information ... OK * cleaning src * removing junk and everyrhing runs to completion. Kjetil -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra -- No virus found in this outgoing message. Checked by AVG Anti-Virus. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] new.packages --- wishlist (PR#8239)
new.packages() misses a destdir argument as in update.packages() and install.packages(). Adding this new argument is very little work, so please do it! Kjetil -- __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] prod(numeric(0)) surprise
But this thread seems to have pointed to some inconsistencies: > cumprod( numeric(0) ) numeric(0) > cumsum( numeric(0) ) numeric(0) shouldn't this give the same as prod() and sum() in this case? Same with cummin() and cummax(). Kjetil On 1/9/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > > On 1/9/2006 12:40 PM, Martin Morgan wrote: > > I'm a little confused. I understand that numeric(0) means an empty > > numeric vector, not the number 0 expressed as numeric. As it is now, > > prod(numeric(0)) generates something -- a vector of length 1 > > containing the number 1 -- from nothing. I would have expected > > > > prod(numeric(0)) ==> numeric(0) > > > > this is consistent with > > > > numeric(0) ==> numeric(0) > > numeric(0) * 1 ==> numeric(0) > > cumprod(numeric(0)) ==> numeric(0) > > > > and, because concatenation occus before function evaluation, > > > > prod(c(numeric(0),1)) ==> prod( c(1) ) ==> 1 > > > > I would expect sum() to behave the same way, e.g., sum(numeric(0)) ==> > > numeric(0). From below, > > > > I think the code below works as I'd expect. Would you really like the > last answer to be numeric(0)? > > > x <- 1:10 > > sum(x) > [1] 55 > > sum(x[x>5]) > [1] 40 > > sum(x[x>10]) > [1] 0 > > Duncan Murdoch > > >> >>>> consider exp(sum(log(numeric(0 ... ?) > >> >> > >> >> That's a fairly standard mathematical convention, which > >> >> is presumably why sum and prod work that way. > >> >> > >> >> Duncan Murdoch > > > > I would have expected numeric(0) as the result (numeric(0) is the > > result from log(numeric(0)), etc). > > > > Martin (Morgan) > > > > > > Martin Maechler <[EMAIL PROTECTED]> writes: > > > >>>>>>> "Ben" == Ben Bolker <[EMAIL PROTECTED]> > >>>>>>> on Sun, 08 Jan 2006 21:40:05 -0500 writes: > >> > >> Ben> Duncan Murdoch wrote: > >> >> On 1/8/2006 9:24 PM, Ben Bolker wrote: > >> >> > >> >>> It surprised me that prod(numeric(0)) is 1. I guess if > >> >>> you say (operation(nothing) == identity element) this > >> >>> makes sense, but ?? > >> >> > >> >> > >> >> What value were you expecting, or were you expecting an > >> >> error? I can't think how any other value could be > >> >> justified, and throwing an error would make a lot of > >> >> formulas more complicated. > >> >> > >> >>> > >> >> > >> >>>> consider exp(sum(log(numeric(0 ... ?) > >> >> > >> >> That's a fairly standard mathematical convention, which > >> >> is presumably why sum and prod work that way. > >> >> > >> >> Duncan Murdoch > >> > >> Ben>OK. I guess I was expecting NaN/NA (as opposed to > >> Ben> an error), but I take the "this makes everything else > >> Ben> more complicated" point. Should this be documented or > >> Ben> is it just too obvious ... ? (Funny -- I'm willing to > >> Ben> take gamma(1)==1 without any argument or suggestion > >> Ben> that it should be documented ...) > >> > >> see? so it looks to me as if you have finally convinced > >> yourself that '1' is the most reasonable result.. ;-) > >> > >> Anyway, I've added a sentence to help(prod) {which matches > >> the sentence in help(sum), BTW}. > >> > >> Martin > >> > >> __ > >> R-devel@r-project.org mailing list > >> https://stat.ethz.ch/mailman/listinfo/r-devel > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] proposed change to 'sample'
On Mon, Jun 21, 2010 at 1:57 AM, Peter Dalgaard wrote: > Hadley Wickham wrote: >>> I would be more inclined to make sampling from a vector the normal case, >>> and default x to say 1:max(n, size), forcing users to say sample(n=5) if >>> sampling from x=1:5 is desired. This could be a manageable change; the >>> deprecation sequence is a bit painful to think through, though. >> >> Don't we already have sample.int for that case? >> >> Hadley >> > > For the 2nd case, yes, but I was aiming at getting sample(x) == > x[sample.int(length(x))] also in the length 1 case, removing the > ambiguity. This would obviously break some code, but I'd expect not all > that much. However, it cannot be changed in one go, we'd need to go > through a sequence where we (e.g.) > > 1. warn about length(x)==1 > 2. say that length(x)==1 is deprecated > 3. have length(x)==1 throw an error > 4. wait > 5. give length(x)==1 a new meaning > Please implement this sequence! Kjetil > -- > Peter Dalgaard > Center for Statistics, Copenhagen Business School > Phone: (+45)38153501 > Email: pd@cbs.dk Priv: pda...@gmail.com > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Looks like a bug in subsetting of a complicated object
I don't understand what is happening! I have a (large) object sim1, an matrix list with dim c(101,101) where each element is an 3*3 matrix. I am subsetting that with a matrix coo, of dim c(100,2), of unique indices, but the resulting object has length 99, not 100 as expected. Code reproducing the problem follows: library(RandomFields) set.seed(123) sim0 <- GaussRF(x=seq(0, 100, by=1), y=seq(0, 100, by=1), grid=TRUE, model="spherical", param=c(0, 1, 0, 10), trend=NULL, n=9, gridtriple=FALSE) simmatrices <- function(arr) # arr must be an array of rank 3 { d <- dim(arr) n1 <- d[1]; n2 <- d[2] # we suppose d[3]==9 res <- vector(length=n1*n2, mode="list") dim(res) <- c(n1, n2) for (i in 1:n1) for (j in 1:n2) { x1 <- arr[i, j, 1:3];x2 <- arr[i, j, 4:6] x3 <- arr[i, j, 7:9] res[[i, j]] <- x1%o%x1 + x2%o%x2 + x3%o%x3 } res } sim1 <- simmatrices(sim0) set.seed(234) x <- sample(seq(0, 100, by=1), 101, replace=TRUE) y <- sample(seq(0, 100, by=1), 101, replace=TRUE) coo <- cbind(x=x, y=y) coo <- unique(coo) sim1.obs <- sim1[coo] dim(coo) length(sim1.obs) > sessionInfo() R version 2.11.1 (2010-05-31) i686-pc-linux-gnu locale: [1] LC_CTYPE=en_US.utf8 LC_NUMERIC=C [3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8 [5] LC_MONETARY=C LC_MESSAGES=en_US.utf8 [7] LC_PAPER=en_US.utf8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] lattice_0.18-8 gstat_0.9-69sp_0.9-66 [4] RandomFields_1.3.41 loaded via a namespace (and not attached): [1] fortunes_1.3-7 grid_2.11.1tools_2.11.1 > Kjetil __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] problem building R from svn repo
Hola! I just changed my laptop to debian squeeze, downloaded R devel from svn repo, as described in the manual. Then I configured for building in a separate build dir with: kje...@kjetil:~/R/Rbuilddir$ sudo ../svn/configure --- which succeeded, with: R is now configured for x86_64-unknown-linux-gnu Source directory: ../svn Installation directory:/usr/local C compiler:gcc -std=gnu99 -g -O2 Fortran 77 compiler: gfortran -g -O C++ compiler: g++ -g -O2 Fortran 90/95 compiler:gfortran -g -O Obj-C compiler: Interfaces supported: X11 External libraries:readline, ICU Additional capabilities: NLS Options enabled: shared BLAS, R profiling, Java Recommended packages: yes Then sudo make stops near the end with: writing package indices make[3]: Entering directory `/home/kjetil/R/Rbuilddir/src/library' make[3]: Leaving directory `/home/kjetil/R/Rbuilddir/src/library' make[2]: Leaving directory `/home/kjetil/R/Rbuilddir/src/library' make[1]: Leaving directory `/home/kjetil/R/Rbuilddir/src/library' make[1]: Entering directory `/home/kjetil/R/Rbuilddir/src/library/Recommended' make[2]: Entering directory `/home/kjetil/R/Rbuilddir/src/library/Recommended' make[2]: *** No rule to make target `MASS.ts', needed by `stamp-recommended'. Stop. make[2]: Leaving directory `/home/kjetil/R/Rbuilddir/src/library/Recommended' make[1]: *** [recommended-packages] Error 2 make[1]: Leaving directory `/home/kjetil/R/Rbuilddir/src/library/Recommended' make: *** [stamp-recommended] Error 2 --- not able to make the time-stamps! Kjetil __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] problem building R from svn repo
see below. On Sat, Nov 13, 2010 at 10:18 PM, Kasper Daniel Hansen wrote: > Before make'ing you need to get the recommended packages. I do (with > your paths) > ../svn/tools/sync-recommended > ../svn/tools/sync-recommended > I did install the recommended packages. > You should not run configure or make with sudo. If you need to > install system-wide, you only need to run make install under sudo, > like > ./configure > make > sudo make install I thougt so, and did so first. But that generated other errors!, which was killed by using sudo. kjetil > > Kasper > > On Sat, Nov 13, 2010 at 6:25 PM, Kjetil Halvorsen > wrote: >> Hola! >> >> I just changed my laptop to debian squeeze, >> downloaded R devel from svn repo, as described in the manual. >> >> Then I configured for building in a separate build dir with: >> >> kje...@kjetil:~/R/Rbuilddir$ sudo ../svn/configure >> >> --- which succeeded, with: >> >> R is now configured for x86_64-unknown-linux-gnu >> >> Source directory: ../svn >> Installation directory: /usr/local >> >> C compiler: gcc -std=gnu99 -g -O2 >> Fortran 77 compiler: gfortran -g -O >> >> C++ compiler: g++ -g -O2 >> Fortran 90/95 compiler: gfortran -g -O >> Obj-C compiler: >> >> Interfaces supported: X11 >> External libraries: readline, ICU >> Additional capabilities: NLS >> Options enabled: shared BLAS, R profiling, Java >> >> Recommended packages: yes >> >> Then >> sudo make >> >> stops near the end with: >> >> writing package indices >> make[3]: Entering directory `/home/kjetil/R/Rbuilddir/src/library' >> make[3]: Leaving directory `/home/kjetil/R/Rbuilddir/src/library' >> make[2]: Leaving directory `/home/kjetil/R/Rbuilddir/src/library' >> make[1]: Leaving directory `/home/kjetil/R/Rbuilddir/src/library' >> make[1]: Entering directory >> `/home/kjetil/R/Rbuilddir/src/library/Recommended' >> make[2]: Entering directory >> `/home/kjetil/R/Rbuilddir/src/library/Recommended' >> make[2]: *** No rule to make target `MASS.ts', needed by >> `stamp-recommended'. Stop. >> make[2]: Leaving directory `/home/kjetil/R/Rbuilddir/src/library/Recommended' >> make[1]: *** [recommended-packages] Error 2 >> make[1]: Leaving directory `/home/kjetil/R/Rbuilddir/src/library/Recommended' >> make: *** [stamp-recommended] Error 2 >> >> --- not able to make the time-stamps! >> >> Kjetil >> >> __ >> R-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] proposal for new flag to R CMD INSTALL
For the purpose of helping in installing only parts of a package (in my case, the help system), R CMD INSTALL should accept a flag --no-check-deps Below is a diff for R-devel, svn revision53672 kje...@kjetil:~/R/R-devel/src/library/tools/R$ diff install.R.old install.R 116a117 > " --no-check-deps skip test if installed > depends/imports", 506c507 < if (length(miss) > 1) --- > if ((length(miss) > 1) && check_deps) 510c511 < else if (length(miss)) --- > else if (length(miss) && check_deps) 1025a1027 > check_deps <- TRUE 1133a1136,1137 > } else if (a == "--no-check-deps") { > check_deps <- FALSE kjetil __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] How to make a package with help pages in multiple languages?
This question was adsked on R-help-es, and got no responses there. the OP asked for help pages in english and spanish. Any ideas how this should be done? I guess there really should be a solution for any number of languages. Kjetil __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Julia
Can somebody postb a link to the video? I cant find it, searching "Julia" on youtube stanford channel gives nothing. Kjetil On Thu, Mar 1, 2012 at 11:37 AM, Douglas Bates wrote: > On Thu, Mar 1, 2012 at 11:20 AM, Jeffrey Ryan > wrote: >> Doug, >> >> Agreed on the interesting point - looks like it has some real promise. >> I think the spike in interest could be attributable to Mike >> Loukides's tweet on Feb 20. (editor at O'Reilly) >> >> https://twitter.com/#!/mikeloukides/status/171773229407551488 >> >> That is exactly the moment I stumbled upon it. > > I think Jeff Bezanson attributes the interest to a blog posting by > Viral Shah, another member of the development team, that hit Reddit. > He said that, with Viral now in India, it all happened overnight for > those in North America and he awoke the next day to find a firestorm > of interest. I ran across Julia in the Release Notes of LLVM and > mentioned it to Dirk Eddelbuettel who posted about it on Google+ in > January. (Dirk, being much younger than I, knows about these > new-fangled social media things and I don't.) > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Eigenvalue calculation of sparse matrices
Hola! This can be done with the CRAN package igraph, which contains (part of) the arpack library for computing only some eigenvalues/eigenvectors of sparse matrices. arpack gives you the option of computing a few of the smallest or a few of the largest eigenvalues/vectors. You will need yourself to wrte a function doing matrix-vector multiplication, so the arpack methods itself is independent of the implementation of your sparse matrix. Kjetil On Fri, Mar 9, 2012 at 9:09 AM, Holger Diedrich wrote: > Dear all, > > I am currently working on the calculation of eigenvalues (and -vectors) of > large matrices. Since these are mostly sparse matrices and I remember some > specific functionalities in MATLAB for sparse matrices, I started a research > how to optimize the calculation of eigenvalues of a sparse matrix. > The function eigen itself works with the LAPACK library which has no special > handling for sparse matrices, same for the EISPACK library. The ARPACK > library is capable to work with sparse matrices but I couldn't find any > useful R package using ARPACK. > The Matrix package can handle sparse matrices but has no further useful > functionalities (concerning my tasks). > > Does one of you have any advice how to optimize the eigenvalue calculation > of sparse matrices in R? > > Thanks in advance, > Holger > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Lubuntu 13.04 raring ringtail: Problems installing pnmath_0.0-4
Hola! This is 64bit Lubuntu 13.04, with R-3.0.0 installed from deb http://ppa.launchpad.net/marutter/rrutter/ubuntu raring main via synaptic. gcc --version gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 > sessionInfo() R version 3.0.0 (2013-04-03) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] MASS_7.3-26 loaded via a namespace (and not attached): [1] compiler_3.0.0 fortunes_1.5-0 tools_3.0.0 > I am trying to install pnmath from the commandline (outside R), this is what happens: kjetil@kjetil-HP-Pavilion-dv4-Notebook-PC:~/R/src$ sudo R CMD INSTALL pnmath_0.0-4.tar.gz * installing to library â/usr/local/lib/R/site-libraryâ * installing *source* package âpnmathâ ... ** libs gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fopenmp -fpic -O2 -pipe -g -c bd0.c -o bd0.o ... ... ... installing to /usr/local/lib/R/site-library/pnmath/libs ** R ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/usr/local/lib/R/site-library/pnmath/libs/pnmath.so': /usr/local/lib/R/site-library/pnmath/libs/pnmath.so: undefined symbol: PRIMFUN Error: loading failed Execution halted ERROR: loading failed * removing â/usr/local/lib/R/site-library/pnmathâ I have installed sufficient libraries as to compile R itself from source without problems! Kjetil [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Lubuntu 13.04 raring ringtail: Problems installing pnmath_0.0-4
see inline. On Sat, Apr 27, 2013 at 2:38 PM, Prof Brian Ripley wrote: > AFAIK pnmath is not a package on a public repository, and it seems it is > using R internals not part of the API and not exposed in R 3.0.0. > > I presume you got this from ~luke/R/experimental ... the clue is in the > directory name. Ye, that is correct! thanks, kjetil > My understanding was that this would eventually be merged into R rather > than released as a package. > > If you really want to use it you will need to modify the R sources to > unhide PRIMFUN and SET_PRIMFUN and re-compile. > > > > On 26/04/2013 19:39, Kjetil Halvorsen wrote: > >> Hola! >> >> This is 64bit Lubuntu 13.04, with R-3.0.0 installed from >> deb >> http://ppa.launchpad.net/**marutter/rrutter/ubuntu<http://ppa.launchpad.net/marutter/rrutter/ubuntu>raring >> main >> via synaptic. gcc --version >> gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 >> >> sessionInfo() >>> >> R version 3.0.0 (2013-04-03) >> Platform: x86_64-pc-linux-gnu (64-bit) >> >> locale: >> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C >> [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8 >> [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8 >> [7] LC_PAPER=C LC_NAME=C >> [9] LC_ADDRESS=C LC_TELEPHONE=C >> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C >> >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> >> other attached packages: >> [1] MASS_7.3-26 >> >> loaded via a namespace (and not attached): >> [1] compiler_3.0.0 fortunes_1.5-0 tools_3.0.0 >> >>> >>> I am trying to install pnmath from the commandline (outside R), this is >> what happens: >> kjetil@kjetil-HP-Pavilion-dv4-**Notebook-PC:~/R/src$ sudo R CMD INSTALL >> pnmath_0.0-4.tar.gz >> * installing to library ââ¬Ë/usr/local/lib/R/site-**libraryââ¬â¢ >> * installing *source* package ââ¬Ëpnmathââ¬â¢ ... >> >> ** libs >> gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fopenmp -fpic -O2 >> -pipe -g -c bd0.c -o bd0.o >> ... >> ... >> ... >> installing to /usr/local/lib/R/site-library/**pnmath/libs >> ** R >> ** byte-compile and prepare package for lazy loading >> ** help >> *** installing help indices >> ** building package indices >> ** testing if installed package can be loaded >> Error in dyn.load(file, DLLpath = DLLpath, ...) : >>unable to load shared object >> '/usr/local/lib/R/site-**library/pnmath/libs/pnmath.so'**: >>/usr/local/lib/R/site-library/**pnmath/libs/pnmath.so: undefined >> symbol: >> PRIMFUN >> Error: loading failed >> Execution halted >> ERROR: loading failed >> * removing ââ¬Ë/usr/local/lib/R/site-**library/pnmathââ¬â¢ >> >> >> I have installed sufficient libraries as to compile R itself from source >> without problems! >> >> Kjetil >> >> [[alternative HTML version deleted]] >> >> >> >> __** >> R-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/**listinfo/r-devel<https://stat.ethz.ch/mailman/listinfo/r-devel> >> >> > > -- > Brian D. Ripley, rip...@stats.ox.ac.uk > Professor of Applied Statistics, > http://www.stats.ox.ac.uk/~**ripley/<http://www.stats.ox.ac.uk/~ripley/> > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UKFax: +44 1865 272595 > [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] View() crashy on Ubuntu 9.04
I can reproduce this too. Run from within emacs: > v <- data.frame(1:3,2:4) > sessionInfo() R version 2.9.0 (2009-04-17) i686-pc-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base > View(v) > *** caught segfault *** address 0x4, cause 'memory not mapped' Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace Selection: 3 Process R exited abnormally with code 70 at Tue May 12 22:41:55 2009 Kjetil On Tue, May 12, 2009 at 9:59 PM, Dirk Eddelbuettel wrote: > > On 12 May 2009 at 19:46, Ben Bolker wrote: > | It's my vague impression that View() is workable on Windows and maybe > | on MacOS, but on Ubuntu Linux 9.04 (intrepid) it seems completely > | unstable. I can reliably crash R by trying to look at a very small, > | simple data frame ... > | > |I was going to try to run with debug turned on, but my installed > | version (2.9.0) doesn't have debugging symbols, and I'm having trouble > > Good news: just run > > sudo apt-get install r-base-core-dbg > > Most (library) packages (lib)foo now also ship (lib)foo-dbg which is > provide > something close to pure magic -- just by installing these the already > instrumented gdb knows where to look for them. See, no more recompiling. > Debug symbols appear out of thin air. (I have used it only on Debian at > home > when debugging R stuff, but it should really work the same for you there on > Ubuntu.) > > | building the latest SVN version (./configure gives "checking for > | recommended packages... ls: cannot access > | ./src/library/Recommended/boot_*.tar.gz: No such file or directory") > > It's moot as per the above but you need to either run the script to rsync > those in, or configure using > >--without-recommended-packages > > As for x11 instability, I happen to spend my daytime hours in from of > Cygwin/X connected to a few Ubuntu machines running R, and of late the > display has been unstable. I tend to blame the other software first, but > indeed, the most recent change was probably R. Did anybody experience > that? > > |Can anyone confirm? > | > | cheers > | Ben Bolker > | > | > | R --vanilla > | > | > v <- data.frame(1:3,2:4) > | > sessionInfo() > | R version 2.9.0 (2009-04-17) > | i486-pc-linux-gnu > | > | locale: > | > LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C > | > | attached base packages: > | [1] stats graphics grDevices utils datasets methods base > | > | > View(v) > | > | [change focus to the view window, hit "down arrow"] > | > | > > | *** caught segfault *** > | address 0x4, cause 'memory not mapped' > | > | Possible actions: > | 1: abort (with core dump, if enabled) > | 2: normal R exit > | 3: exit R without saving workspace > | 4: exit R saving workspace > | Selection: 3 > > Confirmed. Dies for me too, but from Debian and Ubuntu connected to the > same > display (Ubuntu 9.04). > > Dirk > > -- > Three out of two people have difficulties with fractions. > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] weigths in nls (PR#13991)
see below. On Fri, Oct 9, 2009 at 1:35 PM, Tony Plate wrote: > This is expected behavior from the way nls() is written. The nls() function > has a "..." argument, which means that additional arguments are allowed. > > Under "Arguments" the docs say: > |...| Additional optional arguments. None are used at present. > > > As far as I can see in the code, nothing at all is done with the additional > arguments (consistent with the docs). I guess the "..." argument is there > to allow for future development (though I'm not sure what is gained by > including "..." as a formal argument now, and not just adding it in the > future if and when it is needed.) ¿Maybe it allows for other people to write methods? Kjetil > > In general, the use of ... arguments does add flexibility, but it takes away > some error-checking. > > -- Tony Plate > > stephen.b...@cibc.com wrote: >> >> Potential bug: >> >> I mistyped weights in the call ('weigths') and it did not produce any >> error= >> message. The coefs were exactly the same like without weights, so I was >> su= >> spicious and when weights(nls1) gave NULL, I saw my typo. >> >> Usually the function will say "Unused arguments", which shows you the >> error= >> , but not nls. >> >> Regards >> Stephen >> >> [[alternative HTML version deleted]] >> >> __ >> R-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> >> > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] p-generalized normal distribution
There is a CRAN Task View for probability Distributions. take a look there! Kjetil On Tue, Nov 24, 2009 at 1:53 PM, Steve Kalke wrote: > Hello, > > I would like to know if there is an R-package available for computing the > density, distribution function, quantiles and random numbers of the > p-generalized normal distribution or if somebody is already working on it. > > Best regards, > Steve Kalke > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Consulta
Mariana: First, this post has nothing to do with future development of R, and so should be sent to R-help, not R-devel. Second, for questions in spanish you should consider the list R-help-es kjetil On Tue, Apr 27, 2010 at 1:38 PM, Mariana Gomez wrote: > Estoy escribiendo una función en R para análisis de modelos lineales y tengo > problemas al ejecutarla porque dicha función usa otra función, también creada > por mi, y cuando ejecuto al primera me dice que no encuentra la segunda. > Ambas funciones están guardadas en la carpeta work y al entrar al programa > siempre cambio el directorio a work. No sé cual es el problema, si está mal > el search-path o es algo que me falta definir correctamente. Muchas gracias > > No sé si entienden español así que a continuación trataré de explicar mi > problema en inglés. > Here is the same in english: > I am writing a function > in R for analysis of linear models and I have run into problems because > the function uses another function, also created by me, and when I run > the first the program said that can not found the second. Both features are > stored in the work > folder and wen I enter the program always change the directory to work. I do > not know what the problem is, if the search-path > is wrong or something I need to define properly. Thank you very much > > > > > [[alternative HTML version deleted]] > > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] asypow cran package
Hola! I decided to abandon (orphane) the maintenance of the cran asypow package. If anybody is interested they can take over now! reason (among others): I do now my power calculations by simulation and find that more flexible and fast enough. Kjetil [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Gamma funtion(s) bug
With R 2.8.1 on ubuntu I get: > gamma(-1) [1] NaN Warning message: In gamma(-1) : NaNs produced > lgamma(-1) [1] Inf Warning message: value out of range in 'lgamma' Is'nt the first one right, and the second one (lgamma) should also be NaN? Kjetil [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] License status of CRAN packages
On Thu, Apr 23, 2009 at 4:59 PM, Ben Goodrich wrote: > Dirk Eddelbuettel debian.org> writes: > > As a non-exhautive list with possible misclassifications, cran2deb > currently > > has these packasges as 'maybe not free' and does not build them: > > > > BARD,BayesDA,CoCo,ConvCalendar,FAiR,PTAk,RScaLAPACK,Rcsdp,SDDA,SGP, > BayesDA has License: GPL version 2 or any later version what is unclear about that? Kjetil > > > > alphahull,ash,asypow,caMassClass,gpclib,mapproj,matlab,mclust,mclust02, > > > mlbench,optmatch,rankreg,realized,rngwell19937,rtiff,rwt,scagnostics, > > sgeostat,spatialkernel,tlnise,xgobi > > Small point: FAiR is free. The file LICENSE thing just clarifies that most > of > the code is AGPL but a couple files can't be included under the AGPL and > are > plain GPL. As far as I can see, R does not give me the option of saying so > in a > "standard" way, e.g. putting License: AGPL (>= 3) in the DESCRIPTION file > would > only be 95% accurate and putting License: AGPL (>= 3) | GPL (>= 3) is > misleading. > > Ben > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] r2dtable
This is R-2.4.0-to-be, latest development version on windiws, pre-compiled from CRAN. I noticed doing ?r2dtable that r2dtable is placed in package base, where it clearly not belongs, referring to the sources it should live in stats. Why it is placed in base? Kjetil [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] CRAN problem
Just now going to the CRAN download area, windows (95 or later), base, selecting development snapshot, there is listed a file R-2.5.0dev-win32.exe<http://cran.r-project.org/bin/windows/base/R-2.5.0dev-win32.exe> and while clickingh on this link gives error 404, object not found. Kjetil [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Matrix package in R-2.4.0alpha
In a newly downloaded version (today) of R-2-4-0alpha, with all packages from CRAN also installed today, I get: > library(Matrix) Erro en loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) : in 'Matrix' methods specified for export, but none defined: BIC, anova, coef, confint, deviance, fitted, fixef, formula, head, lmer, logLik, mcmcsamp, plot, qqmath, ranef, residuals, resid, simulate, summary, tail, terms, update, vcov, VarCorr, with, cbind2, rbind2, Arith, Math, Math2, Summary, Compare, !, +, %*%, Schur, as.array, as.matrix, as.vector, band, chol, colMeans, colSums, coerce, crossprod, determinant, diag, dim, dimnames, dimnames<-, expand, expm, kronecker, image, isSymmetric, norm, rcond, rowMeans, rowSums, show, solve, t, tcrossprod, tril, triu Error: package/namespace load failed for 'Matrix' > sessionInfo() R version 2.4.0 alpha (2006-09-05 r39134) i386-pc-mingw32 locale: LC_COLLATE=Spanish_Chile.1252;LC_CTYPE=Spanish_Chile.1252;LC_MONETARY=Spanish_Chile.1252;LC_NUMERIC=C;LC_TIME=Spanish_Chile.1252 attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" [7] "base" other attached packages: lattice "0.13-10" Kjetil [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] wishlist --- menu entry [Rgui] misc --- stop current computation
This is from R-2.4.0alpha on windows XP, downloaded from CRAN yesterday. I did update.packages(destdir= ..., ask=FALSE,checkBuilt=TRUE) which took quite a long time (as.expected). When the internet cafe had to close, I had to stop the downloading, but the menu item misc --- stop current computation only stopped the current download, and then R imeadiaetely continued whit the next in the waitin list, so I had to kill R. I would be nice if this could be corrected so it really stopped all the waiting computastion! Kjetil halvorsen [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] wishlist --- menu entry [Rgui] misc --- stop current computation
Thanks. I am quite sure I don't want pending on exit actions to be done! I will try to remember about the esc trick. Kjetil halvorsen On 9/19/06, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > > On Tue, 19 Sep 2006, Kjetil Halvorsen wrote: > > > This is from R-2.4.0alpha on windows XP, downloaded from CRAN yesterday. > > > > I did > > update.packages(destdir= ..., ask=FALSE,checkBuilt=TRUE) > > > > which took quite a long time (as.expected). When the internet cafe > > had to clos to remember aboute, I had to stop the downloading, but the > menu item > > misc --- stop current computation only stopped the current download, > > and then R imeadiaetely continued whit the next in the waitin list, so I > had > > to kill > > R. I would be nice if this could be corrected so it really > > stopped all the waiting computastion! > > As it does what it says, it cannot be 'corrected' to do something else. > I usually find hitting Ctrl-C (or ESC in Rgui) a few times breaks out > here. > > The issue is that update.packages (or more precisely download.packages) > has a loop of try() constructs, and those are trapping interrupts. > I don't think there is any way to distinguish those from other internal > errors. In any case, it is a somewhat delicate question as to what you > want: do you want pending on.exit() actions done, for example? > > -- > Brian D. Ripley, [EMAIL PROTECTED] > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UKFax: +44 1865 272595 > [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] mgcv in R-2.4.0.alpha
Hola! I am sending this to the list since emails from me to Simon Wood has bounced earlier. I get: > library(tsDyn) Loading required package: mgcv Erro en `parent.env<-`(`*tmp*`, value = NULL) : use of NULL environment is defunct Error: package 'mgcv' could not be loaded > library(mgcv) Erro en `parent.env<-`(`*tmp*`, value = NULL) : use of NULL environment is defunct Error: package/namespace load failed for 'mgcv' But in the package check summary on CRAN mgcv gets OK. > sessionInfo() R version 2.4.0 alpha (2006-09-16 r39365) i386-pc-mingw32 locale: LC_COLLATE=Spanish_Bolivia.1252;LC_CTYPE=Spanish_Bolivia.1252;LC_MONETARY=Spanish_Bolivia.1252;LC_NUMERIC=C;LC_TIME=Spanish_Bolivia.1252 attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" [7] "base" Kjetil B Halvorsen [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] mgcv in R-2.4.0.alpha
On 9/20/06, Martin Maechler <[EMAIL PROTECTED]> wrote: > > . . . Kjetil> [[alternative HTML version deleted]] >^ > > (I thought you would know better ...) > Martin In theory, yes, but I did´nt find a way to stop the html version to be sent im gmail. Before I sent from gmail via thunderbird, now, sending from a lot of different machines, that is not practicable. Anybody knows how to tell gmail? Kjetil [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] mgcv in R-2.4.0.alpha
Hola! See comments inline. On 9/20/06, Martin Maechler <[EMAIL PROTECTED]> wrote: > > >>>>> "Kjetil" == Kjetil Halvorsen <[EMAIL PROTECTED]> > >>>>> on Tue, 19 Sep 2006 16:56:24 -0400 writes: > >Kjetil> Hola! >Kjetil> I am sending this to the list since emails from me to Simon > Wood > Kjetil> has bounced earlier. > > Kjetil> I get: > >>> library(tsDyn) >Kjetil> Loading required package: mgcv >Kjetil> Erro en `parent.env<-`(`*tmp*`, value = NULL) : >Kjetil> use of NULL environment is defunct >Kjetil> Error: package 'mgcv' could not be loaded >>> library(mgcv) >Kjetil> Erro en `parent.env<-`(`*tmp*`, value = NULL) : >Kjetil> use of NULL environment is defunct >Kjetil> Error: package/namespace load failed for 'mgcv' >Kjetil> But in the package check summary on CRAN mgcv >Kjetil> gets OK. > > Yes, because it *is* ok. > I'm pretty sure you are getting an old version of 'mgcv' instead > of the correct one. I will investigate when I get my machine back from the technician! But I wrote this after having done a complete update.packages. However, my package on CRAN SenSrivastava passes all the daily checks on CRAN, not even a warning, but when running the checks on my computer I get a warning. (planned to fix this week) Kjetil Look at the result of > ll <- library() > ll$res[ll$res[,1] == "mgcv" ,] > >>> sessionInfo() >Kjetil> R version 2.4.0 alpha (2006-09-16 r39365) >Kjetil> i386-pc-mingw32 > >Kjetil> locale: >Kjetil> > LC_COLLATE=Spanish_Bolivia.1252;LC_CTYPE=Spanish_Bolivia.1252;LC_MONETARY=Spanish_Bolivia.1252;LC_NUMERIC=C;LC_TIME=Spanish_Bolivia.1252 > >Kjetil> attached base packages: >Kjetil> [1] "methods" "stats" "graphics" "grDevices" "utils" > "datasets" >Kjetil> [7] "base" > >Kjetil> Kjetil B Halvorsen > >Kjetil> [[alternative HTML version deleted]] >^ > > (I thought you would know better ...) > Martin > [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] buglet in ?asin
This is fron R-2.5.0-to-be, windows XP The following excerpt from ?asin cannot be right: For asin() and acos(), there are two cuts, both along the real axis: *(-Inf, 1]* and *[1, Inf)*. Functions asin() and acos() are continuous from above on the interval *(-Inf, -1]* and continuous from below on *[1, Inf)*. Note the first interval should be (-Inf, -1) not (-Inf, 1) Kjetil [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] docu buglets for ar and friends
This is R2.1.1 The documantation opened by ?ar, section for returned value, does not document all the components of the returned list. In addition to the 13 components documented, it also contains the component $frequency This also applies to the help page opened by ?ar.ols -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra -- No virus found in this outgoing message. Checked by AVG Anti-Virus. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Tests of gcc-4.0.1
Prof Brian Ripley wrote: >I had promised to report on tests of gcc-4.0.1, and have now tracked down >all the outstanding issues. > >I am comparing gcc3 (gcc-3.4.4 including g77) and gcc4 (gcc-4.0.1 >including gfortran) on FC3, both i686 and x86_64 (the latter both 64-bit >and 32-bit builds). All compiled from the sources (the FC3 update to >3.4.4 was not out when I started this). > >The bottom line is that 4.0.1 shows none of the serious errors that 4.0.0 >showed, but was always slower (usually 4-10% slower) than gcc3 and (see >below) about 25 CRAN packages fail only about half of which are >attributable to deficiences in the packages. > >The differences between the outputs has shown some places where R is more >sensitive to rounding errors than might have been thought. Amongst these >are > >- ppr (that was known) >- lowess, which can be extremely sensitive to the number of iterations > allowed, as shown by panel 8 in example(attenu). >- contouring, in particular the exact place contour labels are placed. >- str, which depended on a test ob == signif(ob, digits.d), and signif() > was unnecessarily causing rounding error by dividing by a negative power > of 10 (now fixed). >- the extreme test in example(smooth.spline), which showed quite large > differences. > >Amongst CRAN packages: > >RSvgDevice is said to have invalid C > >acepack, deldir, fMultivar, fOptions, fSeries, frailtypack, gap, gcmrec, >hmm.discnp, labdsv, survrec > >have invalid Fortran. (Most of these have been reported to the maintainers >some time ago.) > >Geneland infinite loops >NISTnls, gss, relsurv fail their tests >SparseM, asypow, > The fortran left in asypow does things (noncentral chisquare distribution) which are available at the R level. If problem if with the fortran I remove it completely. Kjetil > mvtnorm, party, subselect segfault >ade4 has an LAPACK error (similar to those seen before) > > > -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra -- Internal Virus Database is out-of-date. Checked by AVG Anti-Virus. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] buglet in ?StructTS
?StructTS has The basic structural model, type = "BSM", is a local trend model with an additional seasonal component. Thus the measurement equation is x[t] = m[t] + s[t] + eps[t], exp[t] ~ N(0, sigma^2_eps) I guess in the last line exp[t] ~ should be eps[t] ~ ... Kjetil __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Minumum memory requirements to run R.
Prof Brian Ripley wrote: > Quite a while back we set the goal of running R in 16Mb RAM, as people (I > think Kjetil) had teaching labs that small. It's a while since I actually har R used on such small machines, I think 64 MB is quite acceptable now. Kjetil > > Since then R has grown, and we has recently started to optimize R for > speed rather than size. I recently tested R-devel on my ancient Win98 > notebook with 64Mb RAM -- it ran but startup was rather slow on what I > think is a 233MHz processor and very slow disc. > > R still runs in 16Mb, but that is getting tight. Does anyone have any > need to run on a smaller machine than my 64Mb notebook? > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Installation of gmodels package (PR#8686)
[EMAIL PROTECTED] wrote: > Full_Name: Thomas R Famula > Version: 2.2.1 > OS: Linux - fedora core 4 > Submission from: (NULL) (169.237.28.28) > > > Sorry to bother - I hope this is a simple fix. > Here is the set of error messages I recieved in trying to install the > "gmodels" > package. I typed in "install.packages(c("gmodels"))" as the root and recieved > the following series of replies: > > > > install.packages(c("gmodels")) > --- Please select a CRAN mirror for use in this session --- > Loading Tcl/Tk interface ... done > trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/gmodels_2.12.0.tar.gz' > Content type 'application/x-tar' length 21872 bytes > opened URL > == > downloaded 21Kb > > * Installing *source* package 'gmodels' ... > ** R > ** preparing package for lazy loading > Error in loadNamespace(i[[1]], c(lib.loc, .libPaths())) : > there is no package called 'gdata' > Execution halted > ERROR: lazy loading failed for package 'gmodels' > ** Removing '/usr/lib64/R/library/gmodels' > > The downloaded packages are in > /tmp/Rtmpba5986/downloaded_packages > Warning message: > installation of package 'gmodels' had non-zero exit status in: > install.packages(c("gmodels")) > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > Try with install.packages("gmodels", dependencies=TRUE) Kjetil __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] How to capture t-score and p-values from t.test
Bernzweig, Bruce (Exchange) wrote: > When I do t.test on two distributions (see example below), it outputs > numerous data about the t.test. > > What I'd like to do is individually capture some of this data and assign > it to other variables. > > However, I am unable to find anything in the help section. t.test returns an object of class "htest", but ?htest : > ?htest No documentation for 'htest' in specified packages and libraries: you could try 'help.search("htest")' but that does not do anythinh eiather. Some time ago, I wrote a helpfile for htest, but that was rejected, since "S3 classes are not usually documented". Kjetil > > > > In the example below, the t value is -4.0441 and the p-value is 0.006771 > > How can I assign these values to two variables, let's say tVal and pVal? > > > > Thanks, > > > > - Bruce > > > >> t.test(d[1], d[2], var.equal=TRUE) > > Two Sample t-test > > data: d[1] and d[2] > > t = -4.0441, df = 6, p-value = 0.006771 > > alternative hypothesis: true difference in means is not equal to 0 > > 95 percent confidence interval: > > -5.216430 -1.283570 > > sample estimates: > > mean of x mean of y > > 2.50 5.75 > > > > > > > > ** > Please be aware that, notwithstanding the fact that the person sending > this communication has an address in Bear Stearns' e-mail system, this > person is not an employee, agent or representative of Bear Stearns. > Accordingly, this person has no power or authority to represent, make > any recommendation, solicitation, offer or statements or disclose > information on behalf of or in any way bind Bear Stearns or any of its > affiliates. > ** > > > > > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] seq improperly increments dates (PR#9120)
Duncan Murdoch wrote: > On 8/4/2006 4:18 AM, Martin Maechler wrote: >>>>>>> "Gabor" == Gabor Grothendieck <[EMAIL PROTECTED]> >>>>>>> on Thu, 3 Aug 2006 20:14:24 -0400 writes: >> Gabor> That's, in fact, the way seq.dates works in the chron package: >> Gabor> library(chron) >> Gabor> x <- chron("01/31/2006") >> Gabor> seq(x, by = "month", length = 2) # 01/31/06 02/28/06 >> >> Hmm, so, by "logic", >> 2006-01-31 + 1month |-> 2006-02-28 >> 2006-01-30 + 1month |-> 2006-02-27 (?) >> 2006-01-29 + 1month |-> 2006-02-26 (?) >> 2006-01-28 + 1month |-> 2006-02-25 >> >> I really don't like 'chron's behavior which seems much less >> logical to me than what R does with the official "Date" objects : >> >>> options(width=88) >>> for(d in 28:31) print(seq(as.Date(paste("2006-01", d, sep="-")), len = 6, >>> by="1 month")) >> [1] "2006-01-28" "2006-02-28" "2006-03-28" "2006-04-28" "2006-05-28" >> "2006-06-28" >> [1] "2006-01-29" "2006-03-01" "2006-03-29" "2006-04-29" "2006-05-29" >> "2006-06-29" >> [1] "2006-01-30" "2006-03-02" "2006-03-30" "2006-04-30" "2006-05-30" >> "2006-06-30" >> [1] "2006-01-31" "2006-03-03" "2006-03-31" "2006-05-01" "2006-05-31" >> "2006-07-01" >> >> {which, BTW, *is* reproducible code; the bug report was only >> reproducible on the day it was posted because it sillily used >> Sys.date()} > > I think the obvious solution here is to ask R Core to move the earth > slightly closer to the sun, so the year is exactly 360 days long, and > these problems don't arise. > > Or perhaps exactly 372 days would be better; that would be further from > the sun and would also help with global warming. > > Duncan Murdoch I am afraid that moving the earty so far out to induce an ice age, so I would please ask R-core to leave the earth alone! Kjetil > >> Gabor> See the help desk article in R News 4/1 for more about the main >> Gabor> date classes. >> >> Gabor> On 8/3/06, Ponzio, Stephen [CIB-LAVA] <[EMAIL PROTECTED]> wrote: >> >> You're right, it's tricky. >> >> >> >> I guess I would expect Jan. 30 + 1 month = Feb. 28. >> >> >> >> Of couse, then Jan. 30 + 1 month = Jan. 28 + 1 month; >> >> I understand. >> >> >> >> Being that "1 month" is imprecise in terms of number of days, >> >> this anomaly is preferable to skipping months (Jan. 30 + 1 month = >> March 2), >> >> in my opinion. >> >> >> >> That is what I expected, anyway. >> >> >> >> Thanks, >> >> Stephen >> >>[.] >> >> __ >> R-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] solving nonlinear equations
HAKAN DEMIRTAS wrote: > I can't seem to get computationally stable estimates for the following system: > > Y=a+bX+cX^2+dX^3, where X~N(0,1). (Y is expressed as a linear combination of > the first three powers of a standard normal variable.) Assuming that E(Y)=0 > and Var(Y)=1, one can obtain the following equations after tedious algebraic > calculations: > > 1) b^2+6bd+2c^2+15d^2=1 > 2) 2c(b^2+24bd+105d^2+2)=E(Y^3) > 3) 24[bd+c^2(1+b^2+28bd)+d^2(12+48bd+141c^2+225d^2)]=E(Y^4)-3 > > Obviously, a=-c. Suppose that distributional form of Y is given so we know > E(Y^3) and E(Y^4). In other words, we have access to the third and fourth raw > moments. How do we solve for these four coefficients? I reduced the number of > unknowns/equations to two, and subsequently used a grid approach. It works > well when I am close to the center of the support, but fails miserably at the > tails. Any ideas? Hopefully, there is a nice R function that does this. > > Hakan Demirtas > > > [[alternative HTML version deleted]] > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > This is really a question for r-help not r-devel. I was about to say that this was a question for a symbolic algebra system, but first tried in MuPAD 4.0, and left the machine alone. returning after 2 hours MuPAD was still grinding and I had to kill it. Kjetil __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] buglet in hjelp("[<-")
Hola! The details section of help("[<-") contains in the Details section Subsetting (except by an empty index) will drop all attributes except names, dim and dinmanes. I guess dinmanes means dimnames! Kjetil __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] rownames() problem with 0-extent arrays (PR#9136)
Raubertas, Richard wrote: > Prof Ripley, > Thanks for your reply. I've inserted a couple of inline > comments below. > > Rich Raubertas > >> -Original Message- >> From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, August 16, 2006 7:21 AM >> To: Raubertas, Richard >> Cc: r-devel@stat.math.ethz.ch >> Subject: Re: [Rd] rownames() problem with 0-extent arrays (PR#9136) >> >> >> R-bugs is not the place to ask questions, see the FAQ > > Yes, I should have sent a separate message. > >> On Fri, 11 Aug 2006, [EMAIL PROTECTED] wrote: >> >> [...] >> >>> A separate but related question (not a bug) has to do with >> the handling >>> of dimnames for 0-extent arrays. If an array starts out >> with non-NULL >>> dimnames and is subscripted down to have 0-extent, the >> corresponding >>> component is set to NULL, rather than character(0): >> and that dimension does not have any names, so this is appropriate. > > I think the question of whether a dimension has names or not > should be independent of the extent of that dimension. (My reason > for raising the issue was that some code I was writing would > be cleaner if "dimension has names" and "extent of dimension" were > orthogonal concepts.) Under that premise, there is a difference > between NULL (no names) and character(0) (names). > > It appears you don't agree with my premise, and I can see how a > discussion about naming things that don't exist could get rather > metaphysical. Yes. There has been quite a lot discussion about 'god' during history! Kjetil So I have worked around the issue in my code. > >>> dimnames(tmp[0,,drop=FALSE]) # first component is NULL >>> >>> Why is that? Note that this is different from how data frames are >>> handled: >>> >>> tmp.df <- data.frame(tmp) >>> dimnames(tmp.df[0,]) # first component is character(0) >> Data frames do not have 'dimnames', and what is reported by >> the accessor >> function is list(row.names(x), names(x)), both of which are >> required to be >> character vectors. Indeed, as the help file says >> >> For the \code{"data.frame"} method both dimnames must be >> non-null, and >> the rownames must contain no duplicates nor missing values. >> >>> The description in ?dimnames seems to allow character(0) components >>> of dimnames, >>> >>> "The dimnames of a matrix or array can be 'NULL' or a >> list of the >>> same length as 'dim(x)'. If a list, its components are either >>> 'NULL' or a character vector the length of the appropriate >>> dimension of 'x'." >> That is accurate. >> >>> yet the implementation seems to resist them: >>> >>> tmp2 <- tmp[0,,drop=FALSE] >>> dimnames(tmp2) <- list(character(0), LETTERS[1:3]) >>> dimnames(tmp2) # still NULL >>> >>> So my question is whether it would be reasonable to change >> 'dimnames' >>> and/or "dimnames<-" to use (or at least allow) character(0) >> rather than >>> NULL for array dimensions of 0 extent. >> Why would it be desirable to have two equivalent >> representations of the >> same thing (no names)? As you could easily have found out, >> the C code >> replaces a zero-length vector by NULL. >> >> -- >> Brian D. Ripley, [EMAIL PROTECTED] >> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >> University of Oxford, Tel: +44 1865 272861 (self) >> 1 South Parks Road, +44 1865 272866 (PA) >> Oxford OX1 3TG, UKFax: +44 1865 272595 >> >> > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] buglet in hjelp("[<-")
Prof Brian Ripley wrote: > On Sun, 13 Aug 2006, Kjetil Brinchmann Halvorsen wrote: > >> Hola! >> >> The details section of help("[<-") contains in the Details section >> >> Subsetting (except by an empty index) will drop all attributes except >> names, dim and dinmanes. >> >> I guess dinmanes means dimnames! > > Yes, thank you. (And 'hjelp' means 'help'?) > OOOps! It slept in some norwegian there, yes. Hjelp=help. Such things happens when you like me switches constantly between three languages each day. Sometimes I don't know which language I'm speaking! Kjetil __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel