fread Questions
1
Solved
I would like to be able to skip a column that is read into R via data.table's fread function in v1.8.9. But the csv I am reading in, has no column headers…which appears to be a problem for fread......
Signboard asked 10/7, 2013 at 9:28
1
Solved
I am amazed by the speed of the fread function in data.table on large data files but how does it manages to read so fast? What are the basic implementation differences between fread and read.csv?
Interoceptor asked 26/6, 2014 at 7:5
2
Solved
I want to be able to read in a Windows text file, modify it in memory, and then overwrite the old file with the modified data. However, fread doesn't seem to store the carriage returns present in m...
Madelon asked 15/5, 2014 at 23:38
2
Solved
When I was 'man fread', I got this:
RETURN VALUE
fread() and fwrite() return the number of items successfully read or written (i.e., not the number of characters). If an error
occurs, or the e...
Wyeth asked 14/6, 2011 at 3:57
1
Solved
I'm importing a large .csv file into R (about 0.5 million rows), so I've been trying to use fread() from the data.table package as a faster alternative to read.table() and read.csv(). However, frea...
Intervocalic asked 11/3, 2014 at 4:5
2
I've realized that my much bigger file is failing because it can't properly read the first integer in a binary file. This is my test file I've set up to do only that. I know that the int I'm readin...
1
Solved
1
Solved
append multiple large data.table's; custom data coercion using colClasses and fread; named pipes
[This is kind of multiple bug-reports/feature requests in one post, but they don't necessarily make sense in isolation. Apologies for the monster post in advance. Posting here as suggested by help(...
Scalping asked 19/1, 2014 at 17:51
1
Solved
> fread('col1,col2\n')
Empty data.table (0 rows) of 2 cols: col1,col2
> fread('col1,col2\n5,4')
col1 col2
1: 5 4
> fread('col1,col2\n5,"4\n3"')
Error in fread("col1,col2\n5,\"4\n3\"") :
...
Tripletail asked 8/1, 2014 at 21:14
2
Does fread have a limit for the number of bytes it can read at once?
Or I can read any size I would like to charge in to my pointer?
For example, Can I read file of 50MB once using fread to charge ...
1
Solved
I don't know how to choose specific columns using the colClasses option in fread. I tried to use NULL in several ways but nothing worked. Here's a minimal example. I just want columns 1 and 3.
dt ...
Cymar asked 9/9, 2013 at 13:51
4
Solved
I am writing a simple program that writes to a binary file, closes it and then reads the data that was just written. I am trying to write an array of unsigned characters. I am experiencing some iss...
1
I have a big problem that need's to be solved before I can continue with my program.
I have to open a binary file, read it's content, save the content into a buffer, allocate space on the heap wit...
Detraction asked 24/5, 2013 at 15:52
2
Solved
I am creating an archive program in C, and i want it to save files i provide, list and extract them.
I had many issues because i used a text file for saving, and it is not the best choice if i wan...
1
When I tried to read a csv file using data.table:fread(fn, sep='\t', header=T), it gives an "Unbalanced " observed on this line" error. The data has 3 integer variables and 1 string variable. The s...
Aurochs asked 18/4, 2013 at 22:18
1
Solved
So I'm not entirely sure how to use fread. I have a binary file in little-endian that I need to convert to big-endian, and I don't know how to read the file. Here is what I have so far:
FILE *in_...
1
I have a roughly 11.1G binary file where stores a series of the depth frames from the Kinect. There are 19437 frames in this file. To read one frame per time, I use ifstream in fstream but it reach...
4
Solved
I have practically no knowledge of Matlab, and need to translate some parsing routines into Python. They are for large files, that are themselves divided into 'blocks', and I'm having difficulty ri...
3
Solved
Im trying to parse a bmp file with fread() and when I begin to parse, it reverses the order of my bytes.
typedef struct{
short magic_number;
int file_size;
short reserved_bytes[2];
int data_of...
1
Solved
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
int main()
{
FILE* bmp = NULL;
uint32_t offset;
uint8_t* temp = NULL;
size_t read;
unsigned int x_dim = 600, y_dim...
7
Solved
The declaration of fread is as following:
size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
The question is: Is there a difference in reading performance of two such calls to fre...
3
hi i use this code read and write text in file .
$d = fopen("chat.txt", "r");
$content=fread($d,filesize('chat.txt'));
$bn=explode('||',$content);
foreach($bn as $bn)
echo $bn.'<br>';
...
3
Solved
I'm getting a very strange error while trying to read from a simple text file with c fread() call.
I made a very simple program to show that error:
int main(int argc ,char ** argv) {
FILE* fh = ...
1
Solved
I am trying to read a binary file with the following binary configuration
00 00 00 1A 79 20 83 DB 44 ...
using the following function
static BitArray getBitArray(string filename)
{
FILE *fs = ...
4
First , I read a text into a buffer by calling fread, and then I want to read it line by line, how to do it? I try to use a sscanf , but it seems not to work.
char textbuf[4096];
char line[256];
...
© 2022 - 2024 — McMap. All rights reserved.