Displaying 20 results from an estimated 1000 matches similar to: "reading a file incrementally"
2002 Dec 25
0
Part II Re: read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)
Scot,
Thanks for the info. I will try your code out to
verify the result, but before I do that, will your
code (SAS and R) work with variable names that are
longer than 8 characters long without truncating the
variable name in R?
Also, I wonder about using your method or the PROC
EXPORT method with larger data sets. The data sets I
will be working with for the most part will not be
that large,
2008 Feb 01
2
the "union" of several data frame rows
Hi,
I have a question about how to obtain the union of several data frame
rows. I'm trying to create a common key for several tests composed of
different items. Here is a small scale version of the problem. These
are keys for 4 different tests, not all mutually exclusive:
id q1 q2 q3 q4 q5 q6
1 A C
2 B D
3 A D B
4 C D B D
I would like
2003 Mar 10
2
graphics backgrounds from gray to white in png()
Hi,
I'm trying to make a png file of a histogram. I would like a white
background in the final product but end up producing a gray one, despite
setting what I think are the correct parameters. Suggestions for how to
properly set a white background would be welcome.
Thanks in advance,
Scot
# for non-lattice
> par("bg"="white")
> par("bg")
[1]
2002 Dec 25
0
Part II Re: read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)
Scot,
Thanks for the additional information. On further
reflection... whether one uses SAS PROC EXPORT or uses
a SAS LIBNAME yourfile XPORT 'yourpathname';
statement, an intermediate file is created in either
case. As far as experience tells me now, PROC EXPORT
is a far superior choice, because variable names do
not get truncated and you only have to deal with
reading in a simple text
2005 Aug 25
1
question about custom contrasts in ANOVA
Hi,
I have a problem in which I have test score data on students from a number
of schools. In each school I have a measure of whether or not they
received special programming. I am interested in the interaction between
school and attendance to the programming, but in a very select set of
comparisons. I'd like to cast the test as one in which students in each
school who attend are
2003 Aug 20
0
end-of-loop-timeout problem and submit-bug-report output (resending) (PR#3841)
(Hi,
I tried sending this to ess-bugs, but got it bounced back: "user unknown".
Hope this isn't too off-topic for ess-help.
Scot)
I'm using Xemacs 21.4, ess 5.1.24, on Windows 98 SE, with John Fox's
configuration files:
(http://socserv.mcmaster.ca/jfox/Books/Companion/ESS/index.html)
and am getting the end-of-loop-timeout warning message I've seen reported
to
2005 Jul 11
1
small first graph of par(3,2), other 5 are correct
Hi,
I'm trying to produce 6 graphs on a single page using code I've borrowed
from an example by Paul Murrell:
(http://www.stat.auckland.ac.nz/~paul/RGraphics/custombase-xmastree.R).
It involves placing 6 horizontal barplots on one page and adding common
labels.
The problem is the first graph in my figure (the one in the (1,1)
position) is smaller than the other 5. A toy example is
2006 Nov 07
1
reading VERY large binary files
Hello,
I am trying to read in elements out of a very large binary file ... the
total file is 4 gigs. I want to select rows out of the file, and the
current procedure I run works but is prohibitively slow (takes more than
a day to run and still won't complete). Is there any faster way to
accomplish this?
My current procedure looks like this:
readHH <- function(file_name,
2007 Jun 14
1
Clarification for readChar man page
Hi,
Here's a patch to the readChar manual page (R-trunk as of today) that
better clarifies readChar's return value. It could use some work as I'd
also like to add some text about using nchar() to find the length of the
string that readchar() returns, but I'm unsure which of type="bytes" or
type="chars" to mention. Is it type="chars"?
Index:
2005 Nov 03
3
Search within a file
Hi,
I am looking for a way to search a file for position of some expression,
from within R. My current code:
sha1Pos = gregexpr("<sha1>", readChar(filename,
file.info(filename)$size))[[1]]
Works fine for small files, but text files I will be working with might get
up to Gb range, so I was trying to accomplish the same without loading the
whole file into R.
I realize this is
2024 Jan 29
1
[External] readChar() could read the whole file by default?
My opinion is that the proposed feature would be greatly appreciated by users.
I had always wondered if I was the only one doing paste(readLines(f),
collapse="\n") all the time.
It would be great to have the proposed, more straightforward way to
read the whole file as a string: readChar("my_file.txt", -1) or even
better readChar("my_file.txt")
Thanks for your detailed
2009 Sep 04
0
passing character vectors to FORTRAN
Hi,
I've been trying to pass a character vector from R to a FORTRAN subroutine. There have been several posts discussing this issue (e.g. http://tolstoy.newcastle.edu.au/R/help/98a/0547.html, http://tolstoy.newcastle.edu.au/R/help/05/10/13558.html, http://tolstoy.newcastle.edu.au/R/help/01a/2577.html, http://tolstoy.newcastle.edu.au/R/help/01c/1795.html,
2024 Jan 26
1
readChar() could read the whole file by default?
I am curious why readLines() has a default (n=-1L) to read the full
file while readChar() has no default for nchars= (i.e., readChar(file)
is an error). Is there a technical reason for this?
I often[1] see code like paste(readLines(f), collapse="\n") which
would be better served by readChar(), especially given issues with the
global string cache I've come across[2]. But lacking the
2018 May 29
0
Buffering in R 3.5 connections causes incorrect data in readChar
On 05/26/2018 05:15 AM, Aaron Goodman wrote:
> I noticed an issue where readChar does not return the correct value after a
> call to readline. It appears that readChar is not aware of the buffering,
> so it reads from the end of the buffer, rather than the current position in
> the file. This is a significant change of behavior from R-3.4.4.
>
> Below is a test case that I used
2024 Jan 26
1
[External] readChar() could read the whole file by default?
On Fri, 26 Jan 2024, Michael Chirico wrote:
> I am curious why readLines() has a default (n=-1L) to read the full
> file while readChar() has no default for nchars= (i.e., readChar(file)
> is an error). Is there a technical reason for this?
>
> I often[1] see code like paste(readLines(f), collapse="\n") which
> would be better served by readChar(), especially given
2018 May 29
1
Buffering in R 3.5 connections causes incorrect data in readChar
Tomas,
Thank you for the explanation. I see in the documentation: "These functions
are intended to be used with binary-mode connections." So I see how using
it on a text connection is undefined, and not a bug. An error or warning
when attempting to use a it on a text connection would be helpful
considering how the behavior has changed in R-3.5.
On Tue, May 29, 2018 at 3:09 AM, Tomas
2018 May 26
2
Buffering in R 3.5 connections causes incorrect data in readChar
I noticed an issue where readChar does not return the correct value after a
call to readline. It appears that readChar is not aware of the buffering,
so it reads from the end of the buffer, rather than the current position in
the file. This is a significant change of behavior from R-3.4.4.
Below is a test case that I used to home in on the problem.
---
p<-"test2.txt"
2006 Apr 27
1
Error in readChar(): invalid UTF-8 input
I have R code to read a binary header file, consisting of several
readBin() and readChar() statements. I am currently using version R-2.2.1
(on x86_64, RH EL4) and have received the following error
Error in readChar(fid, n = 1) : invalid UTF-8 input in readChar()
This is strange because (a) I was able to read in this file successfully
in previous versions of R (circa 2005) and (b) it
2008 May 06
3
DO NOT REPLY [Bug 5440] New: 'relative' test fails on SunOs 5.8
https://bugzilla.samba.org/show_bug.cgi?id=5440
Summary: 'relative' test fails on SunOs 5.8
Product: rsync
Version: 3.0.2
Platform: Sparc
OS/Version: SunOS
Status: NEW
Severity: normal
Priority: P3
Component: core
AssignedTo: wayned@samba.org
ReportedBy: brianegge@yahoo.com
2007 Dec 09
1
Problems working with large matrix (using package R.huge)
Hi all,
Since I was having several problems trying to work with a large matrix I started to use the package R.huge but I'm having the following problem
> x<-FileByteMatrix("covtype.data",nrow=581012,ncol=55)
Error: cannot allocate vector of size 770.8 Mb
In addition: Warning messages:
1: Reached total allocation of 447Mb: see help(memory.size) in: readChar(con = con, nchar =