search for: getcsv

Displaying 2 results from an estimated 2 matches for "getcsv".

2009 Nov 02
4
Incremental ReadLines
...ing to figure out how to read in a large file for a few days now, and after extensive research I'm still not sure what to do. I have a large comma delimited text file that contains 59 fields in each record. There is also a header every 121 records This function works well for smallish records getcsv=function(fname){ ff=file(description = fname) x <- readLines(ff) closeAllConnections() x <- x[x != ""] # REMOVE BLANKS x=x[grep("^[-0-9]", x)] # REMOVE ALL TEXT spl=strsplit(x,',') # THIS PART IS SLOW, BUT MANAGABLE xx=t(sap...
2010 Dec 04
1
what is this averaging function called ?, has R a built in function for it ?
...algorithm is so basic I wonder what is the proper name of this function and is it build in R. here is some code in PHP to illustrate what the function is doing, it uses some function I created but the meaning is obvious: #get csv file and interchange rows with columns to get two arrays $csv = aic(getcsv(file_get_contents("out.csv"))); #now those arrays contained in one bigger array are sorted array_multisort($csv[0],SORT_NUMERIC,$csv[1],SORT_NUMERIC); #second array is created and values that will be put on x or 0 axis are made unique with every y or 1 # value is going into array under x...