similar to: Standard input and R

Displaying 20 results from an estimated 9000 matches similar to: "Standard input and R"

2008 Sep 24
2
R --interactive and readline() creates infinite loop
Dear all, I have asked before, in R-help [1], about a way to create an interactive session in which commands are taken from a file or standard input - like R CMD BATCH but additionally allowing user input - but there was no response to that question, and the workarounds that I have found (using "expect", creating a temporary .Rprofile) are ugly and problematic. With the
2004 Nov 18
3
Redirect standard input and output of R
Dear R-people! I??m trying to write a C program that write to the standard input of R and read the standard output. I can perfectly read the R output, but I??m not able of writing anything to R. This program really works with the 'cat?? UNIX command, but it does not work with R. What I??m doing wrong??? It is possible to do it??? I want to start R once and use it thousands of times...
2004 Nov 18
3
Redirect standard input and output of R
Dear R-people! I??m trying to write a C program that write to the standard input of R and read the standard output. I can perfectly read the R output, but I??m not able of writing anything to R. This program really works with the 'cat?? UNIX command, but it does not work with R. What I??m doing wrong??? It is possible to do it??? I want to start R once and use it thousands of times...
2009 Nov 20
3
[Bug 1673] New: pseudoterminal option (-t) breaks standard out/error separation
https://bugzilla.mindrot.org/show_bug.cgi?id=1673 Summary: pseudoterminal option (-t) breaks standard out/error separation Product: Portable OpenSSH Version: 5.1p1 Platform: Other OS/Version: Other Status: NEW Severity: normal Priority: P2 Component: ssh AssignedTo:
2011 Feb 16
1
Ignoring .Rprofile when installing a package
Dear all, Is there a way to force R CMD INSTALL to ignore ~/.Rprofile and similar? I presume it sources these startup files for a reason, but I've found that it can cause confusion or problems. In particular, my ~/.Rprofile loads a few packages which I very frequently use, but this stops me from installing new versions of their dependencies; viz. $ R CMD INSTALL tractor.base * installing to
2007 Jan 26
1
readBin is much slower for raw input than for a file
Dear all, I'm trying to write an efficient binary file reader for a file type that is made up of several fields of variable length, and so requires many small reads. Doing this on the file directly using a sequence of readBin() calls is a bit too slow for my needs, so I tried buffering the file into a raw vector and reading from that ("loc" is the equivalent of the file pointer):
2007 Jan 26
1
readBin is much slower for raw input than for a file
Dear all, I'm trying to write an efficient binary file reader for a file type that is made up of several fields of variable length, and so requires many small reads. Doing this on the file directly using a sequence of readBin() calls is a bit too slow for my needs, so I tried buffering the file into a raw vector and reading from that ("loc" is the equivalent of the file pointer):
2010 Jan 03
2
Emacs vs Eclipse vs Rcmdr
Hi everyone, I could have posted this on R-devel or the GUI list, however don't feel it's that serious. Hence, decided R-help would be the most appropriate. I'm not so much interested in which is the best user interface for R. Rather which is the best ***platform*** for developing ***new*** user interfaces for R. Noting I'm using the term user interface is a very general sense.
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
2015 Jul 28
2
all.equal: possible mismatch between behaviour and documentation
Dear all, The documentation for `all.equal.numeric` says Numerical comparisons for ?scale = NULL? (the default) are done by first computing the mean absolute difference of the two numerical vectors. If this is smaller than ?tolerance? or not finite, absolute differences are used, otherwise relative differences scaled by the mean absolute difference. But the actual behaviour
2010 Jul 16
2
Creating an environment with attributes in a package
Dear all, I am trying to create an environment object with additional attributes, viz. Foo <- structure(new.env(), name="Foo") Doing this in a standard session works fine: I get the environment with attr(,"name") set as expected. But if the same code appears inside a package source file, I get just the plain environment with no attributes set. Using a non-environment
2008 Apr 28
4
R 2.7.0, match() and strings containing \0 - bug?
Hi, A piece of my code that uses readBin() to read a certain file type is behaving strangely with R 2.7.0. This seems to be because of a failure to match() strings after using rawToChar() when the original was terminated with a "\0" character. Direct equality testing with == still works as expected. I can reproduce this as follows: > x <- "foo" > y <-
2009 Feb 04
2
Capturing all warnings (with messages)
Dear all, For an open-source project that I'm working on (1), which uses R for all its heavy lifting but includes a wrapper shell script, I was hoping to find a way to capture all warnings (and, in fact, errors too), and handle them in my own way. I realise I can do this for a single expression using something like: > f <- function(w) print(w$message) >
2009 Aug 11
1
readBin() arg check has unnecessary overhead (patch included)
Dear all, The version of readBin() in R-devel includes a use of match(), through `%in%`, which can affect its performance significantly. By using primitives instead of the rather expensive call to match(), I reduce the time spent inside readBin() by more than 30% in some of my code (part of the tractor.base package). A simple patch that does this is given below. This passes "make
1997 Nov 12
4
R-alpha: batch
Back to my favourite R subject: batch mode. Some months ago, I pointed out how the default of saving .RData automatically in batch can often lead to completely erroneous results when using data.frames. Basically the idea of .RData is to save the environment to start where one left off. This will generally be quite different than where one started the session. The idea of a batch file is to redo a
2015 Jul 30
1
all.equal: possible mismatch between behaviour and documentation
Dear Jon, thank you for raising the issue, >>>>> Jon Clayden <jon.clayden at gmail.com> >>>>> on Tue, 28 Jul 2015 12:14:48 +0100 writes: > Sorry; minor clarification. The actual test criterion in the example I > gave is of course abs((0.1-0.102)/0.1) < 0.01, not abs(0.1) < 0.01. In > any case, this does not match (my reading of) the docs,
2007 Mar 01
1
R (Input from Keyboard): How do I remove error?
Hi, I am trying to read some value from keyboard in one of my R program. I want to do manipulation on data based on this value. But I am facing a problem which is described below with the help of an example: My code is similar to: : : cat("\n","Enter value:: ","\n") y<-scan(n=1) a <- b*y cat("\n","Enter new value::","\n")
2009 Aug 14
1
Package-level access to Rp->R_Quiet ?
I would like to simulate the effect of the command-line option --quiet from user-level scripts and startup code. From src/main/CommandLineArgs.c I learn that Rp->R_Quiet is set, and I see how that is used in main/main.c. I would use this from code in Rprofile.site. In other words, I want to be silent when --quiet is used (as e.g. by littler or Rscript) but not by R itself in normal
2007 Mar 11
1
using scan to record user's input
I'm using scan in a script to record a series of responses of the user as a function of some graphs that I put up on the screen. A toy version would be, y <- rep(NA, 3) for (ix in seq( length(y) ) ) { y[ix] <- scan( n = 1 ) } However, if I include any code after this loop, for example, y <- rep(NA, 3) for (ix in seq( length(y) ) ) { y[ix] <- scan( n = 1 ) } y I get an error
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 >