similar to: passing character vectors to FORTRAN

Displaying 20 results from an estimated 500 matches similar to: "passing character vectors to FORTRAN"

2007 Jul 02
0
Branch 'as' - 4 commits - libswfdec/swfdec_as_interpret.c test/trace
libswfdec/swfdec_as_interpret.c | 51 + test/trace/Makefile.am | 16 test/trace/chartoascii-4.swf |binary test/trace/chartoascii-4.swf.trace | 7 test/trace/chartoascii-5.swf |binary test/trace/chartoascii-5.swf.trace | 1011 ++++++++++++++++++++++++++++++++++++ test/trace/chartoascii-6.swf |binary test/trace/chartoascii-6.swf.trace | 1008
1998 Apr 06
2
problems with chron library
I have installed the chron library, but it does not seem to work: > chron("04/06/98") Error in .C(NAME = "to_lower", strings = as.character(str), nstrings = as.integer(n)) : C/Fortran function not in load table > chron(17894) Error in .C(NAME = "to_lower", strings = as.character(str), nstrings = as.integer(n)) : C/Fortran function not in load table > I am
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:
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
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
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 =
2011 Aug 04
1
slightly speeding up readChar()
Hi, I was trying to have R read files faster with readChar(). That was before I noticed that readChar() is not that bad! In any case, below I suggest a few simple changes that will make readChar slightly faster. I followed readChar(useBytes=T), and tried to identify all O(N) operations, where N is the size of the file. The assumption is that for LARGE files we want to avoid any O(N) operations,
2002 Apr 26
4
Memory "leak" in readChar (PR#1483)
Full_Name: Hugh C. Pumphrey Version: 1.4.1 OS: Linux (Debian Woody) Submission from: (NULL) (129.215.133.170) The function readChar() appears to have some type of problem with memory allocation. I don't know if "memory leak" is the correct term but if one uses readChar() many times, the R binary grows in size until it eats all your memory and swap space. The code enclosed below
2024 Feb 17
1
certain pipe() use cases not working in r-devel
I've now tested with: > R.version.string [1] "R Under development (unstable) (2024-02-16 r85931)" and all of the previously mentioned examples now work as expected on macOS. Thanks for the quick fix, Jenny On Thu, Feb 15, 2024 at 8:02?AM Tomas Kalibera <tomas.kalibera at gmail.com> wrote: > > On 2/14/24 23:43, Jennifer Bryan wrote: > > Hello, > > >
2014 Nov 24
0
How to read variable nr of chars from a Server Socket?
Hi, I am trying to implement messaging protocol that doesn't pre-specify the length of the message in the message header. In other words, I don't know in advance when I will reach the end of the message. I wrote C level parser for strings but when it came to reading from connections I got stuck. API in Connections.h doesn't provide a pointer to an existing connection and there seems
2012 Apr 01
1
scan() vs readChar() speed
Dear list, I am trying to find a fast solution to read moderately large (1 -- 10 million entries) text files containing only tab-delimited numeric values. My test file is the following, nr <- 1000 nc <- 5000 m <- matrix(round(rnorm(nr*nc),3),nr=nr) write.table(m, file = "a.txt", append=FALSE, row.names = FALSE, col.names = FALSE) scan() is faster than
2010 Sep 22
1
help with sockets in R
Hi R gurus, I'm trying to use a ReSTful web service from within R. Specifically, I need to make HTTP PUT requests. I'm able to make the request and that goes well enough, but I'm having trouble properly consuming the HTTP response. The problem comes in when I'm trying to parse out the response body. I get the length of the response body from the Content-Length header. I then try
2024 Feb 14
2
certain pipe() use cases not working in r-devel
Hello, I've noticed a specific type of pipe() usage that works in released R, but not in r-devel. In 4.3.2 on macOS, I can write to a connection returned by pipe(), i.e. "hello, world" prints here: > R.version.string [1] "R version 4.3.2 (2023-10-31)" > con <- pipe("cat") > writeLines("hello, world", con) hello, world But in r-devel on
2008 Jun 03
0
reading a file incrementally
Hi, I'm trying to read a file containing html markup (discussion board posts) and output the various parts of each post to an field in a record in an output file (date, author, title, body). This is a one-off job and I'm trying to use R to do it. The file looks something like this: <br><ul>Created: --- - Dr. Johnsons's article - concerns<br><p>After