Re: [Rd] suggestion for extending ?as.factor
On Wed, May 06, 2009 at 10:41:58AM +0200, Martin Maechler wrote: > PD> I think that the real issue is that we actually do want almost-equal > PD> numbers to be folded together. > > yes, this now (revision 48469) will happen by default, using signif(x, 15) > where '15' is the default for the new optional argument 'digitsLabels' On some platforms, the function factor() in the current R 2.10.0 (2009-05-06 r48478) may produce duplicated levels. The examples are in general platform dependent. The following one produces duplicated (in fact triplicated) levels on both Intel default arithmetic and on Intel with SSE. x <- 9.7738826945424 + c(-1, 0, 1) * 1e-14 x <- signif(x, 15) factor(x) # [1] 9.7738826945424 9.7738826945424 9.7738826945424 # Levels: 9.7738826945424 9.7738826945424 9.7738826945424 # Warning message: # In `levels<-`(`*tmp*`, value = c("9.7738826945424", "9.7738826945424", : # duplicated levels will not be allowed in factors anymore The reason is that the three numbers remain different in signif(x, 15), but are mapped to the same string in as.character(x). length(unique(x)) # [1] 3 length(unique(as.character(x))) # 1 Further examples may be found using x <- as.character(9 + runif(5000)) x <- as.numeric(x[nchar(x)==15]) # select numbers with 14 digits x <- signif(cbind(x - 1e-14, x, x + 1e-14), 15) y <- array(as.character(x), dim=dim(x)) x <- x[which(y[,1] == y[,3]),] factor(x[1,]) Petr. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Can we generate exe file using R? What is the maximum file size valid?
Chessxm wrote: Dear all, I have two questions. First, I am wondering whether we are able to use R to generate an exe file, or sth that can be executable outside R? No, there is no compiler for R. Second, I am wondering whether read.csv can read a csv file with size of 300-400 gigabytes? No. You won't find many machines around that support more than 400 Gb for a single process. Uwe Ligges Thank you very much! Min [[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
Re: [Rd] Can we generate exe file using R? What is the maximum file size valid?
On Wed, May 6, 2009 at 7:45 PM, Chessxm wrote: > First, I am wondering whether we are able to use R to generate an exe file, > or sth that can be executable outside R? > Emacs creates self-contained exe files using a library called 'unexec'; this allows all initialization, library loading, etc. to run first, then dumps out a runnable exe image. I don't know if anyone has worked on this for R. Second, I am wondering whether read.csv can read a csv file with size of > 300-400 gigabytes? Well, R data is normally held in main memory (RAM), so it would not be practical on normal machines to have 300-400 GB of data. There is a big.memory package, but I don't know anything about it. If you want to select a small subset of the very large file to work on, you could certainly read it in in blocks of lines and only keep the data you care about. -s [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] proposed changes to RSiteSearch
Can someone in R Core please take a look at the attached patches to RSiteSearch() and its help page? I guess Jon is planning some changes on his site. Jon: could you elaborate on what the patch does? Best, Andy Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] proposed changes to RSiteSearch
From: Liaw, Andy > > Can someone in R Core please take a look at the attached patches to > RSiteSearch() and its help page? I guess Jon is planning some changes > on his site. Apparently the attachments were stripped off the first time. Here's a second try. I've already set "format" to "plain text" in Outlook, even in that first post. If this still doesn't work, can some one explain to me what I have to do in Outlook to get the attachment through? Best, Andy Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Can we generate exe file using R? What is the maximum file size valid?
Chessxm wrote: > > Dear all, > > I have two questions. > > First, I am wondering whether we are able to use R to generate an exe > file, > or sth that can be executable outside R? > > > It sounds as though you are looking for something similar to Matlab's mcc compiler that allows Matlab code to be compiled and run independently from the program by translating a script into C code. To my knowledge there are only two projects that have attempted something similar and both never progressed much past the experimental phase. The first was called Scompile and was created by a fellow named Matt Calder. The project has been defunct for a long time, but you might find some info at: http://www.stat.cmu.edu/~hseltman/Scompile.html Another recent project is r2c hosted at http://www.rforge.net . Both of these programs are extremely limited in the types of scripts they can convert and are probably wouldn't provide workable solution for a set of general R scripts. Your best shot at portability is probably to pack your code and/or data up into an R package- that way it can be easily loaded on to any computer which has R installed. Creating a package from an existing collection of R scripts and data objects is very, very easy- see ?package.skeleton() and the "Writing R Extensions" manual for starting points. Chessxm wrote: > > Second, I am wondering whether read.csv can read a csv file with size of > 300-400 gigabytes? > > Thank you very much! > > Min > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > > The problem here is that R likes to store all of it's variables in local RAM- allocating a data frame for 300+ gigabytes worth of information is likely to exceed your machine capacity. Many good workarounds exist for this- most of them function by storing the variable in a database file and only loading and accessing the parts that are needed at a given moment. See the package "filehash" for an example of how to do this. Hope this helps! -Charlie - Charlie Sharpsteen Undergraduate Environmental Resources Engineering Humboldt State University -- View this message in context: http://www.nabble.com/Can-we-generate-exe-file-using-R--What-is-the-maximum-file-size-valid--tp23417745p23420090.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] Kendall's Tau should use Continuity Correction (PR#13691)
Full_Name: David Simcha Version: 2.9.0 OS: WinXP Submission from: (NULL) (96.234.244.142) > cor.test(c(1,2,3,4,5), c(8,6,7,5,3), method = "kendall") Kendall's rank correlation tau data: c(1, 2, 3, 4, 5) and c(8, 6, 7, 5, 3) T = 1, p-value = 0.08333 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.8 > cor.test(c(1,2,3,4,5), c(8,6,7,5,3), method = "kendall", exact = FALSE) Kendall's rank correlation tau data: c(1, 2, 3, 4, 5) and c(8, 6, 7, 5, 3) z = -1.9596, p-value = 0.05004 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.8 It appears that R's implementation of Kendall's Tau does not use any type of continuity correction, producing very bad results when exact P-values are not used. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] proposed changes to RSiteSearch
On 05/07/09 10:05, Liaw, Andy wrote: > Can someone in R Core please take a look at the attached patches to > RSiteSearch() and its help page? I guess Jon is planning some changes > on his site. Jon: could you elaborate on what the patch does? The idea is simply to remove the mail archives, so the search will be only of functions' help pages. Eventually I will also add package vignettes, but I don't think we need anything special for that. I can't imagine that someone would want to search just vignettes and not help pages, or the reverse. The reasons are: 1. The mail archives are becoming increasingly difficult and time consuming for me to maintain. 2. There are now three other ways of searching mail archives, all of which seem much better than mine, but there seem to be no other good ways to search help pages for functions, and, indeed, the new RSiteSearch packages does only functions. 3. With only functions it would be much easier for someone to set up a complete mirror of my site, which seems like a good idea. Jon -- Jonathan Baron, Professor of Psychology, University of Pennsylvania Home page: http://www.sas.upenn.edu/~baron Editor: Judgment and Decision Making (http://journal.sjdm.org) __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] proposed changes to RSiteSearch
From: Liaw, Andy > > From: Liaw, Andy > > > > Can someone in R Core please take a look at the attached patches to > > RSiteSearch() and its help page? I guess Jon is planning > some changes > > on his site. > > Apparently the attachments were stripped off the first time. > Here's a second try. > > I've already set "format" to "plain text" in Outlook, even in > that first post. If this still doesn't work, can some one > explain to me what I have to do in Outlook to get the > attachment through? OK, as suggested by Bill Dunlap and Spencer Graves, I've renamed .diff to .diff.txt. Hopefully the third time is charm... Apologies for the wasted bandwidth. Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. --- RSiteSearch.Rd 2009-04-18 03:28:08.0 -0400 +++ /home/liawand/RSiteSearch.Rd2009-05-07 09:54:02.0 -0400 @@ -6,17 +6,15 @@ \name{RSiteSearch} \alias{RSiteSearch} \title{ - Search for Key Words or Phrases in the R-help Mailing List Archives - or Documentation + Search for Key Words or Phrases in the function help pages } \description{ - Search for key words or phrases in the R-help mailing list - archives, or \R manuals and help pages, using the search engine at - \url{http://search.r-project.org} and view them in a web browser. + Search for key words or phrases in the function help pages, using the + search engine at \url{http://search.r-project.org} and view them in a + web browser. } \usage{ RSiteSearch(string, -restrict = c("Rhelp02a", "functions", "docs"), format = c("normal", "short"), sortby = c("score", "date:late", "date:early", "subject", "subject:descending", @@ -27,14 +25,6 @@ \arguments{ \item{string}{word(s) or phrase to search. If the words are to be searched as one entity, enclose all words in braces (see example).} - \item{restrict}{a character vector, typically of length larger than one: -What areas to search in: -\code{Rhelp02a} for R-help mailing list archive since 2002, -\code{Rhelp01} for mailing list archive before 2002, -\code{docs} for R manuals, -\code{functions} for help pages. -\code{R-devel} for R-devel mailing list. -Use \code{c()} to specify more than one.} \item{format}{\code{normal} or \code{short} (no excerpts); can be abbreviated.} \item{sortby}{character string (can be abbreviated) indicating how to @@ -60,6 +50,11 @@ Unique partial matches will work for all arguments. Each new browser window will stay open unless you close it. + + Mailing lists may be searched at several other sites, including + \url{http://tolstoy.newcastle.edu.au/R/}, and + \url{http://markmail.org/search/list:r-project}. See + \url{http://search.r-project.org} for a full list. } \author{Andy Liaw and Jonathan Baron} \seealso{ @@ -70,15 +65,8 @@ \examples{\donttest{ # need Internet connection RSiteSearch("{logistic regression}") # matches exact phrase Sys.sleep(5) # allow browser to open, take a quick look -RSiteSearch("Baron Liaw", restrict = "Rhelp02a") -## Search in R-devel archive and documents (and store the query-string): -Sys.sleep(5) -fullquery <- RSiteSearch("S4", restrict = c("R-dev", "docs")) +fullquery <- RSiteSearch("S4", sortby = "date:late") fullquery # a string of ~ 116 characters -## the latest purported bug reports, responses ... -%% FIXME: "/bug/ and other reg.exp.s seem to fail -Sys.sleep(5) -RSiteSearch("bug", restrict = "R-devel", sortby = "date:late") }} \keyword{utilities} \keyword{documentation} --- RSiteSearch.R 2009-04-18 03:28:06.0 -0400 +++ /home/liawand/RSiteSearch.R 2009-05-07 09:53:59.0 -0400 @@ -14,8 +14,7 @@ # A copy of the GNU General Public License is available at # http://www.r-project.org/Licenses/ -RSiteSearch <- function(string, restrict = c("Rhelp02a", "functions", "docs"), - format = c("normal", "short"), +RSiteSearch <- function(string, formatt = c("normal", "short"), sortby = c("score", "date:late", "date:early", "subject", "subject:descending", "from", "from:descending", "size", "size:descending"), @@ -27,10 +26,6 @@ mpp <- paste0("max=", matchesPerPage) format <- paste0
Re: [Rd] proposed changes to RSiteSearch
On 5/7/2009 10:18 AM, Jonathan Baron wrote: On 05/07/09 10:05, Liaw, Andy wrote: Can someone in R Core please take a look at the attached patches to RSiteSearch() and its help page? I guess Jon is planning some changes on his site. Jon: could you elaborate on what the patch does? The idea is simply to remove the mail archives, so the search will be only of functions' help pages. Eventually I will also add package vignettes, but I don't think we need anything special for that. I can't imagine that someone would want to search just vignettes and not help pages, or the reverse. The reasons are: 1. The mail archives are becoming increasingly difficult and time consuming for me to maintain. 2. There are now three other ways of searching mail archives, all of which seem much better than mine, but there seem to be no other good ways to search help pages for functions, and, indeed, the new RSiteSearch packages does only functions. 3. With only functions it would be much easier for someone to set up a complete mirror of my site, which seems like a good idea. I'll incorporate the changes if you like. What do you think of the idea of adding a gmane (or other archive) search to your results page? Then if someone doesn't like what the man pages show, you can send them somewhere else, rather than leaving them to find out the other resources themselves. gmane has sample code for this on their search page search.gmane.org, so it looks reasonably easy. I'd suggest following their last example, with a drop-down box to select mailing lists, with comp.lang.r.* as an option for "all lists". Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] proposed changes to RSiteSearch
From: Duncan Murdoch > > On 5/7/2009 10:18 AM, Jonathan Baron wrote: > > On 05/07/09 10:05, Liaw, Andy wrote: > >> Can someone in R Core please take a look at the attached patches to > >> RSiteSearch() and its help page? I guess Jon is planning > some changes > >> on his site. Jon: could you elaborate on what the patch does? > > > > The idea is simply to remove the mail archives, so the > search will be > > only of functions' help pages. Eventually I will also add package > > vignettes, but I don't think we need anything special for that. I > > can't imagine that someone would want to search just > vignettes and not > > help pages, or the reverse. > > > > The reasons are: 1. The mail archives are becoming increasingly > > difficult and time consuming for me to maintain. 2. There are now > > three other ways of searching mail archives, all of which seem much > > better than mine, but there seem to be no other good ways to search > > help pages for functions, and, indeed, the new RSiteSearch packages > > does only functions. 3. With only functions it would be much easier > > for someone to set up a complete mirror of my site, which > seems like a > > good idea. > > I'll incorporate the changes if you like. What do you think > of the idea > of adding a gmane (or other archive) search to your results > page? Then > if someone doesn't like what the man pages show, you can send them > somewhere else, rather than leaving them to find out the > other resources > themselves. > > gmane has sample code for this on their search page > search.gmane.org, so > it looks reasonably easy. I'd suggest following their last example, > with a drop-down box to select mailing lists, with > comp.lang.r.* as an > option for "all lists". > > Duncan Murdoch Actually, I was thinking about a possible RHelpSearch() in addition, if Jon is no longer going to include the R-help archive in the search. I used the current RSiteSearch() a lot more for searching R-help archive than functions in packages. Ideas? comments? Andy Notice: This e-mail message, together with any attachme...{{dropped:12}} __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] proposed changes to RSiteSearch
About this: gmaneSearch <- function( string, group = "gmane.comp.lang.r.*", author = "", sort = c("relevance", "date", "revdate"), op = c("and", "or") ){ sort <- match.arg(sort) op <- match.arg( op ) url <- sprintf( 'http://search.gmane.org/?query=%s&author=%s&group=%s&sort=%s&DEFAULTOP=%s', gsub( ' +', '+', string), author, group, sort, op ) url <- URLencode( url ) browseURL( url ) } Liaw, Andy wrote: From: Duncan Murdoch On 5/7/2009 10:18 AM, Jonathan Baron wrote: On 05/07/09 10:05, Liaw, Andy wrote: Can someone in R Core please take a look at the attached patches to RSiteSearch() and its help page? I guess Jon is planning some changes on his site. Jon: could you elaborate on what the patch does? The idea is simply to remove the mail archives, so the search will be only of functions' help pages. Eventually I will also add package vignettes, but I don't think we need anything special for that. I can't imagine that someone would want to search just vignettes and not help pages, or the reverse. The reasons are: 1. The mail archives are becoming increasingly difficult and time consuming for me to maintain. 2. There are now three other ways of searching mail archives, all of which seem much better than mine, but there seem to be no other good ways to search help pages for functions, and, indeed, the new RSiteSearch packages does only functions. 3. With only functions it would be much easier for someone to set up a complete mirror of my site, which seems like a good idea. I'll incorporate the changes if you like. What do you think of the idea of adding a gmane (or other archive) search to your results page? Then if someone doesn't like what the man pages show, you can send them somewhere else, rather than leaving them to find out the other resources themselves. gmane has sample code for this on their search page search.gmane.org, so it looks reasonably easy. I'd suggest following their last example, with a drop-down box to select mailing lists, with comp.lang.r.* as an option for "all lists". Duncan Murdoch Actually, I was thinking about a possible RHelpSearch() in addition, if Jon is no longer going to include the R-help archive in the search. I used the current RSiteSearch() a lot more for searching R-help archive than functions in packages. Ideas? comments? Andy Notice: This e-mail message, together with any attachme...{{dropped:12}} __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Romain Francois Independent R Consultant +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] proposed changes to RSiteSearch
From: Jonathan Baron > > On 05/07/09 13:48, Liaw, Andy wrote: > > From: Duncan Murdoch > > > I'll incorporate the changes if you like. > > Yes. Please do. I understand that it won't take effect for a while. > When it does, I'll change my site. > > What do you think > > > of the idea > > > of adding a gmane (or other archive) search to your results > > > page? Then > > > if someone doesn't like what the man pages show, you can > send them > > > somewhere else, rather than leaving them to find out the > > > other resources > > > themselves. > > > > > > gmane has sample code for this on their search page > > > search.gmane.org, so > > > it looks reasonably easy. I'd suggest following their > last example, > > > with a drop-down box to select mailing lists, with > > > comp.lang.r.* as an > > > option for "all lists". > > > > > > Duncan Murdoch > > Good idea. I will do this. But there are also two other good search > engines. Maybe I'll add all three search alternatives. But then, > according to Sheena Iyengar, people won't choose any! Hmm. > > > Actually, I was thinking about a possible RHelpSearch() in > addition, if > > Jon is no longer going to include the R-help archive in the > search. I > > used the current RSiteSearch() a lot more for searching > R-help archive > > than functions in packages. Ideas? comments? > > This is OK with me, but I don't want to do it. I guess it would > search gmane. MarkMail is also pretty good, as is > http://tolstoy.newcastle.edu.au/R/ All these are much better than > Namazu for searching the R-help list. Sorry I didn't make it clear: I meant something like the gmaneSearcg() that Romain posted, not hitting your site. Best, Andy > Jon Notice: This e-mail message, together with any attachme...{{dropped:12}} __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] proposed changes to RSiteSearch
We could have a few functions similar to RSiteSearch or gmaneSearch I just posted and then cook a summary html page with R ... Here is a function that grabs relevant groups from gmane: gmaneGroups <- function( prefix = "gmane.comp.lang.r." ){ url <- URLencode( sprintf( "http://dir.gmane.org/index.php?prefix=%s";, prefix) ) txt <- grep( '^TRUE ) rx <- '^.*?(.*?).*(.*?).*$' out <- data.frame( url = gsub( rx, "\\1", txt ), group = gsub( rx, "\\2", txt ), description = gsub( rx, "\\3", txt ), stringsAsFactors = FALSE ) out$group <- sub( "...", ".*", out$group, fixed = TRUE ) out } I'll clean this up and write a man page if there is interest in adding this to R, but this might be more appropriate in a package, for example: http://r-forge.r-project.org/projects/rsitesearch/ Romain Liaw, Andy wrote: From: Jonathan Baron On 05/07/09 13:48, Liaw, Andy wrote: From: Duncan Murdoch I'll incorporate the changes if you like Yes. Please do. I understand that it won't take effect for a while. When it does, I'll change my site. What do you think of the idea of adding a gmane (or other archive) search to your results page? Then if someone doesn't like what the man pages show, you can send them somewhere else, rather than leaving them to find out the other resources themselves. gmane has sample code for this on their search page search.gmane.org, so it looks reasonably easy. I'd suggest following their last example, with a drop-down box to select mailing lists, with comp.lang.r.* as an option for "all lists". Duncan Murdoch Good idea. I will do this. But there are also two other good search engines. Maybe I'll add all three search alternatives. But then, according to Sheena Iyengar, people won't choose any! Hmm. Actually, I was thinking about a possible RHelpSearch() in addition, if Jon is no longer going to include the R-help archive in the search. I used the current RSiteSearch() a lot more for searching R-help archive than functions in packages. Ideas? comments? This is OK with me, but I don't want to do it. I guess it would search gmane. MarkMail is also pretty good, as is http://tolstoy.newcastle.edu.au/R/ All these are much better than Namazu for searching the R-help list. Sorry I didn't make it clear: I meant something like the gmaneSearcg() that Romain posted, not hitting your site. Best, Andy Jon -- Romain Francois Independent R Consultant +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] proposed changes to RSiteSearch
I agree! Recall, though, I had added the RSiteSearch() functionality to the Rgui under Windows (Help / search.r-project.org...), so if RSiteSearch() is taken out, this need to go, too. Best, Andy From: Jonathan Baron > > There is something to be said for taking all of these functions, > including the original RSiteSearch, out of utils and putting them in > the new RSiteSearch package. These are the sorts of things that will > get revised frequently, and this way (I think) we won't have to bother > whoever takes care of utils, which is part of the regular R > distribution. > > I'm adding Spencer Graves to the cc list. Maybe he is interested in > doing this. > > Jon > > On 05/07/09 20:54, Romain Francois wrote: > > We could have a few functions similar to RSiteSearch or > gmaneSearch I > > just posted and then cook a summary html page with R ... > > > > Here is a function that grabs relevant groups from gmane: > > > > gmaneGroups <- function( prefix = "gmane.comp.lang.r." ){ > > url <- URLencode( sprintf( > > "http://dir.gmane.org/index.php?prefix=%s";, prefix) ) > > txt <- grep( '^ url ), value = > > TRUE ) > > > > rx <- '^.*?(.*?).*(.*?).*$' > > out <- data.frame( > > url = gsub( rx, "\\1", txt ), > > group = gsub( rx, "\\2", txt ), > > description = gsub( rx, "\\3", txt ), > > stringsAsFactors = FALSE > > ) > > out$group <- sub( "...", ".*", out$group, fixed = TRUE ) > > out > > } > > > > I'll clean this up and write a man page if there is > interest in adding > > this to R, but this might be more appropriate in a package, > for example: > > http://r-forge.r-project.org/projects/rsitesearch/ > > > > Romain > > > > Liaw, Andy wrote: > > > From: Jonathan Baron > > > > > >> On 05/07/09 13:48, Liaw, Andy wrote: > > >> > > >>> From: Duncan Murdoch > > >>> > > I'll incorporate the changes if you like > > > > >> Yes. Please do. I understand that it won't take effect > for a while. > > >> When it does, I'll change my site. > > >> > > >> What do you think > > >> > > of the idea > > of adding a gmane (or other archive) search to your results > > page? Then > > if someone doesn't like what the man pages show, you can > > > > >> send them > > >> > > somewhere else, rather than leaving them to find out the > > other resources > > themselves. > > > > gmane has sample code for this on their search page > > search.gmane.org, so > > it looks reasonably easy. I'd suggest following their > > > > >> last example, > > >> > > with a drop-down box to select mailing lists, with > > comp.lang.r.* as an > > option for "all lists". > > > > Duncan Murdoch > > > > >> Good idea. I will do this. But there are also two > other good search > > >> engines. Maybe I'll add all three search alternatives. > But then, > > >> according to Sheena Iyengar, people won't choose any! Hmm. > > >> > > >> > > >>> Actually, I was thinking about a possible RHelpSearch() in > > >>> > > >> addition, if > > >> > > >>> Jon is no longer going to include the R-help archive in the > > >>> > > >> search. I > > >> > > >>> used the current RSiteSearch() a lot more for searching > > >>> > > >> R-help archive > > >> > > >>> than functions in packages. Ideas? comments? > > >>> > > >> This is OK with me, but I don't want to do it. I guess it would > > >> search gmane. MarkMail is also pretty good, as is > > >> http://tolstoy.newcastle.edu.au/R/ All these are much better than > > >> Namazu for searching the R-help list. > > >> > > > > > > Sorry I didn't make it clear: I meant something like the > gmaneSearcg() > > > that Romain posted, not hitting your site. > > > > > > Best, > > > Andy > > > > > > > > >> Jon > > >> > > > > > > -- > > Romain Francois > > Independent R Consultant > > +33(0) 6 28 91 30 30 > > http://romainfrancois.blog.free.fr > > > > -- > Jonathan Baron, Professor of Psychology, University of Pennsylvania > Home page: http://www.sas.upenn.edu/~baron > Editor: Judgment and Decision Making (http://journal.sjdm.org) > Notice: This e-mail message, together with any attachme...{{dropped:12}} __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] proposed changes to RSiteSearch
But help really needs to be delivered with R, not an addon. It should not be necessary to know how to install packages just to get this level of help. I think it needs to be where it is now. On Thu, May 7, 2009 at 4:02 PM, Liaw, Andy wrote: > > I agree! Recall, though, I had added the RSiteSearch() functionality > to the Rgui under Windows (Help / search.r-project.org...), so if > RSiteSearch() is taken out, this need to go, too. > > Best, > Andy > > From: Jonathan Baron >> >> There is something to be said for taking all of these functions, >> including the original RSiteSearch, out of utils and putting them in >> the new RSiteSearch package. These are the sorts of things that will >> get revised frequently, and this way (I think) we won't have to bother >> whoever takes care of utils, which is part of the regular R >> distribution. >> >> I'm adding Spencer Graves to the cc list. Maybe he is interested in >> doing this. >> >> Jon >> >> On 05/07/09 20:54, Romain Francois wrote: >> > We could have a few functions similar to RSiteSearch or >> gmaneSearch I >> > just posted and then cook a summary html page with R ... >> > >> > Here is a function that grabs relevant groups from gmane: >> > >> > gmaneGroups <- function( prefix = "gmane.comp.lang.r." ){ >> > url <- URLencode( sprintf( >> > "http://dir.gmane.org/index.php?prefix=%s";, prefix) ) >> > txt <- grep( '^> url ), value = >> > TRUE ) >> > >> > rx <- '^.*?(.*?).*(.*?).*$' >> > out <- data.frame( >> > url = gsub( rx, "\\1", txt ), >> > group = gsub( rx, "\\2", txt ), >> > description = gsub( rx, "\\3", txt ), >> > stringsAsFactors = FALSE >> > ) >> > out$group <- sub( "...", ".*", out$group, fixed = TRUE ) >> > out >> > } >> > >> > I'll clean this up and write a man page if there is >> interest in adding >> > this to R, but this might be more appropriate in a package, >> for example: >> > http://r-forge.r-project.org/projects/rsitesearch/ >> > >> > Romain >> > >> > Liaw, Andy wrote: >> > > From: Jonathan Baron >> > > >> > >> On 05/07/09 13:48, Liaw, Andy wrote: >> > >> >> > >>> From: Duncan Murdoch >> > >>> >> > I'll incorporate the changes if you like >> > >> > >> Yes. Please do. I understand that it won't take effect >> for a while. >> > >> When it does, I'll change my site. >> > >> >> > >> What do you think >> > >> >> > of the idea >> > of adding a gmane (or other archive) search to your results >> > page? Then >> > if someone doesn't like what the man pages show, you can >> > >> > >> send them >> > >> >> > somewhere else, rather than leaving them to find out the >> > other resources >> > themselves. >> > >> > gmane has sample code for this on their search page >> > search.gmane.org, so >> > it looks reasonably easy. I'd suggest following their >> > >> > >> last example, >> > >> >> > with a drop-down box to select mailing lists, with >> > comp.lang.r.* as an >> > option for "all lists". >> > >> > Duncan Murdoch >> > >> > >> Good idea. I will do this. But there are also two >> other good search >> > >> engines. Maybe I'll add all three search alternatives. >> But then, >> > >> according to Sheena Iyengar, people won't choose any! Hmm. >> > >> >> > >> >> > >>> Actually, I was thinking about a possible RHelpSearch() in >> > >>> >> > >> addition, if >> > >> >> > >>> Jon is no longer going to include the R-help archive in the >> > >>> >> > >> search. I >> > >> >> > >>> used the current RSiteSearch() a lot more for searching >> > >>> >> > >> R-help archive >> > >> >> > >>> than functions in packages. Ideas? comments? >> > >>> >> > >> This is OK with me, but I don't want to do it. I guess it would >> > >> search gmane. MarkMail is also pretty good, as is >> > >> http://tolstoy.newcastle.edu.au/R/ All these are much better than >> > >> Namazu for searching the R-help list. >> > >> >> > > >> > > Sorry I didn't make it clear: I meant something like the >> gmaneSearcg() >> > > that Romain posted, not hitting your site. >> > > >> > > Best, >> > > Andy >> > > >> > > >> > >> Jon >> > >> >> > >> > >> > -- >> > Romain Francois >> > Independent R Consultant >> > +33(0) 6 28 91 30 30 >> > http://romainfrancois.blog.free.fr >> > >> >> -- >> Jonathan Baron, Professor of Psychology, University of Pennsylvania >> Home page: http://www.sas.upenn.edu/~baron >> Editor: Judgment and Decision Making (http://journal.sjdm.org) >> > Notice: This e-mail message, together with any attachme...{{dropped:12}} > > __ > 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] proposed changes to RSiteSearch
Dear Jonathan, On Thu, May 7, 2009 at 4:18 PM, Jonathan Baron wrote: > can't imagine that someone would want to search just vignettes and not > help pages, or the reverse. > Searching vignettes only can be of interest to users. If someone is interested in (full-fledged) code examples, and not in various descriptions of functions, a "search vignette" facility would come in handy. As a personal example, recently I wanted to search all vignettes for "mle" examples, but could find no way to do this. I had already searched the help pages and was unable to find something of obvious use to me. Best regards, Liviu __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] proposed changes to RSiteSearch
1. Whatever we do with the "RSiteSearch" function, it should still be available every time R starts. If we put it in its own package, it should still be autoloaded with "base", "utils", "stats", etc. 2. Sundar indicated to me that, "if Jonathan would like to remove the search capability, it would be rather simple to move RSiteSearch to nabble" for the listserve archives. The "RSiteSearch" function could be modified to combine that with a separate search of only the help pages on Jonathan's server. 3. However, I can't volunteer to do much more on this at least until late June and probably not before late August. If you wanted to move the "RSiteSearch" function to the "RSiteSearch" package on R-Forge, Romain, Sundar and I would be happy to have other developers and let them implement the group consensus. Best Wishes, Spencer Gabor Grothendieck wrote: But help really needs to be delivered with R, not an addon. It should not be necessary to know how to install packages just to get this level of help. I think it needs to be where it is now. On Thu, May 7, 2009 at 4:02 PM, Liaw, Andy wrote: I agree! Recall, though, I had added the RSiteSearch() functionality to the Rgui under Windows (Help / search.r-project.org...), so if RSiteSearch() is taken out, this need to go, too. Best, Andy From: Jonathan Baron There is something to be said for taking all of these functions, including the original RSiteSearch, out of utils and putting them in the new RSiteSearch package. These are the sorts of things that will get revised frequently, and this way (I think) we won't have to bother whoever takes care of utils, which is part of the regular R distribution. I'm adding Spencer Graves to the cc list. Maybe he is interested in doing this. Jon On 05/07/09 20:54, Romain Francois wrote: We could have a few functions similar to RSiteSearch or gmaneSearch I just posted and then cook a summary html page with R ... Here is a function that grabs relevant groups from gmane: gmaneGroups <- function( prefix = "gmane.comp.lang.r." ){ url <- URLencode( sprintf( "http://dir.gmane.org/index.php?prefix=%s";, prefix) ) txt <- grep( '^ url ), value = TRUE ) rx <- '^.*?(.*?).*(.*?).*$' out <- data.frame( url = gsub( rx, "\\1", txt ), group = gsub( rx, "\\2", txt ), description = gsub( rx, "\\3", txt ), stringsAsFactors = FALSE ) out$group <- sub( "...", ".*", out$group, fixed = TRUE ) out } I'll clean this up and write a man page if there is interest in adding this to R, but this might be more appropriate in a package, for example: http://r-forge.r-project.org/projects/rsitesearch/ Romain Liaw, Andy wrote: From: Jonathan Baron On 05/07/09 13:48, Liaw, Andy wrote: From: Duncan Murdoch I'll incorporate the changes if you like Yes. Please do. I understand that it won't take effect for a while. When it does, I'll change my site. What do you think of the idea of adding a gmane (or other archive) search to your results page? Then if someone doesn't like what the man pages show, you can send them somewhere else, rather than leaving them to find out the other resources themselves. gmane has sample code for this on their search page search.gmane.org, so it looks reasonably easy. I'd suggest following their last example, with a drop-down box to select mailing lists, with comp.lang.r.* as an option for "all lists". Duncan Murdoch Good idea. I will do this. But there are also two other good search engines. Maybe I'll add all three search alternatives. But then, according to Sheena Iyengar, people won't choose any! Hmm. Actually, I was thinking about a possible RHelpSearch() in addition, if Jon is no longer going to include the R-help archive in the search. I used the current RSiteSearch() a lot more for searching R-help archive than functions in packages. Ideas? comments? This is OK with me, but I don't want to do it. I guess it would search gmane. MarkMail is also pretty good, as is http://tolstoy.newcastle.edu.au/R/ All these are much better than Namazu for searching the R-help list. Sorry I didn't make it clear: I meant something like the gmaneSearcg() that Romain posted, not hitting your site. Best, Andy Jon -- Romain Francois Independent R Consultant +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr -- Jonathan Baron, Professor of Psychology, University of Pennsylvania