search for: nfiles

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

Did you mean: files
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, file...
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
Commit-ID: acd0936c5f8b4f5d94065ca46714d17e6a882cf2 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=acd0936c5f8b4f5d94065ca46714d17e6a882cf2 Author: Harald van Dijk <harald at gigawatt.nl> AuthorDate: Thu, 8 Mar 2018 08:37:11 +0100 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Fri, 25 Jan 2019 02:57:21 +0000 [klibc] parser: use pgetc_eatbnl()
2020 Mar 28
0
[klibc:update-dash] dash: parser: use pgetc_eatbnl() in more places
Commit-ID: a4659bfa776f24f790c3ec071c5c9ef9459cdb70 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=a4659bfa776f24f790c3ec071c5c9ef9459cdb70 Author: Harald van Dijk <harald at gigawatt.nl> AuthorDate: Thu, 8 Mar 2018 08:37:11 +0100 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:54 +0000 [klibc] dash: parser: use
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 loadhistory and savehistory with the same problems. The syntax guide
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 o...
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
Sorry, I send the mail to devel group by mistake.. Any help about the below issue? On Tue, Aug 29, 2017 at 3:00 PM, Serkan ?oban <cobanserkan at gmail.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
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
hello hpa, please pull for the dash update git pull git://brane.itp.tuwien.ac.at/~mattems/klibc.git maks with this changes: Alexey Gladkov (1): Check return code for getgroups and fwrite Herbert Xu (17): Remove unnecessary truncation in _STPUTC Always call conv_escape_str in echocmd Fix \c spillage across echo commands Release 0.5.3. Make eval with empty
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 + fi...
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
What is the status of support for directx2 apps? The "failed to create surface" error in MissionForce: Cyberstorm seems to have persisted forever... I have a +relay log of the said game launch session, (if somebody wants it, i can provide the full version) -- it appears that the graphics backend call pair which causes trouble is to winex11.drv.GetDCEx()/
2011 Feb 19
1
Accessing Package NEWS (NEWS.Rd)
Okay. So, after having spent quite some time never really tracking down why my package NEWS files were unacceptable to readNEWS(), I noticed that there was recent (to me anyway) development that allowed the NEWS to be done as an Rd file. Sweet! A more standard format... I converted a NEWS file in one of my unreleased packages to Rd format. checkNEWS() gave it a thumbs up. But then it went south.