Re: [R] increase the usage of CPU and Memory

2012-06-27 Thread Richard R. Liu
package parallel is now part of base R, and a version of multicore's mclapply (which, in multicore, does not support Windows) is available. Regards, Richard Richard R. Liu Hebelstr. 136 CH-4056 Basel Switzerland Tel.: +41 61 321 66 00 Mobil: +41 79 708 67 66 Email: richard@pueo-o

[R] How to convert a list to a ... argument for a function

2010-10-05 Thread Richard R. Liu
i.e., arglist <- list(...).  But how do I pass func the first n-1 list items of arglist (n <- length(arglist)), as n-1 arguments, not as one list of n-1 items? Regards, Richard Richard R. Liu richard@pueo-owl.ch __ R-help@r-project.org mai

Re: [R] Multibyte characters in (row) names

2010-08-03 Thread Richard R. Liu
ear, and I will circumvent it by removing symbols before stemming. Regards, Richard On August 2, 2010 at 7:13 PM David Winsemius wrote: > > On Aug 2, 2010, at 12:56 PM, Richard R. Liu wrote: > > > I have an array with names which contain multibyte characters.  When  > > I

[R] Multibyte characters in (row) names

2010-08-02 Thread Richard R. Liu
lution" is ugly; "en.\xc2" becomes "\"en.\\xc2\"". Is there a more straight forward way of dealing with multibyte characters? Thanks Richard Richard R. Liu richard@pueo-owl.ch __ R-help@r-project.org mailing

Re: [R] Compact Patricia Trees (Tries)

2010-04-30 Thread Richard R. Liu
he fact that it's doing natively what I was doing with R script, i.e., comparing each element of the first argument to a substring of the second argument with the same length as the element. Any insights? Regards, Richard Richard R. Liu Dittingerstr. 33 CH-4053 Basel Switzerland Tel

[R] Compact Patricia Trees (Tries)

2010-04-29 Thread Richard R. Liu
trie and performing trie searches might lead to dramatic improvements in performance. I have searched the CRAN packages and find no packages that support Compact Patricia Trees.  Does anybody know of such? Thanks, Richard Richard R. Liu richard@pueo-owl.ch

[R] Decompounder for German

2010-04-07 Thread Richard R. Liu
nks, Richard R. Liu Dittingerstr. 33 CH-4053 Basel Switzerland Tel.: +41 61 331 10 47 Mobil: +41 79 708 67 66 Email: richard@pueo-owl.ch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting gu

[R] Cryptic error message from rfe (in caret package)

2009-12-02 Thread Richard R. Liu
ow to which objects the warnings refer? Richard R. Liu Dittingerstr. 33 CH-4053 Basel Switzerland Tel.: +41 61 331 10 47 Mobil: +41 79 708 67 66 Email: richard@pueo-owl.ch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinf

Re: [R] How can this code be improved?

2009-11-13 Thread Richard R. Liu
ere to focus for improvement. I would suggest that you do not > convert the output of the 'table(t)' do a dataframe. You can just > extract the 'names' to get the words. You might be spending some of > the time in the accessing the information in the dataframe, whic

Re: [R] How can this code be improved?

2009-11-12 Thread Richard R. Liu
ion in the dataframe, which is really not necessary for your code. On Thu, Nov 12, 2009 at 2:12 AM, Richard R. Liu > wrote: I am running the following code on a MacBook Pro 17" Unibody early 2009 with 8GB RAM, OS X 10.5.8, R 2.10.0 Patch from Nov. 2, 2009, in 64-bit mode.

[R] How can this code be improved?

2009-11-11 Thread Richard R. Liu
I am running the following code on a MacBook Pro 17" Unibody early 2009 with 8GB RAM, OS X 10.5.8, R 2.10.0 Patch from Nov. 2, 2009, in 64-bit mode. freq.stopwords <- numeric(0) freq.nonstopwords <- numeric(0) token.tables <- list(0) i.ss <- c(0) cat("Beginning at ", date(), ".\n") for (i.d i

Re: [R] R 2.10.0: Error in gsub/calloc

2009-11-05 Thread Richard R. Liu
does there. If this works, it should be way faster than strapply() and should not have any memory allocation issues either. HTH. Bert Gunter Genentech Nonclinical Biostatistics -----Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org ] On Behal

Re: [R] R 2.10.0: Error in gsub/calloc

2009-11-03 Thread Richard R. Liu
I am using gsubfn 0.5-0. When I do not specify perl = TRUE I now get the following error on the same document: Error in structure(.External("dotTcl", ..., PACKAGE = "tcltk"), class = "tclObj") : [tcl] bad index "1e+05": must be integer?[+-]integer? or end? [+-]integer?. Regards, Richard

Re: [R] R 2.10.0: Error in gsub/calloc

2009-11-03 Thread Richard R. Liu
Cabrera Torres wrote: Try the patch version... Maybe is the same problem I had with large database when using gsub() HTH El mar, 03-11-2009 a las 20:31 +0100, Richard R. Liu escribió: I apologize for not being clear. d is a character vector of length 158908. Each element in the vector has bee

Re: [R] R 2.10.0: Error in gsub/calloc

2009-11-03 Thread Richard R. Liu
performing a white-space tokenization of each sentence. I am doing this in the hope of being able to distinguish true sentences from false ones on the basis of mean length of token, maximum length of token, or similar. Richard R. Liu Dittingerstr. 33 CH-4053 Basel Switzerland Tel.: +41 61

[R] R 64 and R: using 64-bit versions of packages in R (32)

2009-10-23 Thread Richard R. Liu
I'm running R 2.9.2 build 5464 on OS X 10.5.8. Having encountered memory allocation problems, I ran the problematic code in R64, the 64- bit version of the same build. When I attempt to load openNLP I receive the error message that the 32-bit version that I had been using does not run in R

[R] tm: Why does adding local metadata take so long?

2009-10-13 Thread Richard R. Liu
I'm running tm 0.5 on R 2.9.2 on a MacBook Pro 17" unibody early 2009 2.93 GHz 4GB RAM. I have a directory with 1697 plain text files on the Mac, that I want to analyze with the tm package. I have read the documents into a corpus, Corpus_3compounds, as follows: # Assign directory to a cha