[Rd] Roadmap ?
I can't find any R roadmap. Is it available somewhere ? Etienne -- View this message in context: http://www.nabble.com/Roadmap---tp21791647p21791647.html Sent from the R devel mailing list archive at Nabble.com. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Getting 'LinkingTo' to find the right library
I am experimenting with exporting pointers to some of the functions in deSolve so that other packages may import them, using the 'R_RegisterCCallable' mechanism. I have added a header file and some other C code in inst/include of the deSolve source package that need to be accessible to other packages. I have a site-library set up in Rprofile.site where all installed packages go, and as long as my experimental version of deSolve is installed there, I'd like to install my modified copy of deSolve in a test library. However, when I try to install my test package (which includes both Depends: deSolve and LinkingTo: deSolve, in its Description file, as described in 'R Extensions'), compilation fails, because the appropriate C code cannot be found (there is also an unrelated problem in deSolve_stubs.c triggering the "unexpected ')' before '*' token" error). [test]$ R CMD INSTALL -l C:/home/Rlib-test dma -- Making package dma adding build stamp to DESCRIPTION installing NAMESPACE file and metadata making DLL ... gcc -std=gnu99 -Ic:/PROGRA~1/R/R-28~1.1PA/include -I"C:/PROGRA~1/R/site-librar y/deSolve/include"-O3 -Wall -c R_init_dma.c -o R_init_dma.o R_init_dma.c:1:27: error: deSolve_stubs.c: No such file or directory R_init_dma.c:3: error: expected ')' before '*' token make[3]: *** [R_init_dma.o] Error 1 make[2]: *** [srcDynlib] Error 2 make[1]: *** [all] Error 2 make: *** [pkg-dma] Error 2 *** Installation of dma failed *** Removing 'C:/home/Rlib-test/dma' It seems that although the 'site-library/deSolve/include' folder is included in the search list for included files, the 'Rlib-test/deSolve/include' folder is not. The folder that includes both the experimental version of deSolve and the test package dma also contains a .Rprofile file which places 'C:/home/Rlib-test' at the front of the library search path, and I have confirmed that this is so (in fact, the above INSTALL command does not need the '-l ' argument; the default install location is Rlib-test for installs from this folder). It looks as if the code in INSTALL that sets up the -I arguments to gcc does not find the library path defined for this folder. Can someone point me to the right way to do this? System information: Version: platform = i386-pc-mingw32 arch = i386 os = mingw32 system = i386, mingw32 status = Patched major = 2 minor = 8.1 year = 2009 month = 01 day = 04 svn rev = 47474 language = R version.string = R version 2.8.1 Patched (2009-01-04 r47474) Windows XP (build 2600) Service Pack 2 Locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 Search Path: .GlobalEnv, package:stats, package:graphics, package:grDevices, package:utils, package:datasets, package:methods, Autoloads, package:base R. Woodrow Setzer, Ph. D. National Center for Computational Toxicology http://www.epa.gov/comptox US Environmental Protection Agency Mail Drop B205-01/US EPA/RTP, NC 27711 Ph: (919) 541-0128Fax: (919) 541-1194 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] best reference on generics
Hello, All: What would you say is the best succinct reference to cite on use of generic functions, especially S3 generics? I want to add an appropriate citation on this to a forthcoming book in the Springer "useR!" series (discussing the use of the 'fda' package, which uses the S3 standard). Thanks, Spencer Graves __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Roadmap ?
I was looking for something like that (as an example) http://wiki.inkscape.org/wiki/index.php/Roadmap I wanted to know where R was going in general. Like if there was a target for 3.0, etc. Maybe it would better apply to RGui, I admit I have some difficulties to distinguish one project from the other. Prof Brian Ripley a écrit : On Mon, 2 Feb 2009, Etienne B. Racine wrote: I can't find any R roadmap. Is it available somewhere ? What are you expecting to find? There is a lot of information on the developer site (developer.r-rproject.org), and planned changes in the next 2.x.0 release are in the NEWS file in the SVN archive (and in snapshots). __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Getting 'LinkingTo' to find the right library
Where did you get the idea that R CMD INSTALL is reading .Rprofile? (AFAIR it does so only to find the installation library, as R CMD INSTALL --help says it will.) You need to set R_LIBS in the environment to get the library path you want. This is not specific to 'LinkingTo'. On Mon, 2 Feb 2009, setzer.wood...@epamail.epa.gov wrote: I am experimenting with exporting pointers to some of the functions in deSolve so that other packages may import them, using the 'R_RegisterCCallable' mechanism. I have added a header file and some other C code in inst/include of the deSolve source package that need to be accessible to other packages. I have a site-library set up in Rprofile.site where all installed packages go, and as long as my experimental version of deSolve is installed there, I'd like to install my modified copy of deSolve in a test library. However, when I try to install my test package (which includes both Depends: deSolve and LinkingTo: deSolve, in its Description file, as described in 'R Extensions'), compilation fails, because the appropriate C code cannot be found (there is also an unrelated problem in deSolve_stubs.c triggering the "unexpected ')' before '*' token" error). [test]$ R CMD INSTALL -l C:/home/Rlib-test dma -- Making package dma adding build stamp to DESCRIPTION installing NAMESPACE file and metadata making DLL ... gcc -std=gnu99 -Ic:/PROGRA~1/R/R-28~1.1PA/include -I"C:/PROGRA~1/R/site-librar y/deSolve/include"-O3 -Wall -c R_init_dma.c -o R_init_dma.o R_init_dma.c:1:27: error: deSolve_stubs.c: No such file or directory R_init_dma.c:3: error: expected ')' before '*' token make[3]: *** [R_init_dma.o] Error 1 make[2]: *** [srcDynlib] Error 2 make[1]: *** [all] Error 2 make: *** [pkg-dma] Error 2 *** Installation of dma failed *** Removing 'C:/home/Rlib-test/dma' It seems that although the 'site-library/deSolve/include' folder is included in the search list for included files, the 'Rlib-test/deSolve/include' folder is not. The folder that includes both the experimental version of deSolve and the test package dma also contains a .Rprofile file which places 'C:/home/Rlib-test' at the front of the library search path, and I have confirmed that this is so (in fact, the above INSTALL command does not need the '-l ' argument; the default install location is Rlib-test for installs from this folder). It looks as if the code in INSTALL that sets up the -I arguments to gcc does not find the library path defined for this folder. Can someone point me to the right way to do this? System information: Version: platform = i386-pc-mingw32 arch = i386 os = mingw32 system = i386, mingw32 status = Patched major = 2 minor = 8.1 year = 2009 month = 01 day = 04 svn rev = 47474 language = R version.string = R version 2.8.1 Patched (2009-01-04 r47474) Windows XP (build 2600) Service Pack 2 Locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 Search Path: .GlobalEnv, package:stats, package:graphics, package:grDevices, package:utils, package:datasets, package:methods, Autoloads, package:base R. Woodrow Setzer, Ph. D. National Center for Computational Toxicology http://www.epa.gov/comptox US Environmental Protection Agency Mail Drop B205-01/US EPA/RTP, NC 27711 Ph: (919) 541-0128Fax: (919) 541-1194 __ R-devel@r-project.org mailing list 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/ 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
Re: [Rd] Roadmap ?
On Mon, 2 Feb 2009, Etienne B. Racine wrote: I can't find any R roadmap. Is it available somewhere ? What are you expecting to find? There is a lot of information on the developer site (developer.r-rproject.org), and planned changes in the next 2.x.0 release are in the NEWS file in the SVN archive (and in snapshots). -- Brian D. Ripley, rip...@stats.ox.ac.uk 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
Re: [Rd] Getting 'LinkingTo' to find the right library
(I just realized that when "they" upgraded my mail program, "they" reset my preferences to send html and text for internet mail. I have fixed the preferences to text only, and apologize). Well, where would I get the idea it was NOT reading .Rprofile, since it clearly IS reading Rprofile.site? However, I mainly thought that the library being installed to would be used to find the dependent package, because of this bug fix entry for version 2.7.2: o The use of multiple packages in 'LinkingTo' works again, and now works when the dependent packages are in the library to be installed to (but not in the library path seen by R --vanilla). Also, in this paragraph from the INSTALL help item: To install into the library tree 'lib', use 'R CMD INSTALL -l lib pkgs'. This prepends 'lib' to 'R_LIBS' for duration of the install, so required packages in the installation directory will be found (and used in preference to those in other libraries). Setting R_LIBS works (I DID try this before, but must have fumbled something). R. Woodrow Setzer, Ph. D. National Center for Computational Toxicology http://www.epa.gov/comptox US Environmental Protection Agency Mail Drop B205-01/US EPA/RTP, NC 27711 Ph: (919) 541-0128Fax: (919) 541-1194). Prof Brian Ripley wrote on 02/02/2009 04:22:52 PM: > [image removed] > > Re: [Rd] Getting 'LinkingTo' to find the right library > > Prof Brian Ripley > > to: > > Woodrow Setzer > > 02/02/2009 04:22 PM > > Cc: > > r-devel > > Where did you get the idea that R CMD INSTALL is reading .Rprofile? > (AFAIR it does so only to find the installation library, as R CMD > INSTALL --help says it will.) > > You need to set R_LIBS in the environment to get the library path you > want. This is not specific to 'LinkingTo'. > > On Mon, 2 Feb 2009, setzer.wood...@epamail.epa.gov wrote: > > > > > I am experimenting with exporting pointers to some of the functions in > > deSolve so that other packages may import them, using the > > 'R_RegisterCCallable' mechanism. I have added a header file and some > > other C code in inst/include of the deSolve source package that need to > > be accessible to other packages. I have a site-library set up in > > Rprofile.site where all installed packages go, and as long as my > > experimental version of deSolve is installed there, I'd like to install > > my modified copy of deSolve in a test library. However, when I try to > > install my test package (which includes both Depends: deSolve and > > LinkingTo: deSolve, in its Description file, as described in 'R > > Extensions'), compilation fails, because the appropriate C code cannot > > be found (there is also an unrelated problem in deSolve_stubs.c > > triggering the "unexpected ')' before '*' token" error). > > > > [test]$ R CMD INSTALL -l C:/home/Rlib-test dma > > > > > > -- Making package dma > > adding build stamp to DESCRIPTION > > installing NAMESPACE file and metadata > > making DLL ... > > gcc -std=gnu99 -Ic:/PROGRA~1/R/R-28~1.1PA/include > > -I"C:/PROGRA~1/R/site-librar > > y/deSolve/include"-O3 -Wall -c R_init_dma.c -o R_init_dma.o > > R_init_dma.c:1:27: error: deSolve_stubs.c: No such file or directory > > R_init_dma.c:3: error: expected ')' before '*' token > > make[3]: *** [R_init_dma.o] Error 1 > > make[2]: *** [srcDynlib] Error 2 > > make[1]: *** [all] Error 2 > > make: *** [pkg-dma] Error 2 > > *** Installation of dma failed *** > > > > Removing 'C:/home/Rlib-test/dma' > > > > It seems that although the 'site-library/deSolve/include' folder is > > included in the search list for included files, the > > 'Rlib-test/deSolve/include' folder is not. The folder that includes > > both the experimental version of deSolve and the test package dma also > > contains a .Rprofile file which places 'C:/home/Rlib-test' at the front > > of the library search path, and I have confirmed that this is so (in > > fact, the above INSTALL command does not need the '-l ' argument; the > > default install location is Rlib-test for installs from this folder). > > It looks as if the code in INSTALL that sets up the -I arguments to gcc > > does not find the library path defined for this folder. Can someone > > point me to the right way to do this? > > > > System information: > > Version: > > platform = i386-pc-mingw32 > > arch = i386 > > os = mingw32 > > system = i386, mingw32 > > status = Patched > > major = 2 > > minor = 8.1 > > year = 2009 > > month = 01 > > day = 04 > > svn rev = 47474 > > language = R > > version.string = R version 2.8.1 Patched (2009-01-04 r47474) > > > > Windows XP (build 2600) Service Pack 2 > > > > Locale: > > LC_COLLATE=English_United States.1252;LC_CTYPE=English_United > > States.1252;LC_MONETARY=English_United > > States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 > > > > Search Path: > > .GlobalEnv, package:stats, package:graphics, package:grDevices, > > package:utils, package:datasets, package:methods, Autoloa
[Rd] Arima_Like() and NaN - a (possible) problem, a patch, and RFC
Hi, recently I have started working with R (v. 2.7.2), and I have been using R's internal ARIMA_Like() function (from the "stats" package) to estimate some ARIMA models. In particular, I use ARIMA_Like() in a function "fn()" that I feed to the optim() method; the main goal is to find optimal ARIMA prediction models for some time series. The ARIMA_Like() function returns a three elements vector; under some conditions (that I could not yet spot), the second element of this vector is a 'NaN'. Since fn() is using this value to compute its return value, it suddenly returns 'NaN' and optim() warns me about it: Error in optim(init[mask], armafn, method = "BFGS", hessian = TRUE, control = optim.control, : non-finite finite-difference value [2] I looked into the code (file src/arima.c of the stats package) and noticed that this second element is a sum of logarithmic terms, computed through the following snippet of code: gain = M[0]; for (j = 0; j < d; j++) gain += delta[j] * M[r + j]; if(gain < 1e4) { nu++; ssq += resid * resid / gain; sumlog += log(gain); } Here, sumlog is the second element of the resulting vector. However, the "if(gain < 1e4) {" check does not explicitly check against negative values of the gain variable. Indeed, whenever the gain variable assumes a negative value, the statement "sumlog += log(gain);" evalutes to NaN. I changed the check as follows: if (gain > 0 && gain < 1e4) { This avoids computation of logarithms on negative values. I recompiled and reinstalled R, and the sumlog value is no more 'NaN'. As a result, optim() never warns about the non-finite finite-difference value. Here is my question: does this modification make any sense? Have I missed something big? To me, it looks reasonable to avoid computing log(x) when x < 0, but maybe returning 'NaN' may have its purposes. Could someone please clarify this? I searched the mailing list archives and I could not spot anything even close to this argument, which may be an indication that I am doing something really wrong, but I would like to understand why. Best regards Mauro Andreolini __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Flag '#' in sprintf() gives an error in R v2.9.0 devel
Hi, in R v2.8.1 patched (2008-12-22 r47296) the following works: > sprintf("%#x", 1) [1] "0x1" whereas in R v2.9.0 devel (2009-01-08 r47515) it gives: > sprintf("%#x", 1); Error in sprintf("%#x", 1) : use format %f, %e, %g or %a for numeric objects Not sure if this was an intended move or not. DETAILS: Typically, the '#' flag modifies the output of (s)printf() as follows: "# Used with o, x or X specifiers the value is preceeded with 0, 0x or 0X respectively for values different than zero. Used with e, E and f, it forces the written output to contain a decimal point even if no digits would follow. By default, if no digits follow, no decimal point is written. Used with g or G the result is the same as with e or E but trailing zeros are not removed." Source: http://www.cplusplus.com/reference/clibrary/cstdio/printf.html I know there are many flavors of what format strings printf() supports and I don't have the Kernighan & Ritchie book in help(sprintf). /Henrik __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel