Re: [R-SIG-Mac] Tab setting in R.app editor
On Jun 9, 2012, at 2:05 AM, zListserv wrote: Is there a way to change to default tab stop setting from the present 4 characters (stops at 5, 9, etc) to 8 characters (stops at 9, 17, etc)? Yes, you can set it by executing the following line in the Terminal: defaults write org.R-project.R R Script Editor tab width 8 Regards, --Hans ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] as.Date() does not work with format %B
Not that this is at all likely to be helpful, but it seems to be month dependent in my locale: strftime(1998-07-09, %d %B %Y) [1] 09 July 1998 as.Date(09 July 1998, %d %B %Y) [1] 1998-07-09 Sys.getlocale() [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 # Now switch to france Sys.setlocale(LC_TIME, fr_FR.UTF-8) [1] fr_FR.UTF-8 strftime(1998-07-09, %d %B %Y) [1] 09 juillet 1998 as.Date(09 juillet 1998, %d %B %Y) [1] NA as.Date(09 avril 1998, %d %B %Y) [1] 1998-04-09 and more generally as.Date(strftime(paste(1998,1:12,09, sep = -), %d %B %Y), %d %B %Y) [1] 1998-01-09 1998-02-09 1998-03-09 1998-04-09 1998-05-09 [6] 1998-06-09 NA 1998-08-09 1998-09-09 1998-10-09 [11] 1998-11-09 1998-12-09 Sys.setlocale(LC_TIME, en_US.UTF-8) sessionInfo() R version 2.15.0 (2012-03-30) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] graphics grDevices utils datasets compiler stats methods [8] base other attached packages: [1] lattice_0.20-6 ggplot2_0.9.1 quantmod_0.3-18 TTR_0.21-1 [5] xts_0.8-7 zoo_1.7-7 Defaults_1.1-1 loaded via a namespace (and not attached): [1] colorspace_1.1-1 dichromat_1.2-4digest_0.5.2 grid_2.15.0 [5] labeling_0.1 MASS_7.3-18memoise_0.1munsell_0.3 [9] plyr_1.7.1 proto_0.3-9.2 RColorBrewer_1.0-5 reshape2_1.2.1 [13] scales_0.2.1 stringr_0.6 Not sure why that would be though... Michael On Sat, Jun 9, 2012 at 4:17 AM, Milan Bouchet-Valat nalimi...@club.fr wrote: Hi! I currently experience a problem with my package tm.plugin.factiva on Macs. I need to parse a locale-dependent date string into a proper Date object. It works fine on Linux and Windows, but on a Mac I've tested, parsing dates containing the %B format (for full month name) does not work. It's very easy to reproduce (here in French, but it's straightforward to adapt it to your locale): # Check that formatting dates works: OK strftime(1998-07-09, %d %B %Y) [1] 09 juillet 1998 # Try to convert the same string to a date: FAIL as.Date(9 juillet 1998, format=%d %B %Y) [1] NA as.Date(09 juillet 1998, format=%d %B %Y) [1] NA The locale looks good: Sys.getlocale() [1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.UTF-8 And setting LC_TIME manually does not change anything: Sys.setlocale(LC_TIME, fr_FR.UTF-8) [1] fr_FR.UTF-8 as.Date(9 juillet 1998, %d %B %Y) [1] NA FWIW, I've also tried using strptime() instead of as.Date(), and the problem is the same. This is with R 2.15.0 on Mac OS 10.6.8. sessionInfo() R version 2.15.0 (2012-03-30) Platform: i386-apple-darwin9.8.0/i386 (32-bit) locale: [1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base Any clues much appreciated! ;-) ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] as.Date() does not work with format %B
On Jun 9, 2012, at 13:54 , R. Michael Weylandt wrote: as.Date(strftime(paste(1998,1:12,09, sep = -), %d %B %Y), %d %B %Y) [1] 1998-01-09 1998-02-09 1998-03-09 1998-04-09 1998-05-09 [6] 1998-06-09 NA 1998-08-09 1998-09-09 1998-10-09 [11] 1998-11-09 1998-12-09 Looks like this is http://lists.freebsd.org/pipermail/freebsd-bugs/2009-December/037796.html which was fixed in May 2010, but apparently hasn't percolated down to the OSX updates yet. (Still there in local build on Lion, so not just CRAN binaries. Insert appropriate rant about Open Source and commercial vendors here...) Summary of bug: strptime with %B goes through the months and checks for full name, then abbreviation. Problem is that jui of juillet matches abbr. for juin! but llet mismatches %Y and we get the NA. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] as.Date() does not work with format %B
Le samedi 09 juin 2012 à 15:01 +0200, peter dalgaard a écrit : On Jun 9, 2012, at 13:54 , R. Michael Weylandt wrote: as.Date(strftime(paste(1998,1:12,09, sep = -), %d %B %Y), %d %B %Y) [1] 1998-01-09 1998-02-09 1998-03-09 1998-04-09 1998-05-09 [6] 1998-06-09 NA 1998-08-09 1998-09-09 1998-10-09 [11] 1998-11-09 1998-12-09 Looks like this is http://lists.freebsd.org/pipermail/freebsd-bugs/2009-December/037796.html which was fixed in May 2010, but apparently hasn't percolated down to the OSX updates yet. (Still there in local build on Lion, so not just CRAN binaries. Insert appropriate rant about Open Source and commercial vendors here...) Summary of bug: strptime with %B goes through the months and checks for full name, then abbreviation. Problem is that jui of juillet matches abbr. for juin! but llet mismatches %Y and we get the NA. OK, much thanks for the pointer! As I don't have access to the OS X machine, I did not play enough with it to discover only July has problems. I think I'm going to introduce a workaround for French, if Lion still has the bug, it's going to be there for ages on other versions. Thanks again. ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] Tab setting in R.app editor
On Jun 9, 2012, at 5:03 AM, Hans-Jörg Bibiko wrote: On Jun 9, 2012, at 2:05 AM, zListserv wrote: Is there a way to change to default tab stop setting from the present 4 characters (stops at 5, 9, etc) to 8 characters (stops at 9, 17, etc)? Yes, you can set it by executing the following line in the Terminal: defaults write org.R-project.R R Script Editor tab width 8 Thanks, Hans for that taste of customization. And thanks for all your work on R.app. Is there a more general list of features that could be adjusted? Is the Script Editor built on a platform that is more generally used and might have external documentation? - David Winsemius, MD West Hartford, CT ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] Error in xzfile(file, wb, compression = 9)
Here is the solution. David suggested it was a Parallels setting. I searched through the Parallels documentation. I turned off the option to share Mac programs with the Windows machine. Then I rebooted both the Mac and the Windows within it. Now it works correctly. I think what I did was overkill. My guess is that some form of controlled sharing should be possible. I don't need that feature now so I will not take this any further at this time. My guess is rebooting the Windows might have been sufficient, it was definitely necessary because rebooting the Mac and leaving the Windows suspended didn't do it. On Fri, Jun 8, 2012 at 6:36 PM, Richard M. Heiberger r...@temple.edu wrote: cygwin has bin/xz the mac doesnt have xz in its /bin I won't follow through today. reading the r code for Browse[1] xzfile function (description, open = , encoding = getOption(encoding), compression = 6) .Internal(xzfile(description, open, encoding, compression)) bytecode: 0x095cce70 environment: namespace:base is the next step, but not today. On Fri, Jun 8, 2012 at 6:09 PM, Richard M. Heiberger r...@temple.eduwrote: I am using exactly the same Rtools etc on both the real Windows machine and the Parallels version on the Mac. FOllowigin your hint I am sure the problem is a file extension association inside parallels. The trick is to find it. I am now doing a find / -name xz on both machines. Is it true that noone else has attempted to build a package on the windows side of a parallels windows on a mac? On Fri, Jun 8, 2012 at 5:56 PM, David Winsemius dwinsem...@comcast.netwrote: On Jun 8, 2012, at 5:16 PM, Richard M. Heiberger wrote: I just changed all 6 to C:\Program Files\R\R-2.15.0\bin\i386\Rgui.exe which displays as R for Windows Gui front-end Doing that did not solve this problem. As I suggested before, I don't really think this is a Mac problem. I think you should be looking for solutions that involve creating Windows capabilities to handle the deficient compressed file format processing. WinZip is not a free program, but perhaps the Win-GNU facilities would be available. Have you gone through the process of installing Murdoch's Rtools suite on your virtualized Windows? -- David. I guess the next step is reading the scripts in Rtools. On Fri, Jun 8, 2012 at 5:05 PM, Richard M. Heiberger r...@temple.eduwrote: Yes, .q .r .rcommand .rd .rda .rds are sent to R (Mac). .rdata ggoes to R for Windows GUI front end. I will experiment with the right target for the others. On Fri, Jun 8, 2012 at 5:03 PM, Richard M. Heiberger r...@temple.eduwrote: David, that makes sense to me. How do I respond to it? I ran into a similar situation yesterday. On the Windows side I have Acrobat Reader. Yet the default for pdf files on the Windows side was Macintosh Preview and Windows couldn't start it. I changed it to Acrobat Reader and then Windows could display the pdf files. I will look at the file extensions map now for lzma. Should you get back to me before I find it, I would be very happy. Rich On Fri, Jun 8, 2012 at 4:53 PM, David Winsemius dwinsem...@comcast.net wrote: On Jun 8, 2012, at 4:21 PM, Richard M. Heiberger wrote: I just bought a Mac and am learning it. I have a package which R CMD checks normally on a PC and in Mac mode on the new Mac. Under Windows in Parallels on the Mac, I am getting a message I don't understand. * checking data for ASCII and uncompressed saves ... WARNING Error in xzfile(file, wb, compression = 9) : cannot open the connection Calls: Anonymous - resaveRdaFiles - save - xzfile In addition: Warning message: In xzfile(file, wb, compression = 9) : cannot initialize lzma encoder, error 5 Execution halted I looked for xzfile and lzma on the mac list archive in gmane and didn't see anything. Does anyone have experience with this message? Is gmane the best way to search the mac list archive? It sounds more like a Windows/Parallels problem. I would not have expected the Mac xzfile functions to be offered to R running within Windows, even if they are on Mac hardware. -- David Winsemius, MD West Hartford, CT David Winsemius, MD West Hartford, CT [[alternative HTML version deleted]] ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] Tab setting in R.app editor
On Jun 9, 2012, at 11:11 AM, David Winsemius wrote: On Jun 9, 2012, at 5:03 AM, Hans-Jörg Bibiko wrote: On Jun 9, 2012, at 2:05 AM, zListserv wrote: Is there a way to change to default tab stop setting from the present 4 characters (stops at 5, 9, etc) to 8 characters (stops at 9, 17, etc)? Yes, you can set it by executing the following line in the Terminal: defaults write org.R-project.R R Script Editor tab width 8 Thanks, Hans for that taste of customization. And thanks for all your work on R.app. Is there a more general list of features that could be adjusted? Is the Script Editor built on a platform that is more generally used and might have external documentation? After looking around a bit more it looks to me that the Script Editor is its own entity. I found this list of PreferenceKeys in which R Script Editor tab width is one instance: https://svn.r-project.org/R-packages/trunk/Mac-GUI/PreferenceKeys.h Am I correct in assuming these are stored in a .plist file? -- David Winsemius, MD West Hartford, CT ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] Tab setting in R.app editor
On Jun 9, 2012, at 3:56 PM, David Winsemius wrote: On Jun 9, 2012, at 11:11 AM, David Winsemius wrote: On Jun 9, 2012, at 5:03 AM, Hans-Jörg Bibiko wrote: On Jun 9, 2012, at 2:05 AM, zListserv wrote: Is there a way to change to default tab stop setting from the present 4 characters (stops at 5, 9, etc) to 8 characters (stops at 9, 17, etc)? Yes, you can set it by executing the following line in the Terminal: defaults write org.R-project.R R Script Editor tab width 8 Thanks, Hans for that taste of customization. And thanks for all your work on R.app. Is there a more general list of features that could be adjusted? Is the Script Editor built on a platform that is more generally used and might have external documentation? After looking around a bit more it looks to me that the Script Editor is its own entity. I found this list of PreferenceKeys in which R Script Editor tab width is one instance: https://svn.r-project.org/R-packages/trunk/Mac-GUI/PreferenceKeys.h Am I correct in assuming these are stored in a .plist file? David, Looks like it might be: ~/Library/Preferences/org.R-project.R.plist The Property List Editor application that used to be included in OSX has been integrated into XCode, AFAICS, which makes it a bit more cumbersome to edit the file. Regards, Marc Schwartz ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac