fread Questions
1
Solved
There seem to be of the order of 10 questions and (mostly) successful answers solving segmentation faults cause by misused fread()'s in C. That being said, I am having such a problem but have...
Heall asked 2/10, 2017 at 13:26
3
Solved
I have a csv file where column names include spaces and special characters.
fread imports them with quotes - but how can I change this behaviour? One reason is that I have column names starting wi...
Feretory asked 6/6, 2013 at 16:8
4
Solved
Simple question,
When i use fread:
fread(ArrayA, sizeof(Reg), sizeBlock, fp);
My file pointer, fp is moved ahead?
2
Solved
I'm trying to read a file into R using data.table / fread. Some of the fields have leading zeros and I just want to read the data in as characters and manually fix them. However I can't figure out ...
Mandelbaum asked 25/5, 2017 at 21:58
1
Solved
Why doesn't the colClasses argument to data.table::fread seem to convert the REQUEST_DATE column to POSIXct in the example below? It converts the ROW_ID column without issue.
library(data.table)
...
Clearness asked 27/1, 2017 at 21:25
2
Solved
I'm trying to check when fread() raises an error, so I use ferror().
chunk = fread(buf, 1, 100, file);
if (ferror(file))
{
return errno;
}
But, ferror() man page (man 3 ferror, or just man ferr...
1
Solved
TL;DR: Why does freopen(NULL, "rb", stdin) always fail on Windows?
I'm trying to re-implement a base64 encoder in C that takes input from stdin and outputs the encoded equivalent into stdout. I ha...
1
Solved
I'm a newcomer to C. I'm attempting to make my own version of base64; the program takes input from stdin and outputs its base64 equivalent to stdout. While testing my program against a binary file,...
1
Solved
I'm a beginner to C. I was wondering if it correct to check if the return value of fread(3) (which is the number of items read) is less than the number requested, rather than just 0, to detect EOF....
5
Solved
3
Solved
New to files in C, trying to read a file via fread
Here's the content of the file:
line1 how
Code used:
char c[6];
fread(c,1,5,f1)
When outputting var 'c', the contents appear with a random ...
3
Solved
I have two questions about C's fread function:
I have read that fread is used to read a binary file. However, when I read a binary file with fgets using read mode "r" and a text file with fread u...
2
Solved
I have a data (large data 125000 rows, ~20 MB) in which some of the rows with certain string need to be deleted and some columns need to be selected during the reading process.
Firstly, I discove...
Contagium asked 28/3, 2016 at 5:46
1
I have a zip archive with several csv files in it. I would like to use fread to import selected csv files into R.
With read.csv I can get the data as follows without extracting the archive.
con <...
Jehiel asked 26/2, 2016 at 5:57
2
Solved
I am using the fread function in R for reading files to data.tables objects.
However, when reading the file I'd like to skip lines that start with #, is that possible?
I could not find any mention ...
Paver asked 20/9, 2013 at 15:43
5
Can someone clarify what the APNs (Apple Push Notification) wants as far as how you query it?
The docs say it starts sending as soon as the connection is made. Does this mean that I don't do an fr...
Excerpta asked 14/8, 2009 at 16:27
2
Solved
I have a csv file with extra white spaces that I want to read into R as a dataframe, stripping the white spaces.
This can be achieved by using
testdata<-read.csv("file.csv", strip.white=TRUE)...
Eckard asked 31/3, 2014 at 8:54
1
Solved
For my assignment, I'm required to use fread/fwrite. I wrote
#include <stdio.h>
#include <string.h>
struct rec{
int account;
char name[100];
double balance;
};
int main()
{
struc...
1
I recently updated to data.table 1.9.6 and get the following error when using fread:
fread("Aug14.csv")
Error in fread("Aug14.csv") :
4 arguments passed to .Internal(nchar) which requires 3
A...
Aphra asked 2/10, 2015 at 17:4
1
I am working on a project for a MOOC, and was tinkering around with the data.table package in RStudio. Use of the fread() function to import the data files initially worked fine:
fread("UCI HAR Da...
Margoriemargot asked 9/6, 2015 at 1:19
2
Solved
data.table 1.9.2
I'm reading in a large table and there appears to be at least one row which produces an error of the following nature:
Error in fread(paste(base_dir, filename, sep = "")) :
Expe...
Aubervilliers asked 12/5, 2014 at 4:45
2
Solved
Can fread from "data.table" be forced to successfully use "." as a sep value?
I'm trying to use fread to speed up my concat.split functions in "splitstackshape". See this Gist for the general appr...
Mcmaster asked 8/10, 2013 at 4:55
0
I was looking at this thread: 'append multiple large data.table's; custom data coercion using colClasses and fread; named pipes'
I see from "Matt Dowle", that fread "can accept non-files...
Pricecutting asked 28/9, 2014 at 5:43
5
Solved
Which is faster? ifstream or fread.
Which should I use to read binary files?
fread() puts the whole file into the memory.
So after fread, accessing the buffer it creates is fast.
Does ifstream::...
1
I want to write a ftp class with sockets, textfiles work pretty well to upload so far, but then I wanted to upload a bigger file, a movie, and it didn't work.
The first 4096B are read well, ...
© 2022 - 2024 — McMap. All rights reserved.