search for: csvfiles

Displaying 17 results from an estimated 17 matches for "csvfiles".

Did you mean: csfiles
2011 Aug 18
3
Speeding nested loops up
Hi I'm trying to speed my loop up. Any Suggestions?? At the moment it takes a few days to run. THE CODE --------------------------------------------------------------------------------------------------- for(i in 1:11) { for (j in 3:12) { for (k in 1:273107) { y[k,1] <- x[i,j,k] print(y) Rainfall_dataset <- read.table("1km_grid_nzmg.csv",
2007 Jul 08
1
Writing Excel (.xls) files on non-Windows OSs using Perl
...y have similar requirements. Please note that I am providing this 'as is' and don't have any plans to substantively modify or enhance the code. It does what I need it to do. Feel free to modify for other needs as may be required. The basic calling schema is: WriteXLS.pl [--CSVpath] [--CSVfiles] ExcelFileName Where: CSVpath = Path to the csv files created in R, typically done using write.table() CSVfiles = globbed file name specification (ie. *.csv) ExcelFileName = FULL name of Excel .xls file to create When the Excel file is created, a new worksheet (tab) will be created...
2007 Jun 21
2
segfault during cbind
The following code results in a seg fault. > sessionInfo() R version 2.6.0 Under development (unstable) (2007-06-21 r42013) x86_64-unknown-linux-gnu locale: LC_CTYPE=en_US;LC_NUMERIC=C;LC_TIME=en_US;LC_COLLATE=en_US;LC_MONETARY=en_US;LC_MESSAGES=en_US;LC_PAPER=en_US;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US;LC_IDENTIFICATION=C attached base packages: [1] stats graphics
2012 Jul 25
3
ff package: reading selected columns from csv
*Dear R users, Ive just started using the ff package. There is a csv file (~4Gb) with 7 columns and 6e+7 rows. I want to read only column from the file, skipping the first 100 rows. Below Ive provided different outcomes, which will clarify my problem * > sessionInfo() R version 2.14.2 (2012-02-29) Platform: x86_64-pc-mingw32/x64 (64-bit) locale: ... attached base packages: [1] tools
2014 Jan 27
4
Perl Search::Xapian
Hi, Trying to learn Search::Xapian and be better at perl at the same time, I'm stuck, at the DB_CREATE_OR_OPEN error. Perl says this: ~/dev/sandbox/Xapian-perl$ ./Index1-Xap.pl 100-objects-v1.csv db "db" is not exported by the Search::Xapian module Can't continue after import errors at ./Index1-Xap.pl line 7. BEGIN failed--compilation aborted at ./Index1-Xap.pl line 7. What I
2012 Sep 14
1
Any way to get read.table.ffdf() (in the ff package) to pass colClasses or comment.char parameters through to read.fwf() ?
Hi everyone, my apologies if I'm overlooking something obvious in the documentation. I'm relatively inexperienced with the (awesome) ff package. My goal is to use the read.table.ffdf() function to call the read.fwf() function and pass through the colClasses and comment.char arguments. The code below shows exactly what doesn't work for me. If the colClasses and comment.char
2006 Feb 06
4
Memory Issue while looping through CSV file
I have a site on a shared host at TextDrive. I have an import process that imports a CSV file into the database using a ruby script executed using script/runner. TextDrive has a memory limit which I am hitting and the process gets killed. I get through to about 400 records before it dies. I guess each time I instantate a new object for each record I am using more memory but thought I was using
2010 Oct 21
3
importing csv gets me all 16,000 columns with "NA"
I'm new to R. I have a mac (OS10.6). I have converted an Excel file to a csv to import into R. I have used many methods to import the file, most do not work, the best so far is: filename <- read.csv(/Users/Desktop/csvfile.csv", header=T, sep=","). I have also tried taking out the header and sep lines and it still imports fine. Regardless of what I do, it always brings in
2011 Aug 15
5
Labelling all variables at once (using Hmisc label)
I have a dataset and a list of labels. I simply want to apply the labels to the variables, all at once. The only way I was able to do it was using a loop:     for (i in 1:length(data))  label(data[,i]) <- data.labels[i] I'd like to find the non-loop way to do it, using apply or the like... Any help appreciated. [[alternative HTML version deleted]]
2012 Sep 17
1
How to filter information from a big .csv table into a new table
Hi, I have big .csv file. I would like to filter that file into a new table. For example, I have .csv file as below: f1 f2 f3 f4 f5 f6 f7 f9 f10 f11 t1 1 0 1 0 1 0 0 0 0 1 t2 1 0 0 0 0 1 1 1 1 1 t3 0 0 0 0 0 0 0 0 0 0 t4 1 0 0 0 1 0 0 0 0 0 t5 0 0 0 0 0 0 0 0 0 0 t6 0 0 0 0 0 0 0 0 0 0
2012 May 14
2
Error in names(x) <- value: 'names' attribute must be the same length as the vector
...urn: `colnames<-`(`*tmp*`, value = c(""Item", "Color" ,"Number", "Size")) I'm not exactly sure how to fix this problem. Any advice would be greatly appreciated! Thanks, Priya MODIFIED CODE: # Looping through a series of CSV files for (c in csvfiles) { #A DF (prevdf) was created based on an initial csv file.. #so the condition below states that if there are rows with NAs or the number of rows in prevdf is zero if( (apply(prevdf, 1, function(y) !sum(!is.na(y))==1) > 0) || (nrow(prevdf) == 0) ) { #Open a new file currentCSVFil...
2012 Sep 18
1
chunk row to new table/file
I have big .csv file. I would like to filter that file into a new table. For example, I have .csv file as below: f1 f2 f3 f4 f5 f6 f7 f9 f10 f11 t1 1 0 1 0 1 0 0 0 0 1 t2 1 0 0 0 0 1 1 1 1 1 t3 0 0 0 0 0 0 0 0 0 0 t4 1 0 0 0 1 0 0 0 0 0 t5 0 0 0 0 0 0 0 0 0 0 t6 0 0 0 0 0 0
2013 Nov 29
0
Formatting output of plotKML
Hello, I previously submitted the below query to r-sig-geo, but have had no response. Before I start bothering individual maintainers, I wonder if anyone on this list has any experience with the package and (or!) can diagnose my problems? Thanks, Calum Hello, I am having a little trouble with plotKML and I am not sure whether to ascribe it to my incompetence (most likely), incomplete
2006 Mar 16
6
File Auditing with rails - File I/O issue
Hey Folks, I''ve written a script to generate a list of all files on a machine, then zip the results. ?I''m going to stick a web front end on it, and use it to audit some file servers. The problem is that the ZIP compression/decompression isn''t working, but its not what you might think. ?The script completes, but seems to not actually write anything. Here is a short
2006 Apr 20
0
MySQL support for LOAD DATA LOCAL
I upgraded my Linux box (RHEL4) from Ruby 1.8.2 and RoR 1.0 (with mysql gem v2.6) to Ruby 1.8.4 and RoR 1.1.2 (with mysql gem v2.7). Immediately one of my scripts broke. It was using MySQL''s LOAD DATA LOCAL mechanism to bulk load a CSV file. While it worked fine in the old version in the new version when I do: loadcmd = "load data local infile ''#{csvfile}'' ...
2012 Sep 17
1
self defined distance matrix in NbClust
i m using a package NbClust for cluster analysis. in the following algorithm ->NbClust(m, diss="NULL", distance = "euclidean", min.nc=2, max.nc=15, method = "ward", index = "all", alphaBeale = 0.1) i want to define my own dissimilarity matrix of dimension 38*38. my original data "m" is a matrix of 365*38. whenever i define my own dissimilarity
2010 Apr 14
3
PGError: duplicate key
I''m running a rails 2.3.5 / ruby 1.8.7 / postgresql 8.4.2 app and have just run into a curious problem. I have several tables that are initialized with data from csv files and I''ve noticed that, when I try to add new data to any of these tables via Table.new I get a PGError on duplicate key. For example: MIGRATION: class CreateNumbers < ActiveRecord::Migration def self.up