similar to: colClasses: supressed 'NA'

Displaying 20 results from an estimated 100 matches similar to: "colClasses: supressed 'NA'"

2010 Mar 18
1
Do colClasses in readHTMLTable (XML Package) work?
Hi, I can't get the colClasses option to work in the readHTMLTable function of the XML package. Here's a code fragment: require("XML") doc <- "http://www.nber.org/cycles/cyclesmain.html" table <- getNodeSet(htmlParse(doc),"//table") [[2]] # The main table is the second one because it's embedded in the page table. xt
2007 Oct 09
1
Read in date fomat while colClasses="character"
Hi R users, I am using xlsReadWrite to read a particular excel file. In one of the columns I have dates ( say col=5). Now date column is read by default as numeric. So I used dateTimeAs= "isodatetime". This enables reading in the date format. However in the earlier column (say col=1) I have data which however starts from row 10. So to read data from column one I use
2008 Feb 21
0
Feedback on a colClasses() generator function in progress?
I'm working on colClasses() function that generates "colClasses" vectors for read.table() using a compact format string (see below). The below is what I got right now. Before adding it to R.utils, I would like to check with you if I'm missing something obvious such as certain column classes, if there are use cases it cannot handle, or if there is another way to achieve the same.
2008 Nov 11
0
read.table not clearing colClasses
I am attempting to created colClasses for several tables, then read only specific columns. There are two different table layouts that I am working with. If I use exclusively one layout, the script works perfectly, but if I mix the layouts, it fails to grab the correct columns form layout that is read in second. It appears that colClasses fails to adopt the new structure after the first iteration.
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"
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
2005 Apr 18
2
colClasses = "Date" in read.delim, how to pass date-format?
Hi I have a huge data-set with one column being of type date. Of course I can import the data using this column as "factor" and then convert it later to dates, using: sws.bezuege$FaktDat <- dates(as.character(sws.bezuege$FaktDat), format = c(dates = "d.m.y")) But the conversion requires a huge amount of memory (and time), therefore I would
2002 Jul 23
1
colClasses = "logical" produces all FALSE when input is 1/0
It seems to me that colClasses = "logical" in read.table produces incorrect results when the input file has `1' and `0' in it. Although, it is perhaps just as likely that I am misunderstanding the documentation. Here is a simple example: > file.show("test.txt") x 1 0 1 > read.table("test.txt", header = TRUE) x 1 1 2 0 3 1 This result is fine. >
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
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 =
2004 Sep 08
1
A couple of issues with colClasses/setAs
Consider this: $ cat test.dat 1 a 2 b Now, we want to read the 2nd column as a factor and ignore the first (since it's just a sequential ID). We can't just put "factor" among the colClasses (would have been nice), so let's try this instead > setAs("character","factor",as.factor) Arguments in definition changed from (x) to (from) >
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
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
2004 Oct 11
4
colClasses
Hi I am trying to read a data frame from a text editor in to R. I want some of the columns to be read in as "character" not numeric. I figured that I can do that by using "colClasses" in "read.table" command. However, I couldn't find out how to use "colClasses". e.g. say I have 5 column in the data file. I want 1st and 3rd column to be read in as
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
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.
2006 Jun 21
5
colClasses
Hi Folks! I'm reading in some data from a .csv file that has a date column. How do I use colClasses to get read.csv to recognize the date column? The documentation on this seems to be nil - And yes, I've read help and R Data Import/Export and can't figure out what the colClasses syntax is. Thanks, john [[alternative HTML version deleted]]
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 >
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