[Rd] Is there a version of RMySQL for Windows?
I was trying to email directly the developer, David A. James, but all the emails bounce... Does anyone know if RMySQL may be re-compiled under Windows and what are the limitations? Cheers, Michal This email is confidential and intended solely for the use o...{{dropped}} __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Is there a version of RMySQL for Windows?
On Mon, 27 Nov 2006, Michal Okoniewski wrote: > I was trying to email directly the developer, David A. James, but all > the emails bounce... > Does anyone know if RMySQL may be re-compiled under Windows > and what are the limitations? It may. The limitations are that you need to make use of a closely matching MySQL to the one you compile the package against: we have in the past found even patchlevel differences led to crashes. Are you using the current gmail address for David James? He left Bell Labs a couple of months ago. -- 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
[Rd] as.Date: conversion pb from POSIXct (PR#9386)
Full_Name: Xiao Gang FAN Version: 2.4.0 OS: Windows Submission from: (NULL) (159.50.101.9) > library(chron) > as.Date(as.POSIXct(strptime("1994-01-24","%Y-%m-%d"))) [1] "1994-01-23" __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] as.Date: conversion pb from POSIXct (PR#9386)
as.Date is converting your object with respect to GMT time zone and in that time zone your POSIXct date is the day before. See ?as.Date and also suggest you read R News 4/1 help desk article. On 11/27/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Full_Name: Xiao Gang FAN > Version: 2.4.0 > OS: Windows > Submission from: (NULL) (159.50.101.9) > > > > library(chron) > > as.Date(as.POSIXct(strptime("1994-01-24","%Y-%m-%d"))) > [1] "1994-01-23" > > __ > 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] Is there a version of RMySQL for Windows?
There are some pre-built binaries here: http://stat.bell-labs.com/RS-DBI/download/index.html -roger Michal Okoniewski wrote: > I was trying to email directly the developer, David A. James, but all > the emails bounce... > Does anyone know if RMySQL may be re-compiled under Windows > and what are the limitations? > > Cheers, > Michal > > > > > This email is confidential and intended solely for the use o...{{dropped}} > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Roger D. Peng | http://www.biostat.jhsph.edu/~rpeng/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] as.Date: conversion pb from POSIXct (PR#9386)
You have not told us your timezone, but this seems to be as documented if you are in CET. The help page says The 'as.Date' methods accept character strings, factors, logical 'NA' and objects of classes '"POSIXlt"' and '"POSIXct"'. (The last are converted to days by ignoring the time after midnight in the representation of the time in UTC.) ^^ Probably as.POSIXct(strptime("1994-01-24","%Y-%m-%d") is 1994-01-23 23:00 in UTC in your timezone. On Mon, 27 Nov 2006, [EMAIL PROTECTED] wrote: > Full_Name: Xiao Gang FAN > Version: 2.4.0 > OS: Windows > Submission from: (NULL) (159.50.101.9) > > >> library(chron) Irrelevant. >> as.Date(as.POSIXct(strptime("1994-01-24","%Y-%m-%d"))) > [1] "1994-01-23" Not in my timezone. -- 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
[Rd] package tseries: plot.irts() - time axis label pb (PR#9387)
Full_Name: Xiao Gang FAN Version: 2.4.0 OS: Windows Submission from: (NULL) (159.50.101.9) > library(tseries) > plot(irts(seq(as.POSIXct("1991-01-01"), by="month", length=100),rnorm(100))) in the x-axix, the label is "Jan 01, Jan 01, Jan 01, " version of tseries: 0.10-7 Date: 2006-10-04 Built: R 2.4.0; i386-pc-mingw32; 2006-10-05 09:46:32; windows also tried on other versions on CRAN, same pb __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] R.DLL mapping by P/Invoke
After a long processing, I was able to create a version of a small C# class that was able to emulate the rproxy by P/Invoke. This is mostly to find a workaround a performance problem of the StatConnector. It's almost work but ... I have strange memory exception when I call the print function. The variable seems to not survive from one call to the other. As there is no debug symbol for the R.DLL (and I don't want to spend my youth on the disassembly window of VS), I put there the result of my search. If some of you can find the reason of the crash, I will be extremely happy! Here is a sample program.cs to invoke the DLL (and crash) : using System; using System.Collections; using System.Text; namespace SharpR { class Program { static void Main(string[] args) { RWrapper.EvaluateNoReturn("print(\"Boom!\")"); } } } #define SUPERCONSOLE using System; using System.Collections; using System.Runtime.InteropServices; using System.Text; using Microsoft.Win32; namespace SharpR { /// /// Class for interp with the R.DLL. All is static as R is mono-threaded. /// class RWrapper { #region //- DLL Management/Information [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] [return: MarshalAs(UnmanagedType.LPStr)] static extern string getDLLVersion(); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] [return: MarshalAs(UnmanagedType.LPStr)] static extern string get_R_HOME(); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] [return: MarshalAs(UnmanagedType.LPStr)] static extern string getRUser(); //- R Start Up [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern void R_setStartTime(); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern void R_DefParams(ref RStartStruct @params); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern void R_SetParams(ref RStartStruct @params); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern void R_set_command_line_arguments(int argc, string[] args); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern int GA_initapp(int argc, string[] args); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern void readconsolecfg(); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern void setup_Rmainloop(); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern void R_ReplDLLinit(); //- R SEXP management [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern IntPtr Rf_mkString(string toConvert); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern IntPtr Rf_protect(IntPtr ptr); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern void Rf_unprotect(int l); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern void Rf_unprotect_ptr(IntPtr ptr); //- R Parser/Eval [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern IntPtr R_ParseVector(IntPtr str, int x, out RParseStatus result); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern IntPtr R_tryEval(IntPtr exp, IntPtr env, out int evalError); //- R Symbols [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern IntPtr Rf_install(string name); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern IntPtr Rf_findVar(IntPtr symbol, IntPtr env); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] static extern void Rf_setVar(IntPtr symbol, IntPtr value, IntPtr env); #endregion #region enum RParseStatus { PARSE_NULL, PARSE_OK, PARSE_INCOMPLETE, PARSE_ERROR, PARSE_EOF }; enum SaType { SA_NORE
[Rd] write.matrix error (PR#9388)
Full_Name: Ming-Chung Li Version: 2.4.0 OS: windows xp Submission from: (NULL) (65.125.12.222) Hi, My pc has 1gb physical ram and 1.5gb virtual memory. The write.matrix() function in MASS library gives an error when I try it to output a large matrix to a file. Please see the follwing code to reproduce the problem. The problem also happends in R 2.3.1 too. The write.table() does not have any error. Thanks, Ming-Chung > x <- matrix(rnorm(10*300), 10, 300) > library(MASS) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 247519 6.7 467875 12.5 453068 12.1 Vcells 30107442 229.8 90360081 689.4 90227465 688.4 > write.matrix(x, file = "c:/temp/temp.txt") Error in .Call("R_lazyLoadDBfetch", key, file, compressed, hook, PACKAGE = "base ") : recursive default argument reference > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] error in xYplot from Hmisc. (PR#9389)
Hello, I was simply doing a graph, but an error repeatdly occurs. Any idea why? (this only happens in the latest R version, I am a windows user). Thank you, Marta library(Hmisc) > example(xYplot) xYplot> d <- expand.grid(x = seq(0, 2 * pi, length = 150), p = 1:3, shift = c(0, pi)) xYplot> xYplot(sin(x + shift)^p ~ x | shift, groups = p, data = d, type = "l") Loading required package: grid Error in xyplot.formula(formula = sin(x + shift)^p ~ x | shift, data = list( : argument "x" is missing, with no default > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] error in xYplot from Hmisc. (PR#9389)
On 11/27/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > > I was simply doing a graph, but an error repeatdly occurs. Any idea why? > (this only happens in the latest R version, I am a windows user). What version is that exactly? Please give the output of sessionInfo(), since "the latest R version" means different things to different people. > Thank you, > Marta > > > library(Hmisc) > > example(xYplot) > > xYplot> d <- expand.grid(x = seq(0, 2 * pi, length = 150), > p = 1:3, shift = c(0, pi)) > > xYplot> xYplot(sin(x + shift)^p ~ x | shift, groups = p, data = d, > type = "l") > Loading required package: grid > Error in xyplot.formula(formula = sin(x + shift)^p ~ x | shift, data = > list( : > argument "x" is missing, with no default And what made you come to the conclusion that this is a bug in R? In this case, I'm pretty sure your version of Hmisc is an old one. Run update.packages() and try again. -Deepayan __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Source references from the parser
Hi Duncan, all, Duncan Murdoch <[EMAIL PROTECTED]> writes: > This is now committed. > > I used keep.source, exactly the same as the option() that controls this > behaviour in other places. > > I decided to set the default to TRUE. This means vignettes will all > look different in R-devel. I'd really like the default to be FALSE, at least for the upcoming release. As you note, the change will cause vignettes to look different. There are over 260 vignettes in the BioC source tree and given that most developers have little extra time, I would rather they not have to review these docs because of this change. > The simplest way to get the previous > appearance is to put in > > \SweaveOpts{keep.source=FALSE} > > but in most cases I think people will want the new behaviour. It's only > bad if the code was badly formatted or contained comments you don't want > to show up in the final document. I'm glad the feature is there, I think it is desirable. I hope to turn this option on when I write new documents ;-) + seth __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Source references from the parser
On 11/27/2006 7:56 PM, Seth Falcon wrote: > Hi Duncan, all, > > Duncan Murdoch <[EMAIL PROTECTED]> writes: >> This is now committed. >> >> I used keep.source, exactly the same as the option() that controls this >> behaviour in other places. >> >> I decided to set the default to TRUE. This means vignettes will all >> look different in R-devel. > > I'd really like the default to be FALSE, at least for the upcoming > release. As you note, the change will cause vignettes to look > different. There are over 260 vignettes in the BioC source tree and > given that most developers have little extra time, I would rather they > not have to review these docs because of this change. The next release hasn't been scheduled, but it's likely to be 2.4.1, sometime in December. These changes won't be in that release. They're in R-devel, which will become 2.5.0 sometime in April. I'd rather leave the default as TRUE for now, and make a final decision on it sometime near when the alpha test period starts in February or early March. If the default is set to FALSE now, then it won't get tested, and I'd much rather hear about bugs in the implementation before release, rather than after. I'd also like to know if the \SweaveOpts line below fails on any systems, and whether there's an easier way to turn the option off. (I've tested it in R 2.4.0 patched, but not in older systems.) If it is compatible with all old versions, then a sed script to insert it into all 260 of your vignettes would be pretty easy to write; the main cost would then be to replace the current package versions with new versions containing this change. How many packages are we talking about, that wouldn't otherwise be updated before April? My inclination would be to default to TRUE in the long term, on the basis that doing nothing to the user's code should be the default, rather than the option. The fact that this changes the look of documents from existing packages is obviously an argument in favour of a FALSE default. So the final decision hasn't been made yet. >> The simplest way to get the previous >> appearance is to put in >> >> \SweaveOpts{keep.source=FALSE} >> >> but in most cases I think people will want the new behaviour. It's only >> bad if the code was badly formatted or contained comments you don't want >> to show up in the final document. > > I'm glad the feature is there, I think it is desirable. I hope to > turn this option on when I write new documents ;-) Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] package tseries: plot.irts() - time axis label pb (PR#9387)
When I try it with R "R version 2.4.0 Patched (2006-10-24 r39722)" on Windows XP and the same version of tseries as yours I get tick marks labelled 1992, 1994, 1996, 1998. Try it again with a later version of R. On 11/27/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Full_Name: Xiao Gang FAN > Version: 2.4.0 > OS: Windows > Submission from: (NULL) (159.50.101.9) > > > > library(tseries) > > plot(irts(seq(as.POSIXct("1991-01-01"), by="month", length=100),rnorm(100))) > > in the x-axix, the label is "Jan 01, Jan 01, Jan 01, " > > version of tseries: 0.10-7 > Date: 2006-10-04 > Built: R 2.4.0; i386-pc-mingw32; 2006-10-05 09:46:32; windows > also tried on other versions on CRAN, same pb > > __ > 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