[Rd] Mac OS X 2.5.1 / reg-plot.R / tr (PR#10781)
In building R 2.6.2 from source for Mac OS X 2.5.1 (with i686-apple-darwin9-gcc-4.0.1), 'make check' fails. The failure is in reg-plot.R, and occurs because Mac OS X's 'tr' command (invoked by Rdiff to strip carriage returns) regards the dagger sign in reg-plot.ps as an illegal byte sequence. I'm surprised that this doesn't seem to have been reported before, but it was already present at least in R 2.6.1 Incidentally, couldn't the handling of line endings now be left to svn:eol-style? Andrew Runnalls -- Dr Andrew Runnalls, Computing Laboratory, University of Kent, CANTERBURY CT2 7NF, UK Tel: (0)1227 823821 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Mac OS X 2.5.1 / reg-plot.R / tr (PR#10781)
On 17/02/2008 8:35 AM, [EMAIL PROTECTED] wrote: In building R 2.6.2 from source for Mac OS X 2.5.1 (with i686-apple-darwin9-gcc-4.0.1), 'make check' fails. The failure is in reg-plot.R, and occurs because Mac OS X's 'tr' command (invoked by Rdiff to strip carriage returns) regards the dagger sign in reg-plot.ps as an illegal byte sequence. I'm surprised that this doesn't seem to have been reported before, but it was already present at least in R 2.6.1 Incidentally, couldn't the handling of line endings now be left to svn:eol-style? svn:eol-style assumes that the machine which checks out the working copy is the same as the machine doing the editing. You get really horrible messes when you do something like mounting a Unix drive on a PC, or emailing a file from one system to another, etc. I've worked with it and without it, and I much prefer working without it. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Mac OS X 2.5.1 / reg-plot.R / tr (PR#10781)
Please do as we ask in both the FAQ and posting guide and check the current working copy of R, which does this differently. On Sun, 17 Feb 2008, [EMAIL PROTECTED] wrote: In building R 2.6.2 from source for Mac OS X 2.5.1 (with i686-apple-darwin9-gcc-4.0.1), 'make check' fails. The failure is in reg-plot.R, and occurs because Mac OS X's 'tr' command (invoked by Rdiff to strip carriage returns) regards the dagger sign in reg-plot.ps as an illegal byte sequence. Known for certain locales: we do ask you to report yours (part of the 'at a minimum' information requested in the posting guide). I'm surprised that this doesn't seem to have been reported before, but it was already present at least in R 2.6.1 It has been, and fixed before! From the svn logs r44231 | ripley | 2008-01-29 12:45:00 + (Tue, 29 Jan 2008) | 1 line MacOS tr does not cope with Latin-1 chars in a UTF-8 locale Incidentally, couldn't the handling of line endings now be left to svn:eol-style? Have you read the code concerned? It says ## some packages ship .Rout.save with CRLF endings and we have no control over what line-endings third-party packages ship with. -- 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] An R SPAM Filter
Hi, I'm just wondering does anyone know of a good site that would assist me in creating a spam filter through R? It is for a college project. I have searched the net but cannot find anything of relevance. Any help would be greatly appreciated Regards, -- View this message in context: http://www.nabble.com/An-R-SPAM-Filter-tp15530304p15530304.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
Re: [Rd] An R SPAM Filter
On 17 February 2008 at 06:35, hoogeebear wrote: | I'm just wondering does anyone know of a good site that would assist me in | creating a spam filter through R? It is for a college project. I have | searched the net but cannot find anything of relevance. Any help would be | greatly appreciated a) You are using the wrong mailing list. This is a question for r-help. b) One starting point may be the (generally recommeded) Friedman / Hastie / Tibshirani book at http://www-stat.stanford.edu/~tibs/ElemStatLearn/ and in Google Book Search at http://books.google.com/books?id=VRzITwgNV2UCdq=elements+of+statistical+learning which also has a matching CRAN package http://cran.r-project.org/web/packages/ElemStatLearn/index.html as it uses Spam detection as a running example. Start with code therein. Hope this helps, 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
[Rd] NAMESPACEs and S4 classes
I'd like to have two packages with S4 classes with the same name but different implementation. To that end I create a package tmpA with setClass(A, representation=representation( x=numeric), sealed=TRUE) setClass(B, representation=representation( x=numeric)) B - function(...) new(B, ...) and a NAMESPACE having only import(methods) export(B) I duplicate this package source directory structure, renaming the duplicate package tmpB in its Description file. After R CMD INSTALL'ing both, I library(tmpA) library(tmpB) Error in setClass(A, representation = representation(x = numeric), : A has a sealed class definition and cannot be redefined Error : unable to load R code in package 'tmpB' Error: package/namespace load failed for 'tmpB' setClass(A, prototype(y=numeric)) Error in setClass(A, c(y = numeric)) : A has a sealed class definition and cannot be redefined It appears that, although 'where' in setClass influences the location of the class definition, there is a global class table that means only one class of a particular name can ever be defined. Is that the intended behavior? If I create a class B in the global environment setClass(B, representation(y=numeric)) [1] B and then use the constructor from tmpA, I end up with an instance of the globally defined class B, rather than the one defined in the constructor's name space: B() An object of class B Slot y: numeric(0) How would I write B to return an instance of B as defined in tmpA? Thanks, Martin sessionInfo() R version 2.7.0 Under development (unstable) (2008-02-09 r44397) x86_64-unknown-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=en_US.UTF-8;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 datasets utils methods base other attached packages: [1] tmpA_1.0 -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M2 B169 Phone: (206) 667-2793 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Arithmetic bug? (found when use POSIXct) (PR#10776)
OK. Good point. Note that that article was written 4 years ago when R was at version 1.9 and POSIXt did not fully support subseconds. At that time, POSIXct could represent subseconds internally but it was not used as POSIXlt did not yet support it and that and the associated digits.sec option did not come until R version 2.3, released two years after the article was written. Try setting the digits.secs option before you run the command like this: options(digits.secs = 3) dp - Sys.time() dp-as.POSIXct(format(dp,tz=GMT)) Time difference of -5 hours On Feb 17, 2008 3:50 PM, [EMAIL PROTECTED] wrote: Hi Gabo, FAQ 7.31 does not apply to this. numeric in R is 64bit which is large eno= ugh to handle this. I figured out the cause is that Sys.time() gives millisecond value while b-as.POSIXct(format(a,tz=3DGMT)) cuts off that part.=20 Then of course a-b is not 5 hours! Do it again with options(digits=3D22) and you will see what actually happ= ened there. The recommended code from R News is not aware the truth that POSIXlt can re= present sub-second time. Cheers, B _ Helping your favorite cause is as easy as instant messaging.=A0You IM, we g= ive. [[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] Arithmetic bug? (found when use POSIXct) (PR#10776)
Hi Gabo, FAQ 7.31 does not apply to this. numeric in R is 64bit which is large eno= ugh to handle this. I figured out the cause is that Sys.time() gives millisecond value while b-as.POSIXct(format(a,tz=3DGMT)) cuts off that part.=20 Then of course a-b is not 5 hours! Do it again with options(digits=3D22) and you will see what actually happ= ened there. The recommended code from R News is not aware the truth that POSIXlt can re= present sub-second time. Cheers, B _ Helping your favorite cause is as easy as instant messaging.=A0You IM, we g= ive. [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Arithmetic bug? (found when use POSIXct) (PR#10776)
Yea I thought that would be the story behind it. Thanks. Date: Sun, 17 Feb 2008 16:15:27 -0500 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [Rd] Arithmetic bug? (found when use POSIXct) (PR#10776) CC: [EMAIL PROTECTED] OK. Good point. Note that that article was written 4 years ago when R was at version 1.9 and POSIXt did not fully support subseconds. At that time, POSIXct could represent subseconds internally but it was not used as POSIXlt did not yet support it and that and the associated digits.sec option did not come until R version 2.3, released two years after the article was written. Try setting the digits.secs option before you run the command like this: options(digits.secs = 3) dp - Sys.time() dp-as.POSIXct(format(dp,tz=GMT)) Time difference of -5 hours On Feb 17, 2008 3:50 PM, [EMAIL PROTECTED] wrote: Hi Gabo, FAQ 7.31 does not apply to this. numeric in R is 64bit which is large eno= ugh to handle this. I figured out the cause is that Sys.time() gives millisecond value while b-as.POSIXct(format(a,tz=3DGMT)) cuts off that part.=20 Then of course a-b is not 5 hours! Do it again with options(digits=3D22) and you will see what actually happ= ened there. The recommended code from R News is not aware the truth that POSIXlt can re= present sub-second time. Cheers, B _ Helping your favorite cause is as easy as instant messaging.=A0You IM, we g= ive. [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel _ 08 [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel