search for: nfile

Displaying 20 results from an estimated 44 matches for "nfile".

Did you mean: file
2009 Sep 30
1
Read header csv file
...e text file, year and month apart of some other variables, something like this: Year: 2004 Month: January R1: 0.98 Pvalue: 0.03 ... Year: 2004 Month: February R1:0.78 Pvalue:0.12 ... I've seen that I can use order sink() and cat(), so I would put those orders in my code, like this: nfiles<- length(dir("directory where my files are")) #Count file number for(year in 1:nfiles) #Read first file { filename<-dir()[[year]] #take first file and read filename, so if year is 1, then filename will be 2004, is year is 2, fil...
2006 Sep 04
9
RMagick Image.read doesn't... read!
I''ve a controller with an action that should read an image file from a specified path and do some operations on it (mainly, resize it). I try to read the image through this line of code (the image is placed in applicationname\public\images. img = Magick::Image.read("world.jpg") The fact is that whenever I open that page, the browser freezes and I have to restart my
2009 Sep 23
1
Variable as a filename
Hi R community, I have a question. I have 5 files in a directory. Each file has a year as a name (file 1 ->2004, file 2-> 2005, ...). I want to build a for loop where I call first file, do some calculations, go to second file, do some calculations, etc. Somethin like this: year<-2003 nfiles <- length(dir()) for( year in 2003:nfiles) {clima<-read.csv2([year]".csv", nrows=10) } As you see, file name has to change when I read a year, in other words, if a read 2004 in variable year, I need to select file 2004. Then I read 2005 in variable year, and then I R have...
2019 Jan 25
0
[klibc:update-dash] parser: use pgetc_eatbnl() in more places
..., out); if (!--arinest) syntax = prevsyntax; @@ -1025,7 +1017,7 @@ quotemark: USTPUTC(c, out); } } - c = pgetc(); + c = syntax == SQSYNTAX ? pgetc() : pgetc_eatbnl(); } } endword: @@ -1132,7 +1124,7 @@ parseredir: { np = (union node *)stalloc(sizeof (struct nfile)); if (c == '>') { np->nfile.fd = 1; - c = pgetc(); + c = pgetc_eatbnl(); if (c == '>') np->type = NAPPEND; else if (c == '|') @@ -1145,7 +1137,7 @@ parseredir: { } } else { /* c == '<' */ np->nfile.fd = 0; - switch (c = pg...
2020 Mar 28
0
[klibc:update-dash] dash: parser: use pgetc_eatbnl() in more places
..., out); if (!--arinest) syntax = prevsyntax; @@ -1025,7 +1017,7 @@ quotemark: USTPUTC(c, out); } } - c = pgetc(); + c = syntax == SQSYNTAX ? pgetc() : pgetc_eatbnl(); } } endword: @@ -1132,7 +1124,7 @@ parseredir: { np = (union node *)stalloc(sizeof (struct nfile)); if (c == '>') { np->nfile.fd = 1; - c = pgetc(); + c = pgetc_eatbnl(); if (c == '>') np->type = NAPPEND; else if (c == '|') @@ -1145,7 +1137,7 @@ parseredir: { } } else { /* c == '<' */ np->nfile.fd = 0; - switch (c = pg...
2009 Nov 17
0
Re place NA values in matrix with the value of Nearest Neighbour
...mate data for coastal areas from 5km grid data for specific xy coordinates that relates to individual study sites (SQ). Code so far: setwd("/Users/roblewis/Documents/PhD/Climate Data") fnamestemp=read.table("Path_Directory_Maxt") fnames=paste(fnamestemp[,1],fnamestemp[,2]) nfiles = length(fnames) xy=as.matrix(read.table("xy_.txt")) sq<-xy[,1] x<-xy[,2] y<-xy[,3] xy<-cbind(x,y) xy<-xy/5000 xy<- xy+41 xy<- cbind(xy[,2],xy[,1]) nfiles=2 for( imap in 2:nfiles) { print(fnames[imap]) x = as.matrix(read.table(fnames[imap],skip=6))...
2000 Apr 04
0
Obscure bug....?
...full.names=T) if(! quiet) { print(noquote("Files found:")) print(noquote(filearr)) } tmp <- summarymap(filearr[1], ...) h <- tmp$histogram sm <- tmp$mapmean sv <- tmp$mapvar mmin <- tmp$mapmin mmax <- tmp$mapmax seed <- tmp$mapseed nfiles <- length(filearr) for (i in 2:nfiles) # Supposedly, reduced efficiency by using a for { # loop is neglible compared to file access time. print(c(test=9,hb=length(h$breaks), hc=length(h$counts))) tmp <- summarymap(filearr[i], ...) print(c(test=4,hb=length(h...
2010 Dec 09
3
How many files & directories in a ZFS filesystem?
Looking for a little help, please. A contact from Oracle (Sun) suggested I pose the question to this email. We''re using ZFS on Solaris 10 in an application where there are so many directory-subdirectory layers, and a lot of small files (~1-2Kb) that we ran out of inodes (over 30 million!). So, the zfs question is, how can we see how many files & directories have been created in
2004 Nov 02
4
Loadhistory problems
History files saved using nFile Save History do not open when using File Load History. I notice that when they are saved they do not seem to have a file extension and there is no option to chose an extension. Is this a problem. Other than this it seems so simple that I can't see what the problem is. I've tried using...
2018 May 25
1
how to make the code more efficient using lapply
...n the loop. For example, list.files() was called twice inside the loop, which is unnecessary, and will definitely slow the loop down (though probably not by much). Call it outside the loop, save the results in a vector, and use the vector inside the loop. Here's another way (also untested). infiles <- list.files() nfiles <- length(infiles) ## read the first file dfall <- read_xlsx(infiles[1], sheet=1, range=cell_cols(c(1,30,38:42))) dfall <- dfall[dfall$Id %in% c("geneA","geneB","geneC") , ] ## I'm going to assume the colnames are all the same...
2004 Sep 22
1
Compile error in 2004-09-21 R 1.9.1 Patched
...ntax error before '/' token make[3]: *** [dounzip.o] Error 1 In reviewing the source file, there appears to be an errant '/' on line 144. A code snippet follows. Note the '/' on the third line below, just before the closing brace: #endif } / } else { for (i = 0; i < nfiles; i++) { Removal of the character enables successful compilation. I reviewed the tarballs for the past few days and this appears to be new as of today. I also checked today's 2.0.0 beta tarball and the errant character is not present in that version. Best regards, Marc Schwartz
2017 Aug 29
1
glfsheal-v0.log Too many open files
...ail.com> wrote: > Hi, > > When I run gluster v heal v0 info, it gives "v0: Not able to fetch > volfile from glusterd" error message. > I see too many open files errors in glfsheal-v0.log file. How can I > increase open file limit for glfsheal? > I already increased nfile limit in /etc/init.d/glusterd and > /etc/init.d/gluserfsd but it did not help. > > Any suggestions?
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
...t flags) } sv = NULL; INTOFF; - if (flags & REDIR_PUSH) { + if (likely(flags & REDIR_PUSH)) { struct redirtab *q; q = ckmalloc(sizeof (struct redirtab)); q->next = redirlist; @@ -132,12 +132,11 @@ redirect(union node *redir, int flags) } n = redir; do { - fd = n->nfile.fd; - if ((n->nfile.type == NTOFD || n->nfile.type == NFROMFD) && - n->ndup.dupfd == fd) - continue; /* redirect from/to same file descriptor */ - newfd = openredirect(n); + if (newfd < -1) + continue; + + fd = n->nfile.fd; if (sv) { p = &sv->re...
2014 Mar 21
0
[PATCH RFC V2 4/4] tools: virtio: add a top-like utility for displaying vhost satistics
...(self, _fields): + self._fields = _fields + cpure = r'cpu([0-9]+)' + self.cpus = [int(re.match(cpure, x).group(1)) + for x in os.listdir('/sys/devices/system/cpu') + if re.match(cpure, x)] + import resource + nfiles = len(self.cpus) * 1000 + resource.setrlimit(resource.RLIMIT_NOFILE, (nfiles, nfiles)) + events = [] + self.group_leaders = [] + for cpu in self.cpus: + group = Group(cpu) + for name in _fields: + tracepoint = name + f...
2018 May 25
0
how to make the code more efficient using lapply
Hi Stephen, I am not sure that the "for loop" is the source of slowness. You seem to be doing a lot of unnecessary work each time through the loop. e.g. no need to check if it's the last file, just move that section outside of the loop. It will be executed when the loop finishes. As it is you are calling list.files() each time through the loop which could be slow. In any case
2012 Jan 17
2
How to loop on file names
Dear all, I need to do the same procedure on several files. But I don't know how to refer to the file name. Here is an example of what I am trying to do. List of files: file1(A,B,C, D1...Dn), file2(A,B,C,E1,...,En), file3(A,B,C,F1,...,Fn) Procedure I want to apply on each file: dft <- melt(df,id=c('A','B','C')) dft$X <- substr(dft$variable,1,3) dft$Y <-
2012 Sep 26
3
Reading multiple files
Hi, I have 35 data files for reading. I would like get a program for performing reading of 35 files at once. All are of the type: Dados1.raw, Dados2.raw and so on. If the files have the same number of columns, I can read with the following commands: rm(list=ls()) filenames = list.files(path="~/Silvano/Arq", pattern="Dados+.*raw") names = substr(filenames, 1, 7) for(i in
2018 May 25
2
how to make the code more efficient using lapply
Dear All, I have a following for-loop code which is basically intended to read in many excel files (each file has many columns and rows) in a directory and extract the some rows and columns out of each file and then combine them together into a dataframe. I use for loop which can do the work but quite slow. How to make it faster using lapply function ? Thanks in advance! temp.df<-c() #
2007 Jan 06
1
ancient directx version support
...7ea15ed0 0009:Ret winex11.drv.Beep() retval=00000000 ret=7ee5b4f1 0009:Ret user32.MessageBeep() retval=00000001 ret=0047d605 0009:Call user32.MessageBoxA(00010024,0032f11c "GFXCDSSurface::create: Failed to c reate a surface.\r\n\r\nProgram: CyberStorm\r\nVersion: 1.10A , Win95 Dec 13 1996\ r\nFile: graph\\gfx\\g_cds.c (#114)\r\n\r\n--------------------------------------- ---------------------------------------------------------------\r\nThis problem pr .... regards, Samium Gromoff
2011 Feb 19
1
Accessing Package NEWS (NEWS.Rd)
.../MyApp/inst/NEWS.Rd") [1] TRUE > news(package="MyApp") Nothing. Debugging news() itself left me wondering. The first thing checked for was 'inst/NEWS.Rd' - once I install the package, that would never exist though, right? Should tools:::.build_news_db() instead use: nfile <- file.path(dir, c("NEWS.Rd", file.path("inst", "NEWS.Rd"))) On the slim chance it should, I modified the path to my source folder's copy and continued debugging into tools:::.build_news_db_from_package_NEWS_Rd(). debug: ind <- grepl(re_v, nms, ignore.ca...