Codecov Report
Merging #2545 into master will increase coverage by
0.02%.
The diff coverage is100%.
@@ Coverage Diff @@ ## master #2545 +/- ## ========================================== + Coverage 97.01% 97.03% +0.02% ========================================== Files 66 66 Lines 12484 12559 +75 ========================================== + Hits 12111 12187 +76 + Misses 373 372 -1
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/freadR.c | 96.54% <100%> (+0.25%) |
⬆️ |
| R/fread.R | 99.4% <100%> (+0.84%) |
⬆️ |
| src/init.c | 100% <100%> (ø) |
⬆️ |
| R/data.table.R | 97.65% <100%> (ø) |
⬆️ |
| src/fread.c | 98.5% <100%> (ø) |
⬆️ |
| src/rbindlist.c | 100% <0%> (ø) |
⬆️ |
| R/frank.R | 100% <0%> (ø) |
⬆️ |
| R/setops.R | 98.96% <0%> (ø) |
⬆️ |
| ... and 5 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update 78acb70...8ef1402. Read the comment docs.
| DF <- data.frame( a=1:5, b=11:50, d=c("A","B","C","D"), f=1:5, grp=1:5 ) | ||
| res167 <- names(print(ggplot(DF,aes(b,f))+geom_point()))[c(1,3)] | ||
| test(167, names(print(ggplot(DT,aes(b,f))+geom_point()))[c(1,3)], res167) | ||
| # The names() is a stronger test that it has actually plotted, but also because test() sees the invisible result |
| # doubled quote inside a quoted field followed by an embedded newline | ||
| if (.Platform$OS.type == "unix") { | ||
| test(1445, fread("doublequote_newline.csv")[7:10], data.table(A=c(1L,1L,2L,1L), B=c("a","embedded \"\"field\"\"\nwith some embedded new\nlines as well","not this one","a"))) | ||
| } |
Closed
Merged
mattdowle
changed the title
Check colClasses to be valid type. Closes #1634
Various colClasses enhancements
| }, | ||
| warning = fun <- function(e) { | ||
| etype = if (inherits(e,"error")) "error" else "warning" | ||
| warning(sprintf("Column '%s' was set by colClasses to be '%s' but fread encountered the following %s:\n\t%s\nso the column has been left as type '%s'", |
| "complex" = as.complex(v), | ||
| "raw" = as_raw(v), # Internal implementation | ||
| "Date" = as.Date(v), | ||
| "POSIXct" = as.POSIXct(v), |
| \itemize{ | ||
| \item{If coercion results in an error or introduces \code{NA}s, the attempt is aborted for that column with warning and the column's type is left unchanged (probably \code{character}).} | ||
| \item{Named list of vectors of column names or numbers are supported where the list names are the class names. The \code{list} form makes it easier to set a batch of columns to be a particular class; see examples. When column numbers are used in the `list` form, they refer to the column number in the file, not the column number after \code{select} or \code{drop} has been applied.} | ||
| \item{Columns are not demoted to a lower type if this would risk loss of information. You have to coerce such columns afterwards yourself, if you really require data loss.} |
| if (!is.null(names(colClasses))) { # names are column names; convert to list approach | ||
| if (!length(colClasses)) { | ||
| colClasses=NULL; | ||
| } else if (identical(colClasses, "NULL")) { |
Closed
Merged
Closed
7 tasks
Merged
4 tasks
Merged