search for: infile

Displaying 20 results from an estimated 345 matches for "infile".

2003 Aug 25
6
Syncronize Monitored Calls
...}]?6:3) exten => s,3,System(/usr/local/bin/mix_monitor_files.pl ${MONITORDIR} ${CALLFILENAME}-in.wav ${CALLFILENAME}-out.wav ${CALLFILENAME}.wav) exten => s,6,NoOp Here is mix_monitor_files.pl. sox and wmix must be in the path of your perl script #!/usr/bin/perl $monitordir = shift; $infile = shift; $outfile = shift; $finishfile = shift; chdir($monitordir); $infile_output = `sox $infile -e stat 2>&1`; $outfile_output = `sox $outfile -e stat 2>&1`; $infile_output =~ /Samples read:\s+(\d+)/; $infile_samples = $1; $outfile_output =~ /Samples read:\s+(\d+)/; $outfi...
2010 Dec 09
4
lapply getting names of the list
...0 0.000 0.77 tcn39399 B1 P I 0.393 0.393 0.393 0.56 Note that the SampleID is repeating. So I want to be able to split the dataset based on the SampleID and write the splitted dataset of every SampleID into a new file. I tried split followed by lapply to do this. infile <- read.csv("test.txt", sep="\t", as.is = TRUE, header = TRUE) infile.split <- split(infile, infile$SampleID) names(infile.split[1]) ## outputs “A1” ## now A1, B1 are two lists in infile.split as I understand it. Correct me if I am wrong. lapply(infile.split,function(x)...
2004 Jan 15
2
A language technical question.
If I have 100 objekts in a folder and I prefer not to load them manually I wonder how I do this in R if using a for-loop. I was thinking initially to do something like this: infiles <- dir(pattern=".RData") for(i in length(infiles)) { load(infiles[i]) paste("kalle", i, sep="") <- saveLoadReference } But the line """paste("kalle", i, sep="")""" does not do...
2011 Aug 24
1
[PATCH] febootstrap-supermin-helper: Replace objcopy call for embedding init binary
...ates a source file for the GNU assembler which shuold +# result in an object file equivalent to that of +# +# objcopy -I binary -B $(DEFAULT_ARCH) -O $(ELF_DEFAULT_ARCH) <in> <out> + +use strict; +use warnings; + +die "usage: $0 <in> <out>\n" if @ARGV != 2; + +my ($infile, $outfile) = @ARGV; +my ($buf, $i, $sz); +open my $ifh, '<', $infile or die "open $infile: $!"; +open my $ofh, '>', $outfile or die "open $outfile: $!"; + +print $ofh <<"EOF"; +/* This file has been automatically generated from $infile by $0...
2003 Feb 13
5
ESRI shape file import and time-space models
Dear R user, I am running R under Windows 2000. I am looking for a routine for importing - shape files (ESRI) into R - dbase files (FOXPRO) into R and I am looking for time-space models for description and prediction of Bernoulli-, Binomial- and Poissonvaraibles. Thank's a lot for a reply. Sincerely yours, Ekkehardt Altpeter Swiss Federal Office of Public
2007 May 29
2
search path question
Hi R users, Is there a simple function that can add a folder into current R search path? For example, suppose my current work directory is "D:\work", but my input files are stored in folder "C:\inFiles\", I know I can change work directory or add "C:\inFiles\" before files name when I scan them, but I don't want to do that. I want to find a function that can simply add "C:\inFiles\" into R's search path, so that we I scan a file R will go to all the search paths...
2012 Mar 28
2
getopt does not work as expected!
...wing script (also attached): #!/usr/bin/Rscript spec=matrix(c( 'verbose', 'v', 1, "integer", 'help' , 'h', 0, "logical" ),ncol=4, byrow=TRUE) spec.dim=dim(spec) spec.opt.long=spec[,1] spec.opt.short=spec[,2] spec.opt.l <- spec.dim[1] infile <- "test.dat" args=commandArgs(TRUE); l=length(args) self = commandArgs()[1]; usage <- function() { print(sprintf("Usage: %s [--verbose|-v] [--help,-h] [infile.dat]"),self) print(sprintf(" default infile.dat = '% s'",infile))...
2004 Aug 06
2
decode in ppc 2003
...ED_POINT flag. My source code compile and build but not decode correctly (the error may be in the while). I work with eVC 4.0 and pocket pc 2003. Someone know what is the error? Thanks. Rodrigo. #include "speex.h" #define FRAME_SIZE 160 void CPlayerDlg::OnButton3() { char infile[]="test.spx"; char outfile[]="test.wav"; char *outFile; char *inFile; FILE *fout; // output file FILE *fin; // input file short out[FRAME_SIZE]; short output[FRAME_SIZE]; char c...
2010 Jun 30
1
What is wrong with this code?
Here it is: read.inputs<-function(infile) { for (counter in 1:length(input.list)) { seek(infile,where=0,origin='start') newline<-readLines(infile,n=1) while(length(newline)>0) { if(!is.na(grep(as.character(input.list[[counter]][1]),newline)[1])) { break } newline<-readLine...
2015 Dec 14
4
[PATCH 0/2] resize: Split out the command line parsing into Cmdline
Some simple refactoring of virt-resize. I originally had the idea that we could turn virt-resize into a library (cf. virt-customize) and use it from virt-builder, but I now don't think that would make any meaningful difference. In particular we'd still have to open the handle the same number of times. These two patches are left over from my work on that. Rich.
2012 Oct 27
2
Getting error while running unix commands within R using system() function
...*My aim is to integrate R and unix commands to avoid heavy memory usage that R takes normally.* I can run many unix commands using system("some unix command or sh script.sh or even R file itself ") inside R. But, When I tried to run the command *awk '{print "Hello"$1}' infile.txt* to prefix "Hello" to my first column of file infile.txt, like below in *R * *system(" awk '{print "Hello"$1}' infile.txt") *, I am getting the below error, *Error: unexpected symbol in "system("awk '{print "Hello"* I tried even lik...
2017 Nov 21
0
[PATCH] builder: planner: Don't add some impossible transitions.
...- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/builder/builder.ml b/builder/builder.ml index a4c830e89..843106a86 100644 --- a/builder/builder.ml +++ b/builder/builder.ml @@ -413,6 +413,8 @@ let main () = let remove = List.remove_assoc in let ret = ref [] in + let infile = List.assoc `Filename itags in + (* The scheme for weights ranges from 0 = free to 100 = most expensive: * * 0 = free operations like renaming a file in the same directory @@ -433,8 +435,7 @@ let main () = * We could estimate weights better by looking at file sizes....
2017 Nov 21
1
[PATCH v2] builder: planner: Don't add some impossible transitions.
Previous patch contained a typo. Changed output_format -> output_filename. Rich.
2004 Nov 20
2
[LLVMdev] Re: C back-end for llvmg++
On Nov 19, 2004, at 9:25 PM, Mohd-Hanafiah Abdullah wrote: > Dear Dr Vikram: > > I need to know how to invoke llvmg++ so that it generates C code. Here's how you can do a single file (i.e., an unlinked executable): llvmg++ -c infile.cpp -o - | llc -march=c -o infile.cbe.c Reid might be able to tell you how to do it with a single command using the llvmc tool. In future, please send your questions to llvmdev at cs.uiuc.edu (and add yourself to that list if you're not on it, because all replies go to the list by default)...
2017 Jul 15
2
readLines without skipNul=TRUE causes crash
...if already downloaded lodown::cachaca( ' http://download.inep.gov.br/microdados/microdados_enem2009.rar' , tf , mode = 'wb' ) archive::archive_extract( tf , dir = normalizePath( file_folder ) ) unzipped_files <- list.files( file_folder , recursive = TRUE , full.names = TRUE ) infile <- grep( "DADOS(.*)\\.txt$" , unzipped_files , value = TRUE ) # works R.utils::countLines( infile ) # works with warning my_file <- readLines( infile , skipNul = TRUE ) # crash my_file <- readLines( infile ) # run just before crash sessionInfo() # R version 3.4.1 (2017-06-30...
2004 Aug 06
2
Please 30 second to look a my code
...r_destroy(state); CloseHandle(WaveFile); CloseHandle(SpeexFile); MessageBox(_T("Encoding Done")); } <p><p>void CRegistratoreDlg::OnDecode() { SpeexBits bits; void *state; char InBuffer[200]; short OutBuffer[FRAME_SIZE]; char waveheader[50]; HANDLE InFile; HANDLE OutFile; char nrBytes = 0; int nbBytes = 0; DWORD NrOfBytesRead; DWORD NrOfBytesWritten; InFile = CreateFile(_T("\\Temp\\tempsound.spx"), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); //Create file to decode OutFile = CreateFile(_T(&qu...
2018 Jan 09
2
isolinux.bin checksum
...2b71304d596d80f3c4520f9dcf90048ca50b7:/lzo/prepcore.c it seems that this change in line 374 could yield correct checksums: unsigned int ptr; - for (ptr = 64; ptr < offset; ptr += 4) + for (ptr = start+64; ptr < offset; ptr += 4) csum += get_32((uint32_t *)(infile+ptr)); A test whether it works would be to produce isolinux.bin, read the 4 checksum bytes from it at offset 20, put isolinux.bin into an ISO with mkisofs option -boot-info-table, and check whether the 4 bytes at offset 20 are still the same. (If you use mkisofs or genisoimage, isolinux.bin on ha...
2005 Feb 19
1
a possible bug in 1.1.6
...I've noticed a bug in version 1.1.6. In the source file "speexdec.c", lines 558 to 560 say wav_format = strlen(outFile)>=4 && ( strcmp(outFile+strlen(outFile)-4,".wav")==0 || strcmp(inFile+strlen(inFile)-4,".WAV")==0); . I think each "inFile" should be "outFile". On the other hand, if we really want to look at the "inFile", then we should check its length also. If there's another way I should report this, I'd be glad to hear. Hope...
2011 Apr 27
1
read.table: fill=T for header?
...o think it's a good idea to have an extra tab character after the last column - except for the header line. As explained in the help page, read.delim now assumes that the first column contains the row.names (which is not even wrong) but now and all col.names get shiftet by one column. Example: infile <- 'sample\tx1\n1\tA\t\n2\tB\t\n3\tA\t' read.delim(textConnection(infile)) sample x1 1 A NA 2 B NA 3 A NA So I set row.names to NULL because the man page said "Using ?row.names = NULL? forces row numbering.". Now the row.names really are numbered autom...
2005 Feb 03
1
filling a string buffer in a C routine
I am trying to write a C function that reads lines from a file and passes them back to R. Here is a simplified version: --- C code --- #include <R.h> void read_file(char **filename, char **buf, char **buflen) { FILE *infile; infile = fopen(*filename, "r"); fgets(*buf, *buflen, infile); fclose(infile); } --- R code --- buffer = "xxxxxxxxxx" # kludge! read.file <- function(filename) .C("read_climate", as.character(filename), buf=buffer, buflen=as.in...