[Rd] Bug with Sys.glob?
When I run the example command of Sys.glob(), R crashes. > Sys.glob(file.path(R.home(), "library", "*", "R", "*.rdx")) > version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status alpha major 2 minor 5.0 year 2007 month 03 day30 svn rev40957 language R version.string R version 2.5.0 alpha (2007-03-30 r40957) > -- Ronggui Huang Department of Sociology Fudan University, Shanghai, China __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] R disapears strangely
When I use menu to open script, R disapears strangely. On average, It happens every 2-3 operations of opening script. But actually, R is still running in the backgroud, I can see the process in the task manage window of windows XP. Anyone comes across this problem? > R.version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status Patched major 2 minor 5.0 year 2007 month 04 day28 svn rev41376 language R version.string R version 2.5.0 Patched (2007-04-28 r41376) -- Ronggui Huang Department of Sociology Fudan University, Shanghai, China __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] R disapears strangely
When I use menu to open script, R disapears strangely. On average, It happens every 2-3 operations of opening script. Anyone comes across this problem? > R.version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status Patched major 2 minor 5.0 year 2007 month 04 day28 svn rev41376 language R version.string R version 2.5.0 Patched (2007-04-28 r41376) -- Ronggui Huang Department of Sociology Fudan University, Shanghai, China __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] basename/dirname produce incorrect results
The incorrect result incurs when the file path contains Chinese character. It seems that dirname/basename action on unit of byte instead of char, so the result in the following example is half of what is expected. > g<-"d:\\$BG!2L4^M-CfJ8(B\\$BG!2L4^M-CfJ8(B.txt" > dirname(g) [1] "d:/$BG!2L4^(B" > basename(g) [1] "$BG!2L4^M-(B" -- HUANG Ronggui, Wincent http://ronggui.huang.googlepages.com/ Bachelor of Social Work, Fudan University, China Master of sociology, Fudan University, China Ph.D. Candidate, CityU of HK. [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] basename/dirname produce incorrect results
> sessionInfo() R version 2.7.0 Patched (2008-04-24 r45485) i386-pc-mingw32 locale: LC_COLLATE=Chinese_People's Republic of China.936;LC_CTYPE=Chinese_People's Republic of China.936;LC_MONETARY=Chinese_People's Republic of China.936;LC_NUMERIC=C;LC_TIME=Chinese_People's Republic of China.936 attached base packages: [1] stats graphics grDevices utils datasets methods [7] base > 2008/5/15 ronggui <[EMAIL PROTECTED]>: > The incorrect result incurs when the file path contains Chinese character. > It seems that dirname/basename action on unit of byte instead of char, so > the result in the following example is half of what is expected. > > > g<-"d:\\$BG!2L4^M-CfJ8(B\\$BG!2L4^M-CfJ8(B.txt" > > dirname(g) > [1] "d:/$BG!2L4^(B" > > basename(g) > [1] "$BG!2L4^M-(B" > > > -- > HUANG Ronggui, Wincent http://ronggui.huang.googlepages.com/ > Bachelor of Social Work, Fudan University, China > Master of sociology, Fudan University, China > Ph.D. Candidate, CityU of HK. -- HUANG Ronggui, Wincent http://ronggui.huang.googlepages.com/ Bachelor of Social Work, Fudan University, China Master of sociology, Fudan University, China Ph.D. Candidate, CityU of HK. [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] basename/dirname produce incorrect results
I have beend realized the problem of reporting with non-English character this way. Just don't know how to do in a better way. Sorry for that. Now, the problem reported has been fixed ( in version (2008-05-15 r45703)). Thanks for your work. Best 2008/5/16 Prof Brian Ripley <[EMAIL PROTECTED]>: > I'm sorry, but that example make no sense to me -- you need to mark the > encoding (and don't send HTML that will get stripped). > > This is presumably Windows, given the name. > > On Thu, 15 May 2008, ronggui wrote: > >> The incorrect result incurs when the file path contains Chinese character. >> It seems that dirname/basename action on unit of byte instead of char, so >> the result in the following example is half of what is expected. > > No, it works in widechars, that is UCS-2. > > I have a suspicion of what the problem is (it is related to attempts to > handle embedded nuls), so please try tomorrow's R-patched to see if I have > fixed it. If that does not work, we need a reproducible example, and that > means a message in a known encoding. (One way to do so is to attach a plain > text message, and tell us in the body of the message the encoding you used.) > >>> g<-"d:\\如果含有中文\\如果含有中文.txt" >>> dirname(g) >> >> [1] "d:/如果含" >>> >>> basename(g) >> >> [1] "如果含有" >> >> >> -- >> HUANG Ronggui, Wincent http://ronggui.huang.googlepages.com/ >> Bachelor of Social Work, Fudan University, China >> Master of sociology, Fudan University, China >> Ph.D. Candidate, CityU of HK. >> >>[[alternative HTML version deleted]] >> >> __ >> R-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > > -- > 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 > -- HUANG Ronggui, Wincent http://ronggui.huang.googlepages.com/ Bachelor of Social Work, Fudan University, China Master of sociology, Fudan University, China Ph.D. Candidate, CityU of HK. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] suggestion for R >= 3.0: computer-readable CHANGELOG
2009/4/17 Duncan Murdoch : > Philippe Grosjean wrote: >> >> Hello, >> >> Here are a few questions that would be useful to get an answer via >> dedicated functions in utils or tools packages: >> - When did function foo appeared in R or in a given package? >> - When did argument myarg appeared in function foo? >> - When did function bar get deprecated or when did it disappeared? >> - I wrote a script using functions foo and bar with R 1.9.1. My script >> does not work any more with current version. What were all the changes made >> to foo and/or to bar since then (this could obviously help me to update my >> script for current R version)? >> >> Currently, we have to read NEWS (or perhaps a non official changelog) >> manually to get such answers. >> >> The basic function to retrieve data that would answer to these questions >> would be something like: >> >> > changes(c("foo", "bar")) >> >> That function could, for instance, read information in a computer-readable >> file named CHANGELOG... because the problem is there! Changes are currently >> recorded in NEWS, but ONLY in a human-readable form! A quick suggestion for >> a format for CHANGELOG by example: >> > > There is the tools::readNEWS function to read the NEWS file. It's not just > human readable. That's what the RSS feed uses. >> >> Date Object Action Value Message >> 2009-04-17 package commit 1.1-0 Enhanced version of my package >> 2009-04-15 foo add foo(y) New function foo in my package >> 2009-04-14 bar debug bar(NULL) returned wrong result >> 2009-04-01 package commit 1.0-0 First version of package on CRAN >> > > It doesn't contain dates, and dates don't really make sense. (Many > additions are introduced over a sequence of changes. Do you give the first > date, the last date? What if the change is very minor, e.g. a typo in the > docs?) NEWS does contain R version numbers, and those are well defined. Yes. Yet, as the FreeBSD, I found something like "this function first appears in R/ foo package version xxx" in man page helpful. It is not bad to put such section in the R help page, I think. > The RSS feed does list the date on which it noticed each change to the NEWS > file, but I think that is more useful for keeping up to date with changes, > rather than defining when something happened. >> >> It should be kept simple. May be an "Author" field in the records would be >> nice too. Also a function to record a new entry in the CHANGELOG could look >> like: >> > > Maybe you want the Subversion log. It is machine readable; just use > Subversion to read it. (Something nice would be R-level access to the > Subversion API.) You can be very specific about which files you want to read > about, or just read the whole thing on developer.r-project.org. > > Duncan Murdoch >> >> > track("XXX", action = "debug", message = "my comment", file = >> "/somewhere/CHANGELOG") >> >> The file NEWS would not change and should be kept to present the same >> information in a human-readable format. >> >> Also, a function that lists all functions used in a script or a package >> (Romain François is working in this direction with svTools package), plus a >> function to plot one or several "changes" objects as returned by changes() >> on a time axis or "version axis" would be welcome additions to further track >> and plot evolution of R, or of R packages for a group of functions of >> interest. Finally, a function to easily record the dependences used and >> their versions in a script would complete the set of tools. >> >> These 4-5 functions are not difficult to write (although I suspect that >> this simplistic proposal would become more complex if one consider to >> interact with subversion, to separate development and release versions, >> ...). But to be really useful, they should be better designed and proposed >> by the R core team, and included in the official specifications for writing >> package. May I suggest to think about such a change for R version 3.0? >> >> Things get more complicated for verifying CHANGELOG in R CMD check. At >> least, one could check actions like: >> - object or function addition, deprecation or disappearance, >> - argument changes in functions, slot changes in objects, >> - function refactoring (change in the code from previous version) >> but only if we provide also the previous
[Rd] The default position of plot title
Dear R-developers, It seems to me that the position of title is usually at the bottom of a plot in sociological and political science books and articles. I wonder if the same convention applies in other disciplines. If yes, is it reasonable to change the default position of main title of plot function? -- HUANG Ronggui, Wincent PhD Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Show location of workspace image on quit?
2009/6/5 Duncan Murdoch : > On 05/06/2009 7:53 AM, Barry Rowlingson wrote: >> >> When I quit R, it says: >> >> > q() >> Save workspace image? [y/n/c]: >> >> and since I've probably got 3 R sessions running in however many >> different directories and I might have jumped around with setwd() , I >> forget exactly where R wants to save its workspace image. So could q() >> be changed to say what file it is going to save to before it does? >> >> Currently I have to hit 'c', then do getcwd(), then quit again. >> Would something like >> >> > q() >> Save workspace image (/home/me/workspace/.RData)? [y/n/c]: >> >> be useful to anyone else? Just thought I'd ask before I dive into >> internals or wrap the q function for myself. > > That sounds like a great suggestion. I might word it as > > Save workspace to "/home/me/workspace/.RData"? [y/n/c] > > If people are working deep in a directory tree, the path might end up too > long; you might want to think about limiting it (e.g. by leaving off the > root). Or print it in mutiple lines? e.g. Save workspace to "/home/me/ workspace/.RData"? [y/n/c] > Duncan Murdoch > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- HUANG Ronggui, Wincent PhD Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Show location of workspace image on quit?
I think e is better than others. Ronggui 2009/6/5 Wacek Kusnierczyk : > Mathieu Ribatet wrote: >> I guess that having something like this >> >>> q() >>> Save workspace image (/home/me/workspace/.RData)? [y/n/c/e]: >>> >> >> where "e" means Editing the path should be clear enought, isn't it? >> > > good idea; maybe 'o' for 'other path'; or 'a' for 'alternative path'; > or 'd' for 'different path'; or 'm' for 'modify path'; or 'p' for > 'path'; or... ? > > > vQ > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- HUANG Ronggui, Wincent PhD Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Help file doesn't display correctly
Dear R Developer, It seems to be a problem with help file. Not sure if it is related to the new format of Rd parser. Multiple lines are joined together without proper line break. > ?mean There were 14 warnings (use warnings() to see them) ## All lines are joined together and not easy to read. > warnings() Warning messages: 1: In grepl("^[[:blank:]]*$", buffer[length(buffer)]) : input string 1 is invalid in this locale 2: In grep("^[[:space:]]*$", buffer) : input string 5 is invalid in this locale 3: In grep("^[[:space:]]*$", buffer) : input string 2 is invalid in this locale 4: In grep("^[[:space:]]*$", buffer) : input string 1 is invalid in this locale 5: In grep("^[[:space:]]*$", buffer) : input string 4 is invalid in this locale 6: In grep("^[[:space:]]*$", buffer) : input string 5 is invalid in this locale 7: In grep("^[[:space:]]*$", buffer) : input string 6 is invalid in this locale 8: In grep("^[[:space:]]*$", buffer) : input string 7 is invalid in this locale 9: In grep("^[[:space:]]*$", buffer) : input string 9 is invalid in this locale 10: In grep("^[[:space:]]*$", buffer) : input string 10 is invalid in this locale 11: In grepl("^[[:space:]]*$", txt[1L]) : input string 1 is invalid in this locale 12: In grepl("^[[:blank:]]*$", buffer[length(buffer)]) : input string 1 is invalid in this locale 13: In grep("^[[:space:]]*$", buffer) : input string 1 is invalid in this locale 14: In grep("^[[:space:]]*$", buffer) : input string 2 is invalid in this locale > sessionInfo() R version 2.10.0 alpha (2009-10-04 r49936) i386-pc-mingw32 locale: [1] LC_COLLATE=Chinese_People's Republic of China.936 LC_CTYPE=Chinese_People's Republic of China.936 [3] LC_MONETARY=Chinese_People's Republic of China.936 LC_NUMERIC=C [5] LC_TIME=Chinese_People's Republic of China.936 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_2.10.0 -- HUANG Ronggui, Wincent Doctoral Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Help file doesn't display correctly
2009/10/6 Prof Brian Ripley : > On Tue, 6 Oct 2009, Ronggui Huang wrote: > >> Dear R Developer, >> >> It seems to be a problem with help file. Not sure if it is related to >> the new format of Rd parser. Multiple lines are joined together >> without proper line break. > > It was a problem with the handling of fancy quotes in a DBCS encoding (as > used for CJK languages). We don't attempt to use them for sQuote(), and > will no longer attempt to use them for help. This will take effect in > r49952 and later, and seems to work for me in CP936. > > It is not easy for us to test in Chinese Windows (most non-Chinese editions > do not support it, or need add-ons installed), so please keep on reporting > issues, particularly those with help (text, HTML, PDF?) rendering. As for the HTML help, it works if I launch it by help.start(), but the link becomes broken if I launch it by click menu "help- html help". -- HUANG Ronggui, Wincent Doctoral Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel