search for: 05d

Displaying 20 results from an estimated 30 matches for "05d".

Did you mean: 05
2008 Feb 21
2
jpeg() creating empty files with qplot() in a loop
Hello all, I'm stuck with a strange issue with writing jpegs of plots to a folder in a loop. This works: for (step in 1:length(steps)) { jpeg(filename=paste("frame_",sprintf("%05d",step),".jpg",sep="")) plot(steps[[step]]) dev.off() } But if I use qplot to generate the plot (which is my aim): for (step in 1:length(steps)) { jpeg(filename=paste("frame_",sprintf("%05d",step),".jpg",sep="")) qplot(x, y, da...
2006 Dec 07
8
crash on repeated search
.....rw_ferret_test.rb:20: [BUG] rb_gc_mark(): unknown data type 0x28(0x402ba3a4) non object ruby 1.8.2 (2005-04-11) [i386-linux] Aborted Here''s the code: require ''rubygems'' require ''ferret'' include Ferret def phrase(num) "a_fairly_long_phrase%05d"%num end LOOPS=(ARGV[1]||40).to_i _fields = Index::FieldInfos.new _fields.add_field :phrase, :term_vector => :no, :store => :no, :index => :untokenized $phrases=I.new(:field_infos=>_fields) phrase(0).upto(phrase(LOOPS)){|phrase| $phrases << {:phrase=> phrase} } @phras...
2007 Nov 25
1
Package Building under Windows with MikTeX 2.6
...e\perl/R/Utils.pm line 73 I looked at the path and Utils.pm shows: ... ### * R_tempfile sub R_tempfile { my $pat = "Rutils"; $pat = $_[0] if $_[0]; R::Vars::error("TMPDIR"); my $retval = file_path($R::Vars::TMPDIR, $pat . $$ . sprintf("%05d", rand(10**5))); my $n=0; while(-e $retval) { # was -f, but want to be able to create such a file $retval = file_path($R::Vars::TMPDIR, $pat . $$ . sprintf("%05d", rand(10**5))); croak "Cannot find unused name for temporary file"...
2012 Feb 23
3
I'm sure I'm missing something with formatC() or sprintf()
I have a four-digit string I want to convert to five digits. Take the following frame: zip 2108 60321 60321 22030 91910 I need row 1 to read '02108'. This forum directed me to formatC previously (thanks!) That usually works but, for some reason, it's not in this instance. Neither of the syntaxes below change '2108' to '02108.' The values in cand_receipts[,1] are of
2005 Nov 24
1
Windows R CMD build <pkg> leftovers
A command R CMD build <pkg> that fails, e.g., because of C code compilation errors, leaves a directory %TMPDIR%/Rinst.xxx containing the file R.css. Although R CMD INSTALL --build cleans up after itself, build does not. A fix is below. Also, build.in references Rcmd.exe, which I thought was no longer necessary? Index: build.in
2008 Feb 17
6
How to take down a system to the point of requiring a newfs with one line of C (userland)
...e an unbootable system on reboot. How to repeat the problem: Compile and run the following as instructed: #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { int i; char buf[1024]; bzero(buf, 1024); for(i = 0; i < 10000; i++) { sprintf(buf, "touch %s%05d\n", argv[1], i); system((const char *)buf);} return(0);} /* pass a top-level mountpoint directory name of a mounted filesystem, with a trailing slash to the above as argv[1], and run. This will create 10,000 zero-length files in the specified directory. umount that filesystem. perform a...
2008 Feb 17
6
How to take down a system to the point of requiring a newfs with one line of C (userland)
...e an unbootable system on reboot. How to repeat the problem: Compile and run the following as instructed: #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { int i; char buf[1024]; bzero(buf, 1024); for(i = 0; i < 10000; i++) { sprintf(buf, "touch %s%05d\n", argv[1], i); system((const char *)buf);} return(0);} /* pass a top-level mountpoint directory name of a mounted filesystem, with a trailing slash to the above as argv[1], and run. This will create 10,000 zero-length files in the specified directory. umount that filesystem. perform a...
2011 Oct 06
1
Issue with read.csv treatment of numerics enclosed in quotes (and a confession)
Dear Help-Rs,   I've been dealing with this problem for some time, using a work-around to deal with it. It's time for me to come clean with my ineptitude and seek a what has got to be a more streamlined solution from the Help-Rverse.   I regularly import delimited text data that contains numerics enclosed in quotes (e.g., "00765288071").  Thing is, for some of these data, I need
2006 Oct 06
2
Extreme slowdown with named vectors. A bug?
...or itself, but the outcome is certainly not wanted. for (n in 58950:58970) { cat("n=", n, "\n", sep=""); # Clean up first rm(names, x, y); gc(); # Create a named vector of length n # Try with format "%5d" and it works names <- sprintf("%05d", 1:n); x <- seq(along=names); names(x) <- names; # Extract the first k elements k <- 36422; t0 <- system.time({ y <- x[names[1:k]]; }) str(y); # But with one more it takes # for ever when n >= 58960 k <- k + 1; t1 <- system.time({ y <...
2006 Apr 25
2
NFS
I've finally managed to run Dovecot without errors in two computers with maildir and indexes stored in NFS. I added a page to wiki about this: http://wiki.dovecot.org/NFS Suggestions how to keep attribute cache enabled but to allow Dovecot to specifically request not to use a cached value (when it's important) would be welcome. -------------- next part -------------- A non-text
2003 Apr 22
3
zip.unpack() crashes R (PR#2818)
...es R (every time!) N <- 1003 # Create an directory with N files dest <- "dir" dir.create(dest) files <- list.files(dest) nMissing <- (N - length(files)) if (nMissing > 0) { idx <- (length(files)+1):N filename <- sapply(as.integer(idx), FUN=sprintf, fmt="file%05d.txt") pathname <- paste(dest, filename, sep="/") for (k in seq(pathname)) cat(file=pathname[k], 0) } # Create a zip archive of the directory zipper <- "C:/cygwin/bin/jar -cfM" cmd <- paste(zipper, " ", dest, ".zip", " ", dest,...
2008 Oct 21
1
Paddding an integer with zeros
Hello List, Can anybody point me to a number-to-string formatting function? I need to convert, say, 12 to 00012. I tried format() but its too stubborn: it seems to only pad with spaces. Thank you, Your culpritNr1 -- View this message in context: http://www.nabble.com/Paddding-an-integer-with-zeros-tp20095300p20095300.html Sent from the R help mailing list archive at Nabble.com.
2011 Apr 04
3
add zero in front of numbers
Dear R users, I need to add 0 in front of a series of numbers, e.g. 1->001, 19->019, Is there a fast way of doing that? Many thanks yan [[alternative HTML version deleted]]
2008 May 12
5
Format integer
Hi, What's one way to convert an integer to a string with preceding 0's? such that '13' becomes '00000000013' to be put into a string I've tried formatC, but they removes all the zeros and replace it with blanks Thanks -- Regards, Anh Tran [[alternative HTML version deleted]]
2006 Oct 07
0
Extreme slowdown with named vectors. A bug? (PR#9280)
...> > for (n in 58950:58970) { > cat("n=", n, "\n", sep=""); > > # Clean up first > rm(names, x, y); gc(); > > # Create a named vector of length n > # Try with format "%5d" and it works > names <- sprintf("%05d", 1:n); > x <- seq(along=names); > names(x) <- names; > > # Extract the first k elements > k <- 36422; > t0 <- system.time({ > y <- x[names[1:k]]; > }) > str(y); > > # But with one more it takes > # for ever when n >...
2008 Apr 25
1
Elephant Dreams test video
I recently found these sample videos for codec/decode testing and was wondering if someone can give me more info on these files and how to use them. http://media.xiph.org/ED/ First I would like to know what is the frame rate needed for the ED-360 and ED-1080 to be sync with the audio samples?? Second what tool (specific command) can I use to convert this sequence of PNG files to raw YUV and to
2013 May 08
0
subsetting by name is very slow when subscript contains a lot of "invalid" names
Hi, Note sure why but subsetting by name is *very* slow when the character vector used as subscript contains a lot of "invalid" names: x <- c(A=10L, B=20L, C=30L) subscript <- c(LETTERS[1:3], sprintf("ID%05d", 1:150000)) > system.time(y1 <- x[subscript]) user system elapsed 111.991 0.000 112.230 Since subsetting by name is basically equivalent to i <- match(subscript, names(x)) x[i] it's quite surprising that the former is more than 10 thousand times slower th...
2010 Mar 02
1
Output to sequentially numbered files... also, ideas for running R on Xgrid
Hello, I have some code to run on an XGrid cluster. Currently the code is written as a single, large job... this is no good for trying to run in parallel. To break it up I have basically taken out the highest level for-loop and am planning on batch-running many jobs, each one representing an instance of the removed loop. However, when it comes to output I am stuck. Previously the output was
2003 Apr 22
0
zip.unpack() crashes R (PR#2820)
...es R (every time!) N <- 1003 # Create an directory with N files dest <- "dir" dir.create(dest) files <- list.files(dest) nMissing <- (N - length(files)) if (nMissing > 0) { idx <- (length(files)+1):N filename <- sapply(as.integer(idx), FUN=sprintf, fmt="file%05d.txt") pathname <- paste(dest, filename, sep="/") for (k in seq(pathname)) cat(file=pathname[k], 0) } # Create a zip archive of the directory zipper <- "C:/cygwin/bin/jar -cfM" cmd <- paste(zipper, " ", dest, ".zip", " ", dest,...
2003 Apr 22
0
zip.unpack() crashes R (PR#2821)
...es R (every time!) N <- 1003 # Create an directory with N files dest <- "dir" dir.create(dest) files <- list.files(dest) nMissing <- (N - length(files)) if (nMissing > 0) { idx <- (length(files)+1):N filename <- sapply(as.integer(idx), FUN=sprintf, fmt="file%05d.txt") pathname <- paste(dest, filename, sep="/") for (k in seq(pathname)) cat(file=pathname[k], 0) } # Create a zip archive of the directory zipper <- "C:/cygwin/bin/jar -cfM" cmd <- paste(zipper, " ", dest, ".zip", " ", dest,...