search for: tempdir

Displaying 20 results from an estimated 285 matches for "tempdir".

2017 Apr 26
2
tempdir() may be deleted during long-running R session
On Tue, Apr 25, 2017 at 02:41:58PM +0000, Cook, Malcolm wrote: > Might this combination serve the purpose: > * R session keeps an open handle on the tempdir it creates, > * whatever tempdir harvesting cron job the user has be made sensitive enough not to delete open files (including open directories) Good suggestion but doesn't work with the (increasingly popular) "Systemd": $ mkdir /tmp/somedir $ touch -d "12 days ago...
2017 Apr 25
4
tempdir() may be deleted during long-running R session
...f setting variables to affect this. Thank you Dirk (and Brian). That is all true, and of course I have known about this myself "forever" as well. > | If R expected the directory to be deleted at random, and if we expect > | users to call dir.create every time they access tempdir, then why did > | R create the directory for us at the beginning of the session? That's > | just setting people up to get weird bugs, which only appear in > | difficult-to-reproduce situations (i.e. after the session has been > | open for a long time). > I di...
2017 Nov 09
3
check does not check that package examples remove tempdir()
I was looking at the CRAN package 'bfork-0.1.2', which exposes the Unix fork() and waitpid() calls at the R code level, and noticed that the help file example for bfork::fork removes R's temporary directory, the value of tempdir(). I think it happens because the forked process shares the value of tempdir() with the parent process and removes it when it exits. This seems like a serious problem - should 'check' make sure that running code in a package's examples, vignettes, etc. leaves tempdir() intact? >...
2012 Feb 21
1
tempdir() documentation or real bug ?
?tempdir says By default, ?tmpdir? will be the directory given by ?tempdir()?. This will be a subdirectory of the temporary directory found by the following rule. The environment variables ?TMPDIR?, ?TMP? and ?TEMP? are checked in turn and the first found which points to a writable dir...
2011 Mar 18
1
[Patch suggestion] Adding 3rd arg to tempfile() to set extension
...========================= --- src/library/base/R/temp.R (revision 54862) +++ src/library/base/R/temp.R (working copy) @@ -14,7 +14,7 @@ # A copy of the GNU General Public License is available at # http://www.r-project.org/Licenses/ -tempfile <- function(pattern = "file", tmpdir = tempdir()) - .Internal(tempfile(pattern, tmpdir)) +tempfile <- function(pattern = "file", tmpdir = tempdir(), fileext = "") + .Internal(tempfile(pattern, tmpdir, fileext)) tempdir <- function() .Internal(tempdir()) Index: src/library/base/man/tempfile.Rd =================...
2017 Apr 26
0
tempdir() may be deleted during long-running R session
...gt;>>>> <frederik at ofb.net> >>>>> on Tue, 25 Apr 2017 21:13:59 -0700 writes: > On Tue, Apr 25, 2017 at 02:41:58PM +0000, Cook, Malcolm wrote: >> Might this combination serve the purpose: >> * R session keeps an open handle on the tempdir it creates, >> * whatever tempdir harvesting cron job the user has be made sensitive enough not to delete open files (including open directories) I also agree that the above would be ideal - if possible. > Good suggestion but doesn't work with the (increasingly popular)...
2017 Apr 26
6
tempdir() may be deleted during long-running R session
...<frederik at ofb.net> >>>>>> on Tue, 25 Apr 2017 21:13:59 -0700 writes: > > > On Tue, Apr 25, 2017 at 02:41:58PM +0000, Cook, Malcolm wrote: > >> Might this combination serve the purpose: > >> * R session keeps an open handle on the tempdir it creates, > >> * whatever tempdir harvesting cron job the user has be made sensitive enough not to delete open files (including open directories) > > I also agree that the above would be ideal - if possible. > > > Good suggestion but doesn't work with the (incr...
2008 Oct 16
1
Rscript -e, Sweave and tempdir()
Hello R-Help I have a question about the "behind the scenes" behaviour of the Rscript -e command and particularly its interaction with Sweave and tempdir(). We are trying to deploy R as a web service to do water quality analyses and have been writing software to call Sweave via Rscript eg: cmd> Rscript -e Sweave('sweavefile.Rnw') One problem we have been having is that Sweave tries to write temporary files in a temporary directory give...
2011 Apr 12
2
parse_Rd raises error when example section contains a quoted percent character
I was writing Rd documentation for a new package when I came across this issue. Here's the smallest example: > library(tools) > cat("\\examples{x <- '<%=rnorm(1)%>'}\n",file=file.path(tempdir(),'test.Rd')) > readLines(file.path(tempdir(),'test.Rd')) [1] "\\examples{x <- '<%=rnorm(1)%>'}" > parse_Rd(file.path(tempdir(),'test.Rd')) Error in parse_Rd(file.path(tempdir(), "test.Rd")) : Unexpected end of input (in ' quo...
2018 Apr 24
0
disappearing tempdir()
...porary files. It does not seem to matter how old they are; empty directories are found and removred c. once a day. I haven't seen any documentation on this feature but I think you can turn if off by disabling "Storage Sense" in Settings>System>Storage. This means that R's tempdir() can easily disappear unless you put a file in it. I think an empty file will do the trick. Perhaps R could do this when it makes a new tempdir(). (When the file gets old, 30 days?, it will be removed and then the empty directory holding it will be removed, but that is better than the current s...
2017 Apr 26
0
tempdir() may be deleted during long-running R session
...net> >>>>>>> on Tue, 25 Apr 2017 21:13:59 -0700 writes: >> >> > On Tue, Apr 25, 2017 at 02:41:58PM +0000, Cook, Malcolm wrote: >> >> Might this combination serve the purpose: >> >> * R session keeps an open handle on the tempdir it creates, >> >> * whatever tempdir harvesting cron job the user has be made >> sensitive enough not to delete open files (including open directories) >> >> I also agree that the above would be ideal - if possible. >> >> > Good suggestion but d...
2005 Jul 08
4
Sweave resource leak: leftover temp files (PR#7998)
Harold, I've taken a closer look at your example and I'd call this an Sweave bug. It creates tempfiles each time you run it, and doesn't delete them at the end. For example: > list.files(tempdir()) character(0) > testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "utils") > Sweave(testfile, out="junk.tex") Writing to file junk.tex Processing code chunks ... 1 : print term verbatim 2 : term hide 3 : echo print term verba...
2017 Nov 09
2
check does not check that package examples remove tempdir()
I think recreating tempdir() is ok in an emergency situation, but package code should not be removing tempdir() - it may contain important information. Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Nov 8, 2017 at 4:55 PM, Henrik Bengtsson <henrik.bengtsson at gmail.com > wrote: > Related to this problem -...
2008 Aug 29
2
Security issue with javareconf script (PR#12636)
...quot;$JAVAC"; then javac_works='not functional' - rm -rf /tmp/A.java /tmp/A.class - echo "public class A { }" > /tmp/A.java - if test -e /tmp/A.java; then - if "${JAVAC}" /tmp/A.java >/dev/null; then - if test -e /tmp/A.class; then + tempdir=`mktemp -d` + echo "public class A { }" > ${tempdir}/A.java + if test -e ${tempdir}/A.java; then + if "${JAVAC}" ${tempdir}/A.java >/dev/null; then + if test -e ${tempdir}/A.class; then javac_works=yes fi fi fi - rm -rf...
2017 Apr 25
3
tempdir() may be deleted during long-running R session
...I've found it is not at all hard to add an option >> which checks the existence and if the directory is no >> longer "valid", tries to recreate it (and if it fails >> doing that it calls the famous R_Suicide(), as it does >> when R starts up and tempdir() cannot be initialized >> correctly). > Perhaps this can also fix the problem with mcparallel > deleting the tempdir() when one of its children dies: > file.exists(tempdir()) #TRUE > parallel::mcparallel(q('no')) > file.exists(tempdir()) #...
2014 Jul 23
2
[LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
Hi, all. I noticed recently that llvm::sys::fs::createTemporaryFile does not use llvm::sys::path::system_temp_directory, instead relying on its platform-specific helper TempFile. Is there any reason for this disparity? The two implementations are not in sync, either: - TempDir honors TMPDIR, TMP, TEMP, TEMPDIR, and a configuration-settable P_tmpdir on Unix-y systems. system_temp_directory just honors TMPDIR. - TempDir calls ::GetTempPathW on Windows, while system_temp_directory honors TEMP and falls back to C:\\TEMP. - system_temp_directory prefers DARWIN_USER_TEMP_DIR o...
2017 Apr 26
1
tempdir() may be deleted during long-running R session
...>>>>> on Tue, 25 Apr 2017 21:13:59 -0700 writes: >>> >>> > On Tue, Apr 25, 2017 at 02:41:58PM +0000, Cook, Malcolm wrote: >>> >> Might this combination serve the purpose: >>> >> * R session keeps an open handle on the tempdir it creates, >>> >> * whatever tempdir harvesting cron job the user has be made >>> sensitive enough not to delete open files (including open directories) >>> >>> I also agree that the above would be ideal - if possible. >>> >>> &gt...
2017 Apr 25
0
tempdir() may be deleted during long-running R session
Chiming in late on this thread... > > | Are there any packages which > > | would break if a call to 'tempdir' automatically recreated this > > | directory? (Or would it be too much of a performance hit to have > > | 'tempdir' check and even just issue a warning when the directory is > > | found not to exist?) > > > | Should we have a timer which...
2005 Jul 08
2
Sweave resource leak: leftover temp files (PR#7999)
...} If I follow correctly, I would need to place these commands inside the loop as follows: list <- unique(wide$stuid) master = "master.tex" for (i in list){ tmp1 <- subset(wide, stuid==i) tmp2 <- paste(i, "tex", sep=".") keep <- list.files(tempdir(), full=TRUE) # keep previous temp files Sweave("fam_template.Rnw", output=tmp2) file.append("fam_master.tex", tmp2) temps <- list.files(tempdir(), full=TRUE) unlink(temps[!(temps %in% keep)]) # delete the newly created ones } Thank you for taking the time...
2004 Jun 28
2
Unable to start R due to error with tempdir()
Hello, I run R 1.9.1 on a Windows XP machine. In the last week, I have started to get the following error message (about 85% of the time) when I attempt to start R: "Fatal error: cannot find unused tempdir name" I get this message whether I attempt to start R in interactive or batch mode. Looking at the help-manual description of tempdir didn't provide me with any obvious clues to the problem. I also tried uninstalling and reinstalling R 1.9.1, but this was of no help to the problem either...