similar to: read/write connections

Displaying 20 results from an estimated 20000 matches similar to: "read/write connections"

2008 Oct 03
1
Problem with read.table in Windows and Linux
Hello everyone, I'm trying to open the same file under Linux and Windows. Under Windows everything is ok but when I try to do it under Linux I have a mistake and I don't know why. This is the mistake: Error in make.names(col.names,unique=TRUE): string multibyte 1 invalid why? I write this when I want to do it under Windows: zz.info<-read.table(file("C:/Documents and
2009 Feb 08
1
compressing data without writing output to file
This might seem like a strange question but is there any way to compress an R object (such as a matrix) and know its resulting size in bytes ? Clearly, I could implement this in the following way (if x is my matrix): zz <- gzfile(fname,"w"); write.table(x,zz); close(zz); file.info(fname)[,"size"]; However, I need to do this for hundreds of thousands
2013 Jul 02
3
Ctrl+C in R will terminate the child process which is spawned by using "pipe"
Hi, all, I pressed Ctrl+C in R process, and found that the child process which was spawned by using "pipe" is terminated due to this. Are there any way to work around it, so that the child process can run happily without being terminated? Or can we block the signal for the child process? 1. I used pipe to spawn one C++ process, which will running in a loop without exiting immediately.
2009 Jan 23
2
Write to multiple connections or multiple text files
Hi all, I want to modify a large number of text files (ca 4000) by replacing a value found on a particular line in them with a value from an R object. For a single file I would normally use: con<-file ("foo.txt", open="r+") content<-readLines(con) content[n]<-"test" writeLines(content,con) close(con) For repeating this for several files I can
2003 May 20
4
Output to connections
In the document "R Data Import/Export", section "Output to connections", there is the following portion of code: ## convert decimal point to comma in output, using a pipe (Unix) zz <- pipe(paste("sed s/\\./,/ >", "outfile"), "w") cat(format(round(rnorm(100), 4)), sep = "\n", file = zz) close(zz) ## now look at the output
2010 Dec 07
1
Two-node cluster often hanging in o2hb/jdb2
Hi, I'm pretty new to ocfs2 and a bit stuck. I have two Debian/Squeeze (testing) machines accessing an ocfs2 filesystem over aoe. The filesystem sits on an lvm2 volume, but I guess that is irrelevant. Even when mostly idle, everything accessing the cluster sometimes hangs for about 20 seconds. This happens rather frequently, say every 5 minutes, but the interval seems irregular while the
2006 Aug 08
1
Call for Beta Testers: R+ (read R plus) for Solaris and Linux:
Code-named R+Team, our commercially supported R group is looking for beta testers for R+ on Solaris and R+ on Linux. We'd love to get your feedback for our R+Professional version that has additional funcationalities for enterprise support. The sooner we get your feedback and inputs, the faster we'll make changes for the final release! To participate in our beta test program, please
2010 May 18
1
Regarding the 'R' Load Command
Hi, I'm new to 'R' and need some help on the "Load" command. Any responses will be highly appreciated. Thanks in advance! As per manuals, the "Load" command expects a binary file input that is saved using a "save" command. However it is required that we need to call the 'R' program from Java web application using RJava, and pass a string
2010 Feb 02
3
Generating a PDF using popen and wkhtmltopdf
As described on wkhtmltopdf Google group (http://code.google.com/p/wkhtmltopdf/issues/detail?id=162), I have a problem generating a PDF while using popen and wkhtmltopdf. wkhtmltopdf takes HTML code as input and ouputs a PDF file. Here is what I''m doing: command = ''"C:\Program Files\wkhtmltopdf\wkhtmltopdf.exe" - - -q'' IO.popen(command,
2009 Jun 08
2
help to speed up loops in r
Hi i am using a script which involves the following loop. It attempts to reduce a data frame(zz) of 95000 * 41 down to a data frame (averagedreplicates) of 95000 * 21 by averaging the replicate values as you can see in the script below. This script however is very slow (2days). Any suggestions to speed it up. NB I have also tried using rowMeans rather than adding the 2 values and dividing by 2.
2010 May 26
2
writing function : can't find an object
Dear group, Here is my function: #return the daily PL for day y PLDaily<-function(x,y) { #find elements in my directory with "LSCPos" in the name, keep the numeric part in the name and #create a list l<-gsub("\\D","",dir()[grep("LSCPos",dir())]) #select in the list the desired elements
2009 May 15
2
Help with loops
Hi I am trying to create a loop which averages replicates in my data. The original data has many rows. and consists of 40 column zz[,2:41] plus row headings in zz[,1] I am trying to average each set of values (i.e. zz[1,2:3] averaged and placed in average_value[1,2] and so on. below is my script but it seems to be stuck in an endless loop Any suggestions?? for (i in 1:length(average_value[,1])) {
2009 Nov 04
4
unexpected results in comparison (x == y)
Dear readers of the list, I have a problem a comparison of two data from a vector. The comparison yields FALSE but should be TRUE. I have checked for mode(), length() and attributes(). See the following code (R2.10.0): ----------------------------------------------- # data vector of 66 double data X =
2009 May 15
1
Fw: Help with loops(corrected question)
--- On Fri, 15/5/09, Amit Patel <amitrhelp at yahoo.co.uk> wrote: > From: Amit Patel <amitrhelp at yahoo.co.uk> > Subject: Help with loops > To: r-help at r-project.org > Date: Friday, 15 May, 2009, 12:17 PM > Hi > I am trying to create a loop which averages replicates in > my data. > The original data has many rows. and consists of 40 column > zz[,2:41]
2008 Jul 30
1
model mix problem. FALSE CONVERGENCE
Hi R users I try to use the lme but I can?t!!!!! My script is (some words in french, sorry!!): rm(list=ls(all=TRUE)) #Efface tous les objets en m?moire pour ?viter des erreurs library(MASS) #Chargement des Librairies library(car) library(Hmisc) library(tkWidgets) library(svDialogs) library(multtest) library(nlme) #Rep <- "C:/Documents and Settings/U3M/Bureau/steph/Scripts
2010 Jun 22
4
seek() and gzfile() on 32-bit R2.12.0 in linux
I have installed both 32-bit and 64-bit versions of R2.12.0 (2010-06-15 r52300) on my Ubuntu 10.04 64-bit system. I observe the following behavior when running the examples from base::connections. There appears to be a problem with seek() on a .gz file when using a 32-bit installation of R2.12.0, but the problem doesn't appear in the 64-bit installation. I realize that seek() has been
2019 Oct 29
3
Committing with git
> At the dev meeting I heard Doug Gregor say something like, "what kind of dirty animals are you, you just push directly to master!?" Based on that, I think other communities may set up workflows where they push branches to places, and some automation rebases and updates master asynchronously, optionally conditioned on some (light) testing or approval. Someone has already mentioned
2005 Aug 29
4
ttda on R 2.1.1: error
Hello, I'm trying to use the package ttda, wich is involved in text analysis, for my own data about answers in a company survey. I've installed it, as well as ispell, but when trying to use an example: > zz <- file("stupid.txt", "w") # build a data file > cat("{comment - stupid data file} \n" , file = zz) > cat("<uci=1>
2005 Jun 02
1
Wishlist: more flexible handling of tick labels in axis.Date (PR#7913)
Full_Name: Gavin Simpson Version: 2.1.0-patched (1-Jun-2005) OS: Linux (Fedora Core 3) Submission from: (NULL) (128.40.32.76) axis.Date() insists on labelling tick marks. It could be made more flexible by allowing the user to specify if they want the ticks to be labelled, for example, to add un-labelled minor ticks for "months", added to a plot with "years" labelled. The user
2002 Nov 29
2
readBin or writeBin adds extra nulls (PR#2333)
Full_Name: Ken Yap Version: 1.6.1 OS: Linux (SuSE 8.0) Submission from: (NULL) (129.78.64.5) I'm trying to copy a file using readBin and writeBin. (The reason is to be able to pipe PostScript or PDF output to a socket later, this is just an experiment.) I do: zz <- file("foo.ps", "rb") r <- readBin(zz, character(), 1000000) yy <- file("bar.ps",