similar to: supply methods to read.table

Displaying 20 results from an estimated 50000 matches similar to: "supply methods to read.table"

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
2017 Oct 24
0
read.table(..., header == FALSE, colClasses = <vector with names attribute>)
>>>>> Benjamin Tyner <btyner at gmail.com> >>>>> on Tue, 24 Oct 2017 07:21:33 -0400 writes: > Jeff, > Thank you for your reply. The intent was to construct a minimum > reproducible example. The same warning occurs when the 'file' argument > points to a file on disk with a million lines. But you are correct, my >
2011 Nov 21
1
extending the colClasses argument in read.table
Hello, We've released the int64 package to CRAN a few days ago. The package provides S4 classes "int64" and "uint64" that represent signed and unsigned 64 bit integer vectors. One further development of the package is to facilitate reading 64 bit integer data from csv, etc ... files. I have this function that wraps a call to read.csv to: - read the "int64"
2004 Jul 28
1
read.table() and NULL for colClasses
Hi, is there are reason for not supporting NULL or "NULL" values for argument colClasses in read.table(), much like you can use NULL values for argument 'what' in scan()? This would help quite a bit when reading large data files where only a few columns are of interest. I've modfied read.table() to so it calls scan(what=...) also with NULLs for the fields to be skipped.
2017 Oct 24
2
read.table(..., header == FALSE, colClasses = <vector with names attribute>)
Jeff, Thank you for your reply. The intent was to construct a minimum reproducible example. The same warning occurs when the 'file' argument points to a file on disk with a million lines. But you are correct, my example was slightly malformed and in fact gives an error under R version 3.2.2. Please allow me to try again; in older versions of R, ?? > read.table(file =
2010 Feb 11
2
trouble with read.table and colClasses='raw'
Hi all, First off, it is surprising that there are no examples of how to use read.table() under ?read.table ! I am trying to read in a flat file of type 'raw'. It has 1000 rows and 600K columns. I have the RAM to accomplish this, but can't get the data into R using read.table: x <- read.table("data",header=TRUE,colClasses=rep(,600000)) #returns error: no method or
2017 Oct 23
2
read.table(..., header == FALSE, colClasses = <vector with names attribute>)
Hello I noticed that starting with R version 3.3.0 onward, this generates a warning: ?? > txt <- c("a", "3.14") ?? > read.table(file = textConnection(txt), header = FALSE, colClasses = c(x = "character", y = "numeric")) the warning is "not all columns named in 'colClasses' exist" and I guess the change was made in response
2012 Oct 20
1
Error: not 'a real'?
Hi List, when supplying a vector of atomic vector classes to read.table, I get: # column classes colClasses=c("character", "character","numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric",
2002 May 08
1
Difference in 'read.table' between R.1.4.1 and R1.5.0
This sequence of commands worked fine in R.1.4.1. The data file was the same in both instances: > acct.log <- read.table(file, col.names=c('cmd', 'user', 'start', 'end', + 'elapsed', 'sys', 'usr', 'cpu', 'char', 'blocks'), + colClasses=c('NA', 'NA', rep('numeric',
2017 Oct 24
0
read.table(..., header == FALSE, colClasses = <vector with names attribute>)
You are constructing the equivalent of a two-line data file, and complaining that it is not treating it like it was one line. If it did used to accept this silently [skeptical] then I for one am glad it produces a warning now. -- Sent from my phone. Please excuse my brevity. On October 23, 2017 2:53:21 PM PDT, Benjamin Tyner <btyner at gmail.com> wrote: >Hello > >I noticed that
2006 Mar 16
4
excluding factor levels with read.table() and colClasses=
Hi, I am reading a "|" delimited text file into R using read.table(). I am using colClasses= to specify some variables as factors. Some of these variables include missing values coded as "NA". Unfortunately the R code I am using (pasted bellow) includes "NA" as one of the factor levels. Is it possible to remove the "NA" level from a factor with in
2013 Sep 30
4
read.table() with quoted integers
Hi! It seems that read.table() in R 3.0.1 (Linux 64-bit) does not consider quoted integers as an acceptable value for columns for which colClasses="integer". But when colClasses is omitted, these columns are read as integer anyway. For example, let's consider a file named file.dat, containing: "1" "2" > read.table("file.dat",
2011 Aug 28
1
read.table: deciding automatically between two colClasses values
Hello, I have a function for reading a data-frame from a file, which contains E = read.table(file = filename, header = T, colClasses = c(rep("integer",6),"numeric","integer",rep("numeric",8)), ...) Now a small variation arose, where colClasses =
2001 Aug 24
1
RFC: type conversion in read.table
Currently read.table is rather limited in its type conversion. The algorithm is 0) Read as character 1) Try to convert to numeric. If that works, quit 2) Convert to factor unless !as.is. I am thinking about adding more flexibility and more classes by the following two changes. A) Anticipating the arrival of classes for all R objects, add an argument say `colClasses' that allows the user to
2002 Nov 27
1
read.table: colClasses when num. of columns is unknown
Hi, I am looking for a way to read tables that have general structure of characterTag num1 num2 ... i.e. one character column followed by an unknown to the caller (but fixed throughout the file) number of numeric columns. I wanted to improve the speed of read.table by using colClasses, but that seemed to require knowledge of the actual number of columns in the file. For example I tried
2008 Jul 30
2
problem with read.table()
Hello R-User I have a table as tab-delimited textfile (291 rows, 83 columns). The first row are labels and the first line the variable names. I used the following code several times with different similar tables and it always worked. But now: setClass("of") setAs("character", "of", function(from) as.ordered(from)) Classe82<-cclasses <-
2008 Feb 12
2
how to specify modes of certain fields in read.table
I have a data file with 50 columns. Among them, there are two coordinates, X and Y X Y 641673.78807 3607080.78438 641436.56207 3607108.30543 641165.28042 3607136.82957 640879.58373 3607116.20568 When I use read.table, it rounds X and Y to the maximal 8 decimal number as. 641673.8 3607081 641436.6 3607108 641165.3 3607137 640879.6 3607116 640683.5 3607105 My question
2013 Jan 16
1
Read.dta and Write.dta Binary Data Error
Thanks in advance. I pass data sets between R and Stata and think dta files would be the best files for this. To do this I can use package foreign or package memisc. I mostly use foreign, although have used memisc and this problem mostly didn't happen, but created errors at other times. I have a csv data set (and created a test case) with with at least one column completely missing. This
2009 Jun 05
2
read.table, row.names arg
Dear R users, I had somehow expected that read.table() would treat the column specified by the row.names argument as of class character. That seems to be the only sensible class allowed for a column containing row names. However, that does not seem to be the case, as the following example shows: x <- cbind.data.frame(ID = c("010007787048271871", "1007109516820319",
2010 May 04
2
read.table: skipping trailing delimiters
Hi, I am trying to read a tab-delimited file that has trailing tab delimiters. It's a simple file with two legitimate fields. I'm using the first as row.names, and the second should be the only column in the resulting data frame. Initially, R was filling the last column with NA's, but I was able to stop that by setting