similar to: scan question

Displaying 20 results from an estimated 5000 matches similar to: "scan question"

2007 Dec 19
1
unexpected behavior from gzfile and unz
I get unexpected behavior from "readLines()" and "scan()" depending on how the file is opened with "gzfile" or "unz". More specifically: > file <- gzfile("file.gz") > readLines(file,1) [1] "a\tb\tc" > readLines(file,1) [1] "a\tb\tc" > close(file) It seems that the stream is rewound between calls to readLines.
2017 Oct 11
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
On Wed, Oct 11, 2017 at 02:03:20PM +0800, Wei Wang wrote: > On 10/10/2017 11:15 PM, Michael S. Tsirkin wrote: > > On Mon, Oct 02, 2017 at 04:38:01PM +0000, Wang, Wei W wrote: > > > On Sunday, October 1, 2017 11:19 AM, Michael S. Tsirkin wrote: > > > > On Sat, Sep 30, 2017 at 12:05:54PM +0800, Wei Wang wrote: > > > > > +static void ctrlq_send_cmd(struct
2017 Oct 11
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
On Wed, Oct 11, 2017 at 02:03:20PM +0800, Wei Wang wrote: > On 10/10/2017 11:15 PM, Michael S. Tsirkin wrote: > > On Mon, Oct 02, 2017 at 04:38:01PM +0000, Wang, Wei W wrote: > > > On Sunday, October 1, 2017 11:19 AM, Michael S. Tsirkin wrote: > > > > On Sat, Sep 30, 2017 at 12:05:54PM +0800, Wei Wang wrote: > > > > > +static void ctrlq_send_cmd(struct
2017 Oct 10
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
On Mon, Oct 02, 2017 at 04:38:01PM +0000, Wang, Wei W wrote: > On Sunday, October 1, 2017 11:19 AM, Michael S. Tsirkin wrote: > > On Sat, Sep 30, 2017 at 12:05:54PM +0800, Wei Wang wrote: > > > +static void ctrlq_send_cmd(struct virtio_balloon *vb, > > > + struct virtio_balloon_ctrlq_cmd *cmd, > > > + bool inbuf) > > > +{ > > > + struct
2017 Oct 10
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
On Mon, Oct 02, 2017 at 04:38:01PM +0000, Wang, Wei W wrote: > On Sunday, October 1, 2017 11:19 AM, Michael S. Tsirkin wrote: > > On Sat, Sep 30, 2017 at 12:05:54PM +0800, Wei Wang wrote: > > > +static void ctrlq_send_cmd(struct virtio_balloon *vb, > > > + struct virtio_balloon_ctrlq_cmd *cmd, > > > + bool inbuf) > > > +{ > > > + struct
2012 May 18
1
UTF-16 input and read.delim/scan
Hi all, I am running 64-bit R 2.15.0 on windows 7. I am trying to use read.delim to read from a file that has 2-byte unicode (CJK) characters. Here is an example of the data (it is tab-delimited if that gets messed up): HITId HITTypeId Title 2Q69Z6KW4ZMAGKKFRT6Q4ONO6MJF68 2LVJ1LY58B72OP36GNBHH16YF7RS7Z 看看句子,写写想法 请看以下的句子,再回答问 So read.delim (code below) doesn't read in correctly. It reads
2007 Nov 08
3
skip non-sequential lines using scan?
Hi all, Is there a way to skip non-sequential lines using the "skip" argument in the scan function? E.g., I have a matrix with 100 rows and 1e7 columns. I open a connection and want to read only lines 5, 7, 9, etc [i.e., seq(5,99,2)] It might seem that the syntax to do this would be something like this (if only the "skip" allowed vectors in the same way colClasses does in
1999 Nov 24
2
scan error (PR#342)
It seems to me the following should work (in fact, it comes from someone's SPlus file). Instead, it reads the first 8 lines and then spits out syntax errors. Using nlines=36 works. Using nmax does not. Intel RH5.2 with R90.0. Debugging shows it must be internal. Jim junk <- scan(file="",list(i=0,r1=0,r2=0,lull="",day=""),n=5*36) 1 3 5 no 1 2 1
2023 Feb 11
1
scan(..., skip=1e11): infinite loop; cannot interrupt
On Fri, 10 Feb 2023 23:38:55 -0600 Spencer Graves <spencer.graves at prodsyse.com> wrote: > I have a 4.54 GB file that I'm trying to read in chunks using > "scan(..., skip=__)". It works as expected for small values of > "skip" but goes into an infinite loop for "skip=1e11" and similar > large values of skip: I cannot even interrupt it; I
2001 Mar 14
2
scan
Hello, I have a problem. I have to read a HUGE file which has to be line processed, so I would like to use scan like p <- scan(pfile,what=c(0,0,0,"",0,""),nlines=1) but it continues to read the first line, so I have to add a skip and increment the skip after each read. It takes forever to read a test file of 1 Mb, the real one is in 60's Mb Is there a way to read line
2003 Nov 05
1
read.table leaves out data when reading multiple-line records (PR#4955)
Dear all, I discovered that read.table (RW1.8.0) leaves out data when reading multiple-line records. Replication code at the end Best regards Jens Oehlschlägel > filename <- "c:/tmp/c2.csv" > > data <- data.frame(a=c("c", "e\nnewline"), b=c("d", '"quoted simpleline"')) > > #look at the data >
2010 Jul 29
1
[PATCH] Reflow logic to make it easier to follow
The control flow was: if (!y) { ppix = ... } if (y) { ... } else if (x) { use ppix for something } else { use ppix for something } Merge the if(!y) block with the two else branches. This avoids a false-positive in the clang static analyzer, it can't know that !y and x are mutually exclusive. The result looks something like this: if (y) { ... } else { ppix = ... if (x) {
2010 Dec 02
0
[LLVMdev] Alternative exception handling proposal
Two amendments: > The semantics of the invoke instruction are slightly modified: if an exception > unwinds and it doesn't match anything in the list of catches and filters, > and there is no cleanup, then control doesn't branch to the unwind label, > unwinding simply continues out of the function. in fact the new semantics would be that if an exception doesn't match then
2010 Dec 02
5
[LLVMdev] Alternative exception handling proposal
On Dec 2, 2010, at 1:40 AM, Duncan Sands wrote: > Two amendments: > >> The semantics of the invoke instruction are slightly modified: if an exception >> unwinds and it doesn't match anything in the list of catches and filters, >> and there is no cleanup, then control doesn't branch to the unwind label, >> unwinding simply continues out of the function. >
1999 Jan 21
2
nlm question
Hello again Is there any way (or an alternative non-linear minimiser) that arguments to the function called in nlm can be passed in version 0.62.4? Like (I believe) nlmin in a well known other program or optimise in R. Do we use global variables? Shurely not! \John -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2011 Feb 02
1
error in scan(...
I know it's a common error and there is a lot of help available but still can't resolve the issue: all i am trying to do is to read a csv file from my folder and this is what i get: Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : scan() expected 'a real', got '1,m,a,F,165,240,26.5,31,0.738,0.704,1.095,0.606,0.847' Can you help? -- View
2012 Feb 09
1
scan() doesn't like '1.#IND'
Hi, Since C++ code compiled with g++ 4.6.3 on Windows (the version included in latest Rtools) now can produce things like '1.#IND' when writing doubles to a file (using the << operator), I wonder whether scan() shouldn't support those things. Right now (with recent R devel and latest Rtools) we get errors like: Error in scan(file, what, nmax, sep, dec, quote, skip, nlines,
2001 Dec 29
1
Slow 'read.table' in R 1.4.0 (PR#1232)
The 'read.table' function appears to be up to 10X slower in R 1.4.0 than R 1.3.1 for some of the data sets I read in. I was comparing the source code for the 2 versions and see that it was rewritten in R 1.4.0. I think I found out what part of the problem might be. I was comparing R1.3.1 and R1.4.0 code and it appears that a statement is missing in some of the code for R 1.4. This is
2010 Oct 04
1
Error message with scan() function
Hi Everyone, I am new R user and am trying to learn by reading the online manual "An Introduction to R" from the R web site. I am trying to practice using the scan() function as explained in the manual. For this I first created three vectors (one a character vector and two numeric one) and saved file "input.dat" in my working directory as: > label <- c("Bill",
2002 Feb 22
1
Summary: read.table on Mac OS X, CARBON vs. DARWIN
Thanks a lot, James!! The problem is fixed. On the version 1.4.0 Mac/darwin (the latest available version for this system) the function read.table (which is called from read.delim etc., too) has the bug you explained. Inserting the row nlines <- nlines+1 after lines <- c(lines, line) removes this bug. M. On Friday, February 22, 2002, at 02:33 PM, james.holtman at convergys.com