similar to: Fast way to load multiple files

Displaying 20 results from an estimated 20000 matches similar to: "Fast way to load multiple files"

2009 Dec 30
1
seg-fault... but on what
I got the following after running succesfully through this loop 28 million times... the loop opens text files in a directory and inserts line by line into a database... *** caught segfault *** address 0xc0000010, cause 'memory not mapped' Traceback: 1: .getGeneric(f, where, package) 2: getGeneric("coerce", where = where) 3: as(obj, "integer") 4:
2004 Apr 21
2
Resizing a ListCtrl
Hi Guys, I''m having serious troubles resizing a dialog with a ListCtrl. The ctrl will not resize horizontally no matter what I''m doing. I''ve attached a sample code below. Any help will be greatly appreciated, as I really like wxRuby :) I''ve also tried to copy from the example from listtest.rbw, but that also doesn''t seem to work. Another thing
2012 Jun 18
1
Changing many csv files using apply?
Dear all, I have many csv files whose contents I want to change a bit en masse. So far, I've written code that can change them in a for loop, like so: # Subset of files in the folder I want to change subset = "somestring" # Retrieve list of files to change filelist=list.files() filelist = filelist[grep(subset, filelist)] for(i in 1:length(filelist)){ setwd(readdir)
2009 Feb 19
2
read.table : how to condition on error while opening file?
Hi, I'm using read.table in a loop, to read in multiple files. The problem is that when a file is missing there is an error message and the loop is broken; what I'd like to do is to test for the error and simply do "next" instead of breaking the loop. Anybody knows how to do that? Example: filelist <- c("file1.txt", "file2.txt",
2003 Nov 22
3
1.8.1 behavior change?
In <R 1.8.1 the following fragment worked properly, now (1.8.1) it creates the following warning/error: Any advice appreciated. stt <- data.frame() # load all datasets into a dataframe for (ds in 1:n) { stt[ds] <- as.matrix(read.table(fileList[ds])) } -- > stt <- data.frame() > # load all datasets into a dataframe > for (ds in 1:n) { + stt[ds] <-
2003 Feb 12
2
Filelist caching
Hi, I've noticed every time someone does an rsync-request on my ftp-site (which also provides rsync as mirror method), rsyncd creates a filelist. This is a quite IO and CPU intensive procedure, especially for things mirrors like FreeBSD with lots of little files. I was wondering... is there a way to cache that filelist? Our mirrors are updated once, or twice a day, it could speed up
2009 Sep 26
1
Problem with downloading workspace file from a web address
Dear All, To load a previously saved workspace, one can do the following: load("/path/to/the/saved/workspace/file") However, if the path to the saved workspace file is a web address, one gets the following error: ?Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection In addition: Warning message: In readChar(con, 5L, useBytes = TRUE) : cannot open compressed file
2010 Feb 19
3
Plotting multiple table automatically
Hi All, I have a slight issue getting R to plot a series of tables automatically. Essentially I have a series of tables that I wish to plot. They are named on_2, on_3 etc. based on the file name when they were read in. I have filelist <- list.files() to give me list of the table names. I wish to plot each table, so I was thinking along some kind of for loop as below: for (i in 1:Number_Files)
2009 Mar 23
2
Looping of read.table and assignment
Dear all, I am trying to read in and assign data from 50 tables in an automated fashion. I have the following code, which I created with the help of textbooks and the internet, but it only seems to read in the final data file over and over again. For example, when I type:> table_1951 I get the same values in the table as when I type> table_2000 despite the values in the source tables
2009 Mar 27
2
Assignment to variables fails to loop
Dear all, I think I'm nearly there in writing R code which will read in files with two variable parts to the file name and then assigning these file names to objects, which also have two variable parts. I have got the code running without encountering errors, however, I receive 50+ of the same warnings: 1: In assign(paste("Fekete_", index$year, index$month, sep = ""),
2024 Nov 06
1
Using multiple dat files
"It seems therefore that there is no other way than read in individually > 100 weather tables using read.tables., right? Using file.choose() doesn't change the work." Yes. With that many files, file.choose() does not make sense. However, I still do not understand what is the problem with using lapply() on the character vector of file names with read.table() as you did in your
2007 Dec 26
1
scope of plugns
After more than one hour of countless tries, I ask myself a simple question : On what items are plugins supposed to execute ? I''ve tried to create a filelist plugin which, for a page, displays all file in the same directory (a rather old school view of website, where each directory contains an entry point). But, whatever I try, my plugin code is never invoked, and my page content is never
2011 Apr 23
1
rake spec fails where rake spec:(models|controllers|views) pass
I''m still trying to work into Ruby 1.9.2 and am now experiencing something that makes no sense to me. Using rspec 1.3.2 and rspec-rails 1.3.4 with rails 2.3.11 on ruby 1.9.2-p180, when I $ rake spec:models they all pass. When I $ rake spec:controllers they all pass. When I $ rake spec:views they all pass. But when I $ rake spec I get <path to
2009 Sep 23
4
save txt file
Hi, I have 2 questions: Question 1: I define 2 variables: "a", "b": > a<-rbinom(4,10,0.8) output: [1] 9 7 8 8 > b<-rbinom(2,6,0.7) output: [1] 4 5 if I write: > write.table(a, file = "filename", etc. etc. .... ) it save only the values of variable "a". There is a way to save in a .txt file the values "a" and "b" as
2009 Dec 28
1
accessing members of a data.frame
I have the following code fileList <-list.files(path = ".", pattern = "[^a-z].txt$", all.files = FALSE, full.names = FALSE, recursive = FALSE, ignore.case = FALSE) for (x in 1:length(fileList)){ fileLines <- data.frame(read.table(fileList[x])) print(string) } the lines of the file all have the following format... AB,20091224,156,156,154,154,55,1198 Can I access
2005 May 23
3
filelist caching optimization proposal
Hi, As a gentoo-user i frequently run the emerge sync command, which in turn does a rsync with the mainserver. The 'problem' is that the portage directory tree contains about 19.000 directories and 96.000 files. So building the filelist takes a pretty long time, because of the many disk accesses that are neccesary. On the server side the disk-io problem is probably less worse since
2003 Sep 12
1
Using the system command
Hello, I am currently taking a statistics course and we are to do a project producing a graph using multiple input files. In R, I'm trying to build a filelist based on a pattern. For some reason, if I do the command interactively and not assign it to an array variable I get what I thought I should, but if I do this inside my R program it chops off some file names and thinks there are two.
2007 May 09
1
Including data when building an R package in windows
I've done this before, but when I tried the same thing this time, it didn't work. I'm using R 2.4.1 on windows. I have 6 data frames that I want to include in a package I am building. Instead of making users issue six different "data(...)" commands, I want to wrap them all up in one file so that users issue one "data(...)" command and have access to all six data
2023 Dec 21
1
rsync over ssh fails with --files-from
Hi, On Wed, Dec 20, 2023 at 11:03?AM Kevin Korb via rsync <rsync at lists.samba.org> wrote: > What is the error? I assume you know that with that syntax the > filelist.txt is local rather than remote. > Yes, I do know it refers to the list of local files. There is no error - it just hangs indefinitely until some timeout period. This is what it looks like on the remote side: $
2024 Nov 06
3
Using multiple dat files
Dear community To import multiple .dat weather files I am using list.files(). I intend to use the R package ?ClimInd? to calculate different agroclimatic indicators. Question: Is there another solution to import multiple .dat files so that I can select elements from the list, e.g. one specific weather file (example AAR_DailyWeather)? # Import multiple .dat files weather data filelist <-