[Rd] install.packages hangs RGui with frozen rpwd process at bottom of process tree (PR#13734)
Full_Name: Allan Stokes Version: 2.8.1 OS: XP Submission from: (NULL) (24.108.0.245) I've just spent a hellish six hours trying to create my own R package with a bare bones "hello world" R function inside. I was able to create a package.tar.gz file eventually with much perseverance. My remaining problem is that when I try to install my simple package under RGui, it hangs. install.packages("c:/testR/scupper_1.0.tar.gz", repos=NULL, type="source", lib="c:/allanR") The hung process tree as shown by SysInternals Process Explorer. 1. Rgui.exe cmd="C:\Program Files\R\R-2.8.1\bin\Rgui.exe" cd=Z:\ 2. R.exe cmd=C:\PROGRA~1\R\R-28~1.1\bin\R.exe CMD INSTALL -l "c:/allanR" "c:/allanR/scupper_1.0.tar.gz" cd=Z:\ 3. cmd.exe cmd=C:\WINDOWS\system32\cmd.exe /c perl C:\PROGRA~1\R\R-28~1.1/bin/INSTALL -l c:/allanR c:/allanR/scupper_1.0.tar.gz cd=Z:\ 4. perl.exe cmd=perl C:\PROGRA~1\R\R-28~1.1/bin/INSTALL -l c:/allanR c:/allanR/scupper_1.0.tar.gz Z:\ 5. make.exe cmd=make --no-print-directory -C C:/PROGRA~1/R/R-28~1.1/src/gnuwin32 PKGDIR=Z:/R.INSTALL.5532 PKGNAME=scupper RLIB=c:/allanR DPKG=c:/allanR/scupper scupper-LAZY=true HELP=YES WINHELP=CHM pkg-scupper dir=C:\Program Files\R\R-2.8.1\src\gnuwin32\ 6. make.exe cmd=c:\Rtools\bin\make.exe dir=C:\WINDOWS\system32\ 7. Rpwd.exe cmd=c:\PROGRA~1\R\R-28~1.1\src\gnuwin32\Rpwd.exe ../.. dir=C:\Program Files\R\R-2.8.1\src\gnuwin32\ First, one stupid thing is that one time I ran the make cmd under the CMD prompt and it successfully generated a CHM file, as shown by this fragment of the output I captured: >>> Building/Updating help pages for package 'scupper' Formats: text html latex example chm Microsoft HTML Help Compiler 4.74.8702 Compiling z:\R.INSTALL.6416\scupper\chm\scupper.chm Compile time: 0 minutes, 0 seconds 1 Topic 0 Local links 0 Internet links 1 Graphic Created z:\R.INSTALL.6416\scupper\chm\scupper.chm, 14,448 bytes Compression increased file by 9,624 bytes. That didn't work when I tried it again, but the R temp directories sometimes vanish in the meantime. Using System Internals File Monitor, I can see the last access to the file system by rpwd.exe 9:25:26 PM Rpwd.exe:6328 QUERY INFORMATION C:\PROGRA~1\R\R-28~1.1\src\gnuwin32\Rpwd.exeSUCCESS FileNameInformation 9:25:26 PM Rpwd.exe:6328 OPEN C:\WINDOWS\Prefetch\RPWD.EXE-1615C3C8.pfSUCCESS Options: Open Access: Read 9:25:26 PM Rpwd.exe:6328 QUERY INFORMATION C:\WINDOWS\Prefetch\RPWD.EXE-1615C3C8.pfSUCCESS Length: 3882 9:25:26 PM Rpwd.exe:6328 READ C:\WINDOWS\Prefetch\RPWD.EXE-1615C3C8.pfSUCCESS Offset: 0 Length: 3882 9:25:26 PM Rpwd.exe:6328 OPENC: SUCCESS Options: Open Access: 00100180 9:25:26 PM Rpwd.exe:6328 QUERY INFORMATION C: SUCCESS FileFsVolumeInformation 9:25:26 PM Rpwd.exe:6328 OPENC:\ SUCCESS Options: Open Directory Access: 0011 9:25:26 PM Rpwd.exe:6328 DIRECTORY C:\ SUCCESS FileNamesInformation 9:25:26 PM Rpwd.exe:6328 DIRECTORY C:\ NO MORE FILES FileNamesInformation 9:25:26 PM Rpwd.exe:6328 OPENC:\PROGRA~1\SUCCESS Options: Open Directory Access: 0011 9:25:26 PM Rpwd.exe:6328 DIRECTORY C:\PROGRA~1\SUCCESS FileNamesInformation 9:25:26 PM Rpwd.exe:6328 DIRECTORY C:\PROGRA~1\NO MORE FILES FileNamesInformation 9:25:26 PM Rpwd.exe:6328 OPENC:\PROGRA~1\R\ SUCCESS Options: Open Directory Access: 0011 9:25:26 PM Rpwd.exe:6328 DIRECTORY C:\PROGRA~1\R\ SUCCESS FileNamesInformation 9:25:26 PM Rpwd.exe:6328 DIRECTORY C:\PROGRA~1\R\ NO MORE FILES FileNamesInformation 9:25:26 PM Rpwd.exe:6328 OPENC:\PROGRA~1\R\R-28~1.1\ SUCCESS Options: Open Directory Access: 0011 9:25:26 PM Rpwd.exe:6328 DIRECTORY C:\PROGRA~1\R\R-28~1.1\ SUCCESS FileNamesInformation 9:25:26 PM Rpwd.exe:6328 DIRECTORY C:\PROGRA~1\R\R-28~1.1\ NO MORE FILES FileNamesInformation 9:25:26 PM Rpwd.exe:6328 OPENC:\PROGRA~1\R\R-28~1.1\SRC\ SUCCESS Options: Open Directory Access: 0011 9:25:26 PM Rpwd.exe:6328 DIRECTORY C:\PROGRA~1\R\R-28~1.1\SRC\ SUCCESS FileNamesInformation 9:25:26 PM Rpwd.exe:6328 DIRECTORY C:\PROGRA~1\R\R-28~1.1\SRC\ NO MORE FILES FileNamesInformation 9:25:26 PM Rpwd.exe:6328 OPENC:\PROGRA~1\R\R-28~1.1\SRC\GNUWIN32\ SUCCESS Options: Open Directory Access: 0011 9:25:26 PM Rpwd.exe:6328 DIRECTORY C:\PROGRA~1\R\R-28~1.1\SRC\GNUWIN32\SUCCESS FileNamesInformation 9:25:26 PM Rpwd.exe:6328 DIRECTORY C:\PROGRA~1\R\R-28~1.1\SRC\GNUWIN32\NO MORE FILES FileNamesInformation 9:25:26 PM Rpwd.exe:6328 OPENC:\WINDOWS\ SUCCESS Options: Open Directory Access: 0011
Re: [Rd] setdiff bizarre (was: odd behavior out of setdiff)
Jay, I really appreciate all your help help. I posted to Nabble an R file and input CSV files more accurately demonstrating what I am seeing and the output I desire to achieve when I difference two dataframes. http://n2.nabble.com/Support-SetDiff-Discussion-Items...-td2999739.html It may be that "setdiff" as intended in the base R functionality and "prob" was never intended to provide the type of result I desire. If that is the case then I will need to ask the "Ninjas" for help to produce the out come I seek. That is, when I different the data within RSetDiffEntry.csv and RSetDuplicatesRemoved.csv, I desire to get the result shown in RDesired.csv. Note that, it would not be enough to just work to remove duplicate "CostPerSquareFoot" values, since that variable is tied to "EntryDate" and "HouseNumber". Any further help and insights are much appreciated. Thanks again, Jason --- On Fri, 5/29/09, G. Jay Kerns wrote: > From: G. Jay Kerns > Subject: setdiff bizarre (was: odd behavior out of setdiff) > To: r-devel@r-project.org > Cc: dwinsem...@comcast.net, jasonkrup...@yahoo.com > Date: Friday, May 29, 2009, 11:35 PM > Dear R-devel, > > Please see the recent thread on R-help, "Odd Behavior Out > of > setdiff(...) - addition of duplicate entries is not > identified" posted > by Jason Rupert. I gave an answer, then read David > Winsemius' answer, > and then did some follow-up investigation. > > I would like to change my answer. > > My current version of setdiff() is acting in a way that I > do not > understand, and a way that I suspect has > changed. Consider the > following, derived from Jason's OP: > > The base package setdiff(), atomic vectors: > > x <- 1:100 > y <- c(x,x) > > setdiff(x, y) # integer(0) > setdiff(y, x) # integer(0) > > z <- 1:25 > > setdiff(x,z) # 26:100 > setdiff(z,x) # integer(0) > > > Everything is fine. > > Now look at base package setdiff(), data frames??? > > > A <- data.frame(x = 1:100) > B <- rbind(A, A) > > setdiff(A, B) > # df 1:100? > setdiff(B, A) > # df 1:100? > > C <- data.frame(x = 1:25) > > setdiff(A, C) > # df 1:100? > setdiff(C, A) > # df 1:25? > > > > > I have read ?setdiff 37 times now, and I cannot divine any > interpretation that matches the above output. From > the source, it > appears that > > match(x, y, 0L) == 0L > > is evaluating to TRUE, of length equal to the columns of x, > and then > > x[match(x, y, 0L) == 0L] > > is returning the entire data frame. > > Compare with the output from package "prob", which uses a > setdiff that > operates row-wise: > > > ### > library(prob) > A <- data.frame(x = 1:100) > B <- rbind(A, A) > > setdiff(A, B) > # integer(0) > setdiff(B, A) > # integer(0) > > C <- data.frame(x = 1:25) > > setdiff(A, C) > # 26:100 > setdiff(C, A) > # integer(0) > > > > IMHO, the entire notion of "set" and "element" is > problematic in the > df case, so I am not advocating the adoption of the > prob:::setdiff > approach; rather, setdiff is behaving in a way that I > cannot believe > with my own eyes, and I would like to alert those who can > speak as to > why this may be happening. > > Thanks to Jason for bringing this up, and to David for > catching the discrepancy. > > Session info is below. I use the binaries prepared by > the Debian > group so I do not have the latest > patched-revision-4440986745343b. > This must have been related to something which has been > fixed since > April 17, and in that case, please disregard my message. > > Yours truly, > Jay > > > > > > > > sessionInfo() > R version 2.9.0 (2009-04-17) > x86_64-pc-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=C;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 > utils datasets > methods base > > other attached packages: > [1] prob_0.9-1 > > > > > > > > > > > > > > > > > > -- > > *** > G. Jay Kerns, Ph.D. > Associate Professor > Department of Mathematics & Statistics > Youngstown State University > Youngstown, OH 44555-0002 USA > Office: 1035 Cushwa Hall > Phone: (330) 941-3310 Office (voice mail) > -3302 Department > -3170 FAX > E-mail: gke...@ysu.edu > http://www.cc.ysu.edu/~gjkerns/ > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] LM/GLM can't find weights vector from within a function (PR#13735)
Full_Name: Alberto Gaidys Version: 2.9.0 OS: Mac OS X 10.5.7 Submission from: (NULL) (201.81.185.155) When calling LM or GLM from within a function, R gives a message error that it can't find the specified weights object "Erro em eval(expr, envir, enclos) : objeto 'W' não encontrado" (Error in eval(expr, envir, enclos) : object 'W' not found). The call from within the user-defined function where the error happens is: rReg<-lm(formula=rFormula,data=rData,subset=1:i,weights=W,x=TRUE,y=TRUE) where rFormula is a text string, rData is a 1422 x 17 timeSeries data matrix, both passed from the console, i is a counter, W is a 1422 x 1 numeric vector of weights declared locally within the function. The function definition is as follows: redls<-function(rFormula, rData, nStart, rBeta=1., nDelayed=3) I already tried to define W externally to the function and parse it as a parameter, change its name, declare it as an array, declare it as a timeSeries object, with always the same error. Invoking glm instead of lm gives also the same error. The ls.str listing of W immediately before calling lm, showing it does exist, is: W : num [1:1422(1d)] 0.00628 0.0064 0.00654 0.00667 0.00681 ... The exactly same lm call, with the objects created exactly the same way from the console produces no error though. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] (PR#13735) LM/GLM can't find weights vector from within a function
This seems to be as documented. From ?lm All of 'weights', 'subset' and 'offset' are evaluated in the same way as variables in 'formula', that is first in 'data' and then in the environment of 'formula'. We don't have a reproducible example and so do not know where rFormula was defined -- but it seems likely that W is not defined in its environment. If you believe otherwise, we need a complete example. Incidentally, str() reports that W is a 1D array, not a vector. On Mon, 1 Jun 2009, gai...@uol.com.br wrote: Full_Name: Alberto Gaidys Version: 2.9.0 OS: Mac OS X 10.5.7 Submission from: (NULL) (201.81.185.155) When calling LM or GLM from within a function, R gives a message error that it can't find the specified weights object "Erro em eval(expr, envir, enclos) : objeto 'W' não encontrado" (Error in eval(expr, envir, enclos) : object 'W' not found). The call from within the user-defined function where the error happens is: rReg<-lm(formula=rFormula,data=rData,subset=1:i,weights=W,x=TRUE,y=TRUE) where rFormula is a text string, rData is a 1422 x 17 timeSeries data matrix, both passed from the console, i is a counter, W is a 1422 x 1 numeric vector of weights declared locally within the function. The function definition is as follows: redls<-function(rFormula, rData, nStart, rBeta=1., nDelayed=3) I already tried to define W externally to the function and parse it as a parameter, change its name, declare it as an array, declare it as a timeSeries object, with always the same error. Invoking glm instead of lm gives also the same error. The ls.str listing of W immediately before calling lm, showing it does exist, is: W : num [1:1422(1d)] 0.00628 0.0064 0.00654 0.00667 0.00681 ... The exactly same lm call, with the objects created exactly the same way from the console produces no error though. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Brian D. Ripley, rip...@stats.ox.ac.uk 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] Reshaping Data
Hi, i did a mistake with my first post. I have to reshape data from this matrix: idx1 x2 x3x4day1 day2 day3 day4 day5 day6 day7 day8 day9 10.1290.7970.2310.6154 4 1 1 1 1 3 3 3 20.4200.3760.5010.2824 4 4 4 5 4 2 5 5 30.3770.4860.8970.6994 4 4 4 4 4 4 4 4 40.4880.1350.9750.7624 4 4 4 4 4 4 4 4 50.6940.5680.5250.1014 1 1 1 1 5 1 5 5 and my task is to reshape data such that each record contains only one participant (id) on one day could somebody help me out with this? does this mean every person have 9 records himself? for all 9 days? thank you very much _ --> Für Fotos hier abdrücken <- [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Mistake in CP1257.enc file of grDevices package (PR#13736)
Full_Name: Vaidotas Zemlys Version: 2.9.0 OS: Ubuntu 8.10 Submission from: (NULL) (213.197.173.50) Hi, This is the same bug as bug #9845. Encodings CP1257 and ISOLatin7 are used for Lithuanian and Latvian languages. They differ only by certain symbols such as quotation marks. Instead of umacron and Umacron there are symbols ucircmuflex and Ucircumflex in file CP1257.enc, which belongs to package grDevices. To see the problem compare the outputs > postscript(encoding="CP1257.enc") > plot(rnorm(100),main="\u016B\u016A") > dev.off() and plot(rnorm(100),main="\u016B\u016A"). This bug appears only in Windows environment with Lithuanian locale, since only then CP1257 is used as default encoding. Changing [uU]circumflex to [uU]macron in file CP1257.enc fixes the problem. Vaidotas Zemlys __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Reshaping Data -- do use R-help !
Dear Christian, your question does not at all belong to R-devel. Please use R-help instead, but you should probably first read the posting guide, (and from that see that you should *not* send HTML-ified postings). Regards, Martin Maechler > "CM" == Christian Morgenstern > on Mon, 1 Jun 2009 11:33:19 + writes: CM> Hi, CM> i did a mistake with my first post. CM> I have to reshape data from this matrix: [..] CM> [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Recommendations for a quick UI.
> "AB" == Alex Bokov > on Mon, 01 Jun 2009 00:24:58 -0500 writes: AB> Hi. This is my first post to this list, I seem to be AB> graduating to from the r-help list. :-) well AB> I'm trying to wrap my R package in a GUI such that when AB> the user launches the app, they see my GUI window and AB> never interact with the R console at all. I don't have AB> any fancy requirements for the GUI itself-- all it needs AB> to do is collect input from the user and pass the input AB> as arguments to an R function, which writes the results AB> to a file. AB> I read the R Extensions Manual section about GUIs, and AB> it seems like overkill to write the thing in a compiled AB> language and link against R as a library when there are AB> dozens of different interpreted cross-platform GUI AB> toolkits out there. Does anybody know of any functioning AB> examples of packages (or other add-ons) with GUIs that AB> run R silently in the background which I can study? Do AB> they use the "R CMD BATCH" mechanism, or something else? There's a dedicated "Special Interest Group" mailing list for answering / discussing such questions : R-SIG-GUI Please subscribe and ask there --> https://stat.ethz.ch/mailman/listinfo/r-sig-gui Regards, Martin Maechler, ETH Zurich __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Recommendations for a quick UI.
Hi, The following idea only partially answers your question I have successfully written a GUI using the tcl/tk package that ships with standard R. It is then possible (in Windows) to create a shortcut icon that runs the following command: C:\R\R-2.8.1\bin\R.exe --vanilla -e library(SuperCurveGUI);sc(); Note two features: [1] the first part of the -e switch loads the library containing the GUI [2] the second part (after the semicolon) launches the GUI If you make a "normal" shortcut this way, a batch window will open showing the ongoing R session, which is not quite what you want. However, if you adjust the shortcut to "Run: Minimized", then (most) users will never see the batch window, and will only see the GUI. The reasons that this only partially answers your question are [1] It is Windows-specific [2] I do not know how to set up the shortcut automatically upon installation. Kevin Alex Bokov wrote: Hi. This is my first post to this list, I seem to be graduating to from the r-help list. :-) I'm trying to wrap my R package in a GUI such that when the user launches the app, they see my GUI window and never interact with the R console at all. I don't have any fancy requirements for the GUI itself-- all it needs to do is collect input from the user and pass the input as arguments to an R function, which writes the results to a file. I read the R Extensions Manual section about GUIs, and it seems like overkill to write the thing in a compiled language and link against R as a library when there are dozens of different interpreted cross-platform GUI toolkits out there. Does anybody know of any functioning examples of packages (or other add-ons) with GUIs that run R silently in the background which I can study? Do they use the "R CMD BATCH" mechanism, or something else? Thanks. __ 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] as.numeric(levels(factor(x))) may be a decreasing sequence
> "PS" == Petr Savicky > on Sun, 31 May 2009 10:29:41 +0200 writes: [] PS> I appreciate the current version, which contains static PS> const char* dropTrailing0(char *s, char cdec) ... PS> mkChar(dropTrailing0((char *)EncodeReal(x, w, d, e, PS> OutDec), ... PS> Here, is better visible that the cast (char *) is used PS> than if it was hidden inside dropTrailing0(). Also, it PS> makes dropTrailing0() more consistent. PS> I would like to recall the already discussed PS> modification if (replace != p) while((*(replace++) = PS> *(p++))) ; which saves a few instructions in the more PS> frequent case that there are no trailing zeros. Yes, thank you. This already was in my working version, and I had managed to lose it again. Will put i back still hoping this topic would be closed now ... Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] as.numeric(levels(factor(x))) may be a decreasing sequence
Martin Maechler wrote: >> "PS" == Petr Savicky >> on Sun, 31 May 2009 10:29:41 +0200 writes: >> > > [] > > PS> I appreciate the current version, which contains static > PS> const char* dropTrailing0(char *s, char cdec) ... > PS> mkChar(dropTrailing0((char *)EncodeReal(x, w, d, e, > PS> OutDec), ... > > PS> Here, is better visible that the cast (char *) is used > PS> than if it was hidden inside dropTrailing0(). Also, it > PS> makes dropTrailing0() more consistent. > > PS> I would like to recall the already discussed > PS> modification if (replace != p) while((*(replace++) = > PS> *(p++))) ; which saves a few instructions in the more > PS> frequent case that there are no trailing zeros. > > Yes, thank you. This already was in my working version, > and I had managed to lose it again. > Will put i back > > still hoping this topic would be closed now ... > i would rather hope for the EncodeReal flaw to be repaired... vQ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] install.packages hangs RGui with frozen rpwd process at bottom of process tree (PR#13734)
Uwe Ligges wrote: asto...@esica.com wrote: Full_Name: Allan Stokes Version: 2.8.1 OS: XP Submission from: (NULL) (24.108.0.245) I've just spent a hellish six hours trying to create my own R package with a bare bones "hello world" R function inside. I was able to create a package.tar.gz file eventually with much perseverance. My remaining problem is that when I try to install my simple package under RGui, it hangs. install.packages("c:/testR/scupper_1.0.tar.gz", repos=NULL, type="source", lib="c:/allanR") Please try to install from Windows command shell using "R CMD INSTALL" and tell us what you see there. Note also that the install scripts have been largely rewritten for R-2.9.0 which is current. By the way, this is not a bug in R. Hence please do not file such messages a bug reports. Uwe Ligges Best, Uwe Ligges The hung process tree as shown by SysInternals Process Explorer. 1. Rgui.exe cmd="C:\Program Files\R\R-2.8.1\bin\Rgui.exe" cd=Z:\ 2. R.exe cmd=C:\PROGRA~1\R\R-28~1.1\bin\R.exe CMD INSTALL -l "c:/allanR" "c:/allanR/scupper_1.0.tar.gz" cd=Z:\ 3. cmd.exe cmd=C:\WINDOWS\system32\cmd.exe /c perl C:\PROGRA~1\R\R-28~1.1/bin/INSTALL -l c:/allanR c:/allanR/scupper_1.0.tar.gz cd=Z:\ 4. perl.exe cmd=perl C:\PROGRA~1\R\R-28~1.1/bin/INSTALL -l c:/allanR c:/allanR/scupper_1.0.tar.gz Z:\ 5. make.exe cmd=make --no-print-directory -C C:/PROGRA~1/R/R-28~1.1/src/gnuwin32 PKGDIR=Z:/R.INSTALL.5532 PKGNAME=scupper RLIB=c:/allanR DPKG=c:/allanR/scupper scupper-LAZY=true HELP=YES WINHELP=CHM pkg-scupper dir=C:\Program Files\R\R-2.8.1\src\gnuwin32\ 6. make.exe cmd=c:\Rtools\bin\make.exe dir=C:\WINDOWS\system32\ 7. Rpwd.exe cmd=c:\PROGRA~1\R\R-28~1.1\src\gnuwin32\Rpwd.exe ../.. dir=C:\Program Files\R\R-2.8.1\src\gnuwin32\ First, one stupid thing is that one time I ran the make cmd under the CMD prompt and it successfully generated a CHM file, as shown by this fragment of the output I captured: >>> Building/Updating help pages for package 'scupper' Formats: text html latex example chm Microsoft HTML Help Compiler 4.74.8702 Compiling z:\R.INSTALL.6416\scupper\chm\scupper.chm Compile time: 0 minutes, 0 seconds 1 Topic 0 Local links 0 Internet links 1 Graphic Created z:\R.INSTALL.6416\scupper\chm\scupper.chm, 14,448 bytes Compression increased file by 9,624 bytes. That didn't work when I tried it again, but the R temp directories sometimes vanish in the meantime. Using System Internals File Monitor, I can see the last access to the file system by rpwd.exe 9:25:26 PMRpwd.exe:6328QUERY INFORMATION C:\PROGRA~1\R\R-28~1.1\src\gnuwin32\Rpwd.exeSUCCESS FileNameInformation 9:25:26 PMRpwd.exe:6328OPEN C:\WINDOWS\Prefetch\RPWD.EXE-1615C3C8.pfSUCCESS Options: Open Access: Read 9:25:26 PMRpwd.exe:6328QUERY INFORMATION C:\WINDOWS\Prefetch\RPWD.EXE-1615C3C8.pfSUCCESSLength: 3882 9:25:26 PMRpwd.exe:6328READ C:\WINDOWS\Prefetch\RPWD.EXE-1615C3C8.pfSUCCESS Offset: 0 Length: 3882 9:25:26 PMRpwd.exe:6328OPENC:SUCCESSOptions: Open Access: 00100180 9:25:26 PMRpwd.exe:6328QUERY INFORMATIONC:SUCCESS FileFsVolumeInformation 9:25:26 PMRpwd.exe:6328OPENC:\SUCCESSOptions: Open Directory Access: 0011 9:25:26 PMRpwd.exe:6328DIRECTORYC:\SUCCESS FileNamesInformation 9:25:26 PMRpwd.exe:6328DIRECTORYC:\NO MORE FILES FileNamesInformation 9:25:26 PMRpwd.exe:6328OPENC:\PROGRA~1\SUCCESS Options: Open Directory Access: 0011 9:25:26 PMRpwd.exe:6328DIRECTORYC:\PROGRA~1\SUCCESS FileNamesInformation 9:25:26 PMRpwd.exe:6328DIRECTORYC:\PROGRA~1\NO MORE FILES FileNamesInformation 9:25:26 PMRpwd.exe:6328OPENC:\PROGRA~1\R\SUCCESS Options: Open Directory Access: 0011 9:25:26 PMRpwd.exe:6328DIRECTORYC:\PROGRA~1\R\ SUCCESSFileNamesInformation 9:25:26 PMRpwd.exe:6328DIRECTORYC:\PROGRA~1\R\NO MORE FILES FileNamesInformation 9:25:26 PMRpwd.exe:6328OPENC:\PROGRA~1\R\R-28~1.1\ SUCCESSOptions: Open Directory Access: 0011 9:25:26 PMRpwd.exe:6328DIRECTORYC:\PROGRA~1\R\R-28~1.1\ SUCCESS FileNamesInformation 9:25:26 PMRpwd.exe:6328DIRECTORYC:\PROGRA~1\R\R-28~1.1\ NO MORE FILES FileNamesInformation 9:25:26 PMRpwd.exe:6328OPENC:\PROGRA~1\R\R-28~1.1\SRC\ SUCCESSOptions: Open Directory Access: 0011 9:25:26 PMRpwd.exe:6328DIRECTORY C:\PROGRA~1\R\R-28~1.1\SRC\SUCCESS FileNamesInformation 9:25:26 PMRpwd.exe:6328DIRECTORY C:\PROGRA~1\R\R-28~1.1\SRC\NO MORE FILES FileNamesInformation 9:25:26 PMRpwd.exe:6328OPEN C:\PROGRA~1\R\R-28~1.1\SRC\GNUWIN32\SUCCESS Options: Open Directory Access: 0011 9:25:26 PMRpwd.exe:6328DIR
Re: [Rd] install.packages hangs RGui with frozen rpwd process at (PR#13739)
Uwe Ligges wrote: > > > asto...@esica.com wrote: >> Full_Name: Allan Stokes >> Version: 2.8.1 >> OS: XP >> Submission from: (NULL) (24.108.0.245) >> >> >> I've just spent a hellish six hours trying to create my own R package >> with a >> bare bones "hello world" R function inside. I was able to create a >> package.tar.gz file eventually with much perseverance. >> My remaining problem is that when I try to install my simple package >> under RGui, >> it hangs. >> install.packages("c:/testR/scupper_1.0.tar.gz", repos=NULL, >> type="source", >> lib="c:/allanR") > > > Please try to install from Windows command shell using "R CMD INSTALL" > and tell us what you see there. > Note also that the install scripts have been largely rewritten for > R-2.9.0 which is current. By the way, this is not a bug in R. Hence please do not file such messages a bug reports. Uwe Ligges > Best, > Uwe Ligges > > > >> The hung process tree as shown by SysInternals Process Explorer. >> 1. Rgui.exe >> cmd="C:\Program Files\R\R-2.8.1\bin\Rgui.exe" cd=Z:\ 2. R.exe >> cmd=C:\PROGRA~1\R\R-28~1.1\bin\R.exe CMD INSTALL -l "c:/allanR" >> "c:/allanR/scupper_1.0.tar.gz" >> cd=Z:\ >> 3. cmd.exe >> cmd=C:\WINDOWS\system32\cmd.exe /c perl >> C:\PROGRA~1\R\R-28~1.1/bin/INSTALL -l >> c:/allanR c:/allanR/scupper_1.0.tar.gz >> cd=Z:\ >> 4. perl.exe >> cmd=perl C:\PROGRA~1\R\R-28~1.1/bin/INSTALL -l c:/allanR >> c:/allanR/scupper_1.0.tar.gz >> Z:\ >> 5. make.exe >> cmd=make --no-print-directory -C C:/PROGRA~1/R/R-28~1.1/src/gnuwin32 >> PKGDIR=Z:/R.INSTALL.5532 PKGNAME=scupper RLIB=c:/allanR >> DPKG=c:/allanR/scupper >> scupper-LAZY=true HELP=YES WINHELP=CHM pkg-scupper >> dir=C:\Program Files\R\R-2.8.1\src\gnuwin32\ >> 6. make.exe >> cmd=c:\Rtools\bin\make.exe >> dir=C:\WINDOWS\system32\ >> 7. Rpwd.exe cmd=c:\PROGRA~1\R\R-28~1.1\src\gnuwin32\Rpwd.exe ../.. >> dir=C:\Program Files\R\R-2.8.1\src\gnuwin32\ >> >> First, one stupid thing is that one time I ran the make cmd under the >> CMD prompt >> and it successfully generated a CHM file, as shown by this fragment of >> the >> output I captured: >> >>> Building/Updating help pages for package 'scupper' >> Formats: text html latex example chm >> Microsoft HTML Help Compiler 4.74.8702 >> >> Compiling z:\R.INSTALL.6416\scupper\chm\scupper.chm >> >> Compile time: 0 minutes, 0 seconds >> 1 Topic >> 0 Local links >> 0 Internet links >> 1 Graphic >> >> Created z:\R.INSTALL.6416\scupper\chm\scupper.chm, 14,448 bytes >> Compression increased file by 9,624 bytes. >> >> That didn't work when I tried it again, but the R temp directories >> sometimes >> vanish in the meantime. >> Using System Internals File Monitor, I can see the last access to the >> file >> system by rpwd.exe >> 9:25:26 PMRpwd.exe:6328QUERY INFORMATION >> C:\PROGRA~1\R\R-28~1.1\src\gnuwin32\Rpwd.exeSUCCESS >> FileNameInformation >> 9:25:26 PMRpwd.exe:6328OPEN >> C:\WINDOWS\Prefetch\RPWD.EXE-1615C3C8.pfSUCCESS >> Options: Open Access: Read >> 9:25:26 PMRpwd.exe:6328QUERY INFORMATION >> C:\WINDOWS\Prefetch\RPWD.EXE-1615C3C8.pfSUCCESSLength: 3882 >> 9:25:26 PMRpwd.exe:6328READ >> C:\WINDOWS\Prefetch\RPWD.EXE-1615C3C8.pfSUCCESS >> Offset: 0 Length: 3882 >> 9:25:26 PMRpwd.exe:6328OPENC:SUCCESSOptions: Open >> Access: 00100180 >> 9:25:26 PMRpwd.exe:6328QUERY INFORMATIONC:SUCCESS >> FileFsVolumeInformation >> 9:25:26 PMRpwd.exe:6328OPENC:\SUCCESSOptions: Open >> Directory Access: >> 0011 >> 9:25:26 PMRpwd.exe:6328DIRECTORYC:\SUCCESS >> FileNamesInformation >> 9:25:26 PMRpwd.exe:6328DIRECTORYC:\NO MORE FILES >> FileNamesInformation >> 9:25:26 PMRpwd.exe:6328OPENC:\PROGRA~1\SUCCESS >> Options: Open Directory Access: 0011 >> 9:25:26 PMRpwd.exe:6328DIRECTORYC:\PROGRA~1\SUCCESS >> FileNamesInformation >> 9:25:26 PMRpwd.exe:6328DIRECTORYC:\PROGRA~1\NO MORE FILES >> FileNamesInformation >> 9:25:26 PMRpwd.exe:6328OPENC:\PROGRA~1\R\SUCCESS >> Options: Open Directory Access: 0011 >> 9:25:26 PMRpwd.exe:6328DIRECTORYC:\PROGRA~1\R\ >> SUCCESSFileNamesInformation >> 9:25:26 PMRpwd.exe:6328DIRECTORYC:\PROGRA~1\R\NO MORE >> FILES >> FileNamesInformation >> 9:25:26 PMRpwd.exe:6328OPENC:\PROGRA~1\R\R-28~1.1\ >> SUCCESSOptions: Open >> Directory Access: 0011 >> 9:25:26 PMRpwd.exe:6328DIRECTORYC:\PROGRA~1\R\R-28~1.1\ >> SUCCESS >> FileNamesInformation >> 9:25:26 PMRpwd.exe:6328DIRECTORYC:\PROGRA~1\R\R-28~1.1\ >> NO MORE FILES >> FileNamesInformation >> 9:25:26 PMRpwd.exe:6328OPENC:\PROGRA~1\R\R-28~1.1\SRC\ >> SUCCESSOptions: Open >> Directory Access: 0011 >> 9:25:26 PMRpwd.exe:6328D
[Rd] formal argument "envir" matched by multiple actual arguments
Hi list, This looks similar to the problem reported here https://stat.ethz.ch/pipermail/r-devel/2006-April/037199.html by Henrik Bengtsson a long time ago. It is very sporadic and non-reproducible. Henrik, do you remember if your code was using reg.finalizer()? I tend to suspect it but I'm not sure. I've been hunting this bug for months but today, and we the help of other Bioconductor users, I was able to isolate it and to write some code that seems to "almost" reproduce it (i.e. not systematically but most of the times). (Just to put some context to the code below: it's a simplified version of some more complex code that we use in Bioconductor to manage memory caching of some big objects stored on disk. The idea is that objects of class A can be named. All A objects with the same name form a group. The code below implements a simple mechanism to trigger some action when a group is completely removed from memory i.e. when the last object in a group is garbage collected.) setClassUnion("environmentORNULL", c("environment", "NULL")) setClass("A", representation( aa="integer", groupname="character", groupanchor="environmentORNULL" ) ) .A.group.sizes <- new.env(hash=TRUE, parent=emptyenv()) .inc.A.group.size <- function(groupname) { group.size <- 1L if (exists(groupname, envir=.A.group.sizes, inherits=FALSE)) group.size <- group.size + get(groupname, envir=.A.group.sizes, inherits=FALSE) assign(groupname, group.size, envir=.A.group.sizes, inherits=FALSE) } .dec.A.group.size <- function(groupname) { group.size <- get(groupname, envir=.A.group.sizes, inherits=FALSE) - 1L assign(groupname, group.size, envir=.A.group.sizes, inherits=FALSE) return(group.size) } newA <- function(groupname="") { a <- new("A", groupname=groupname) if (!identical(groupname, "")) { .inc.A.group.size(groupname) groupanchor <- new.env(parent=emptyenv()) reg.finalizer(groupanchor, function(e) { group.size <- .dec.A.group.size(groupname) if (group.size == 0L) { cat("no more object of group", groupname, "in memory\n") # take some action } } ) a...@groupanchor <- groupanchor } return(a) } The following commands seem to trigger the problem: > for (i in 1:2000) {a1 <- newA("group1")} > as.list(.A.group.sizes) > gc() > as.list(.A.group.sizes) > for (i in 1:2000) {a2 <- newA("group2")} Error in assign(".Method", method, envir = envir) : formal argument "envir" matched by multiple actual arguments If it doesn't, then adding more rounds should finally do it: gc() for (i in 1:2000) {a3 <- newA("group3")} gc() for (i in 1:2000) {a4 <- newA("group4")} etc... Thanks in advance for any help with this! H. > sessionInfo() R version 2.9.0 (2009-04-17) x86_64-unknown-linux-gnu locale: LC_CTYPE=en_CA.UTF-8;LC_NUMERIC=C;LC_TIME=en_CA.UTF-8;LC_COLLATE=en_CA.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_CA.UTF-8;LC_PAPER=en_CA.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_CA.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base -- Hervé Pagès Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M2-B876 P.O. Box 19024 Seattle, WA 98109-1024 E-mail: hpa...@fhcrc.org Phone: (206) 667-5791 Fax:(206) 667-1319 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] reference counting bug: overwriting for loop 'seq' variable
It looks like the 'seq' variable to 'for' can be altered from within the loop, leading to incorrect answers. E.g., in the following I'd expect 'sum' to be 1+2=3, but R 2.10.0 (svn 48686) gives 44.5. > x = c(1,2); sum = 0; for (i in x) { x[i+1] = i + 42.5; sum = sum + i }; sum [1] 44.5 or, with a debugging cat()s, > x = c(1,2); sum = 0; for (i in x) { cat("before, i=", i, "\n"); x[i+1] = i + 42.5; cat("after, i=", i,"\n"); sum = sum + i }; sum before, i= 1 after, i= 1 before, i= 43.5 after, i= 43.5 [1] 44.5 If I force the for's 'seq' to be a copy of x by adding 0 to it, then I do get the expected answer. > x = c(1,2); sum = 0; for (i in x+0) { x[i+1] = i + 42.5; sum = sum + i }; sum b[1] 3 It looks like an error in reference counting. Bill Dunlap TIBCO Software Inc - Spotfire Division wdunlap tibco.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] BUG: `lag` returns object of incorrect class
In R 2.8.0/Windows: > lag(1) [1] 1 attr(,"tsp") [1] 0 0 1 Though this has the 'tsp' attribute, it is of class "integer", and hence not a "time-series object" as defined by ? ts: "time-series objects... are vector [sic] or matrices with class of '"ts"' (and additional attributes)". ? lag further says "Vector or matrix arguments 'x' are coerced to time series", but > identical(lag(as.ts(1)),lag(1)) [1] FALSE I believe this can be fixed by adding class(x)<-"ts" after line 7 of stats:::lag.default (x <- hasTsp(x)). Perhaps all other users of hasTsp expect the same behavior? in which case it would better be fixed there. -s [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] S4 Objects [Sec=Unclassified]
I am new to R programming but have dived into a medium sized modelling software development project. Having come from a Java OO background I have a couple of questions about S4 objects. Is there a way to make S4 slots (and methods) private and hence force the use of accessor methods? Is there a straight-forward way to implement pass-by-reference for method parameters? I am currently returning and overwritting updated objects which is clunky and costly and would like a more efficient way of doing this. Can anyone point me to some useful texts on S4 programming apart from the following: Chambers - Software for Data Analysis: Programming with R Venables - S Programming Thanks heaps Troy ___ Australian Antarctic Division - Commonwealth of Australia IMPORTANT: This transmission is intended for the addressee only. If you are not the intended recipient, you are notified that use or dissemination of this communication is strictly prohibited by Commonwealth law. If you have received this transmission in error, please notify the sender immediately by e-mail or by telephoning +61 3 6232 3209 and DELETE the message. Visit our web site at http://www.antarctica.gov.au/ ___ [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel