search for: lastlin

Displaying 8 results from an estimated 8 matches for "lastlin".

Did you mean: lastbin
2011 Sep 14
1
Open file for reading and writing with APPEND
...can read values form the file, but then upon the first write, the file is overwritten with the new values, so I lose my entire history. Any ideas? Here is what I'm using: ============================= outfile <- file("logfile.csv", open="r") x <- readLines(outfile) lastLine <- x[length(x)] a <- as.numeric( strsplit(lastLine, " +")[[1]][1] ) b <- as.numeric( strsplit(lastLine, " +")[[1]][2] ) c <- as.numeric( strsplit(lastLine, " +")[[1]][3] ) close(outfile) outfile <- file("logfile.csv", open="w") wh...
2005 Sep 18
0
Updated rawConnection() patch
...lude/Rconnections.h.orig 2005-08-03 08:50:36.000000000 -0700 +++ ./src/include/Rconnections.h 2005-09-17 23:56:01.875475000 -0700 @@ -94,8 +94,7 @@ typedef struct outtextconn { int len; /* number of lines */ - SEXP namesymbol; - SEXP data; + SEXP namesymbol, data, venv; char *lastline; int lastlinelength; /* buffer size */ } *Routtextconn; --- ./src/library/base/man/rawconnections.Rd.orig 2005-09-18 11:37:18.004405000 -0700 +++ ./src/library/base/man/rawconnections.Rd 2005-09-18 11:37:00.535655300 -0700 @@ -0,0 +1,71 @@ +\name{rawConnection} +\alias{rawConnection} +\title...
2005 Feb 06
2
Need help with perl script/agi for ringback
...'bloggs'; $server_ip='127.0.0.1'; $tn->print("Action: originate\nExten: 1234\nContext: user\nChannel: local/xxx@user/r/n\nPriority: 1\nCallerid: 1234\n\n"); $tn->waitfor('/Event: Newchannel.*/') or die "Unable to determine call status", $tn->lastline; # wait for asterisk to process $tn->print("Action: Logoff\n\n"); I'm not a programmer (as u can probably tell) so any pointers would be much appreciated. Cheers, Taff. ___________________________________________________________ ALL-NEW Yahoo! Messenge...
2005 Aug 22
2
RFC: "loop connections"
...1755,9 +1792,9 @@ SET_VECTOR_ELT(OutTextData, idx, R_NilValue); } -static void outtext_destroy(Rconnection con) +static void outloop_destroy(Rconnection con) { - Routtextconn this = (Routtextconn)con->private; + Routloopconn this = (Routloopconn)con->private; free(this->lastline); free(this); } @@ -1765,7 +1802,7 @@ static int text_vfprintf(Rconnection con, const char *format, va_list ap) { - Routtextconn this = (Routtextconn)con->private; + Routloopconn this = (Routloopconn)con->private; char buf[BUFSIZE], *b = buf, *p, *q, *vmax = vmaxget();...
2013 Jan 29
1
Sweave files generating miktex errors
...ex\graphics.cfg) (c:\miktex2.9.4757\tex\latex\pdftex-def\pdftex.def (c:\miktex2.9.4757\tex\generic\oberdiek\infwarerr.sty) (c:\miktex2.9.4757\tex\generic\oberdiek\ltxcmds.sty)))) (c:\miktex2.9.4757\tex\latex\fancyvrb\fancyvrb.sty Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix <2008/02/07> (tvz)) (c:\miktex2.9.4757\tex\latex\upquote\upquote.sty) (c:\miktex2.9.4757\tex\latex\base\fontenc.sty (c:\miktex2.9.4757\tex\latex\base\t1enc.def)) (c:\miktex2.9.4757\tex\latex\ae\ae.sty (c:\miktex2.9.4757\tex\latex\base\fontenc.sty (c:\miktex2.9.4757\tex\latex\base\t1enc.d...
2000 Aug 06
1
Trying to "pretty up" output from R job
...got the R code doing almost the right thing. It reads in data, then gets the mean and standard deviation for the numeric variables, puts those results together, and then grabs the directory name from the system and jams that in to the results as well. Here is what I have: data<-read.table("lastline.txt",header=T,as.is = TRUE) indices<-1:dim(data)[2] indices<-na.omit(ifelse(indices*sapply(data,is.numeric),indices,NA)) mean<-sapply(data[,indices],mean) sd<-sapply(data[,indices],sd) dir<-system("pwd",TRUE) newOutput<-rbind(mean,sd) transNewOutput<-t(newOutput...
2006 Jul 05
13
interactive web app
I have an arbitrary program written in any language, and it is a binary (ie foo.exe), that will print out output to stdout constantly every 3-5 seconds. Is there a way that I can have a web application designed in rails that will print the output of this program to the browser every 3-5 seconds in realtime, preferably even in an ajax manner. thanks -- Posted via http://www.ruby-forum.com/.
2001 Feb 17
4
Comments on R-1.2.1 builds (PR#851)
..., Line = 495 An enumerated type is mixed with another type. new->canwrite = (strcmp(mode, "w") == 0); ^ cc-1185 c89: WARNING File = connections.c, Line = 772 An enumerated type is mixed with another type. con->incomplete = strlen(this->lastline) > 0; ^ cc-1552 c89: WARNING File = connections.c, Line = 855 The variable "con" is set but never used. Rconnection con = NULL; ^ cc-1185 c89: WARNING File = connections.c, Line = 910 An enumerated type is mixed with another t...