Displaying 20 results from an estimated 1000 matches similar to: "Getting error while running unix commands within R using system() function"
2012 Oct 14
4
listing the files in a directory using regular expressions
Hi Experts,
This might be silly question that I am asking, but no way as I am new to
R.
I want to list the files in a directory using regular expression like
A_B*_C*.csv etc.
How to make this possible in R ?
I tried like this list.files(dir=".", pattern="A_B*_C*.csv") but this gives
no output, whereas list.files(.... pattern="*.csv") giving all the .csv
files in
2012 Oct 14
6
transforming a .csv file column names as per a particular column rows using R code
Hello all,
I have a .csv file like below.
Tool,Step_Number,Data1,Data2... etc up to 100 columns.
A,1,0,1
A,2,3,1
A,3,2,1
.
.
B,1,3,2
B,2,1,2
B,3,3,2
.
.
...... so on upto 50 rows
where the column "*Tool*" has distinct steps in second column
"*Step_Number*",but both have same entries in Step_Number column.
I want the output like below.
2012 Oct 16
3
Excluding all teh columns from a data frame if the standard deviation of that column is zero(0).
Hi All,
I have a data frame where nearly 10K columns of data, where most of them
have standard deviation( of all rows) as zero.
I want to exclude all the columns from the data frame and proceed to further
processing.
I tried like blow.
*data <- read.csv("data.CSV", header=T)
for(i in 2:ncol(data))
if(sd(data[,i])==0){
df[,i] <-NULL
}
*
where I have the data columns from
2003 Aug 25
6
Syncronize Monitored Calls
I thought I would post this in case it might be of any use to anyone.
Not anything special but it does work. Keep in mind you need sox and
wmix.
Here is some relevant exerpts of my extensions.conf using John Todds
macro.
[globals]
CALLFILENAME=foo
FOO=foo
CALLERIDNUM=foo
[default]
exten => 287,1,Macro(dial,SIP/agent20002|20)
exten => 287,2,Voicemail(u287)
exten =>
2011 Aug 24
1
[PATCH] febootstrap-supermin-helper: Replace objcopy call for embedding init binary
objcopy needs "output-target" and "binary-architecture" parameters
which makes it necessary to keep a list of known architectures.
The bin2s.pl script generates input for the GNU assembler which should
produce an object file that is equivalent to that produced by objcopy.
I have successfully tested the change on an amd64 Debian/unstable system.
---
helper/Makefile.am |
2010 Dec 09
4
lapply getting names of the list
Hello All,
I have a toy dataframe like this. It has 8 columns separated by tab.
Name SampleID Al1 Al2 X Y R Th
rs191191 A1 A B 0.999 0.09 0.78 0.090
abc928291 A1 B J 0.3838 0.3839 0.028 0.888
abcnab A1 H K 0.3939 0.939 0.3939 0.77
rx82922 B1 J K 0.3838 0.393
2012 Mar 28
2
getopt does not work as expected!
I have the following 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 =
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<-readLines(infile,n=1)
}
if (length(newline)>0)
2004 Aug 06
2
decode in ppc 2003
Hi all,
Please a moment to look my source code, this is very similar to example of
the documentation. I added FIXED_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()
{
2018 Jan 09
2
isolinux.bin checksum
Hi,
i think i found a suspect in lzo/prepcore.c and it would indeed be a
wrong range of checksumming (speculative congratulations to Ady).
Looking at
http://repo.or.cz/syslinux.git/blob/0d82b71304d596d80f3c4520f9dcf90048ca50b7:/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)
+
2005 Feb 19
1
a possible bug in 1.1.6
Hello Speex,
I think 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
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" #
2011 Apr 27
1
read.table: fill=T for header?
Dear ExpeRts,t
I am trying to read tab delimted data produced by somewhat brain dead
software that seems to 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.
2004 Aug 06
2
Please 30 second to look a my code
Hi
i'm developing a sort of VoIP application
for my ipaq using speex...
I'm still at beginning and i have many problems encoding and decoding my
wav files....output is only noise! Why?
I'm using
Libspeex 1.1.3,
Embedded VisualC++ 3.0,
Ipaq 3850(206 MHz IntelĀ® Strong ARM 32-bit RISC Processor) PocketPC 2002 (Windows CE 3.0).
Libspeex is complied with the definition of
2017 Jul 15
2
readLines without skipNul=TRUE causes crash
hello, the last line of the code below causes a segfault for me on 3.4.1.
i think i should submit to https://bugs.r-project.org/ unless others have
advice? thanks
install.packages( "devtools" )
devtools::install_github("ajdamico/lodown")
devtools::install_github("jimhester/archive")
file_folder <- file.path( tempdir() , "file_folder" )
tf <-
2012 Mar 19
5
Output formatting in Latex and R
I am working on Latex and R and using following code.
<<echo=FALSE>>=
infile<-read.table("test.txt",sep="\t")
Col3 <- unique(infile[,3])
LCol3 <- length(Col3)
for (i in 1:LCol3) {
print(paste("Column", Col3[i]))
print(infile[infile[,3]==Col3[i],-3])
}
@
I am getting following output.
1] "Column C" V1 V2 V4 1 A B D 2 X T K [1]
2004 Aug 06
1
decode in ppc 2003
Hi,
My problem is at the second fread function,
fread(&nbBytes, sizeof(int), 1, fin); //the first fread
fread(cbits,1, nbBytes, fin);// the second fread.
When I'm debugging always nbytes is greater than cbits. This give me a
execution error.
Thanks.
Rodrigo.
<p><p><p>-----Mensaje original-----
De: owner-speex-dev@xiph.org [mailto:owner-speex-dev@xiph.org] En nombre
2017 Jul 15
0
readLines without skipNul=TRUE causes crash
On 15/07/2017 7:35 AM, Anthony Damico wrote:
> hello, the last line of the code below causes a segfault for me on 3.4.1.
> i think i should submit to https://bugs.r-project.org/ unless others have
> advice? thanks
Segfaults are usually worth reporting as bugs. Try to come up with a
self-contained example, not using the lodown and archive packages. I
imagine you can do this by
2004 Jan 20
1
help - recording both sides of a conversati on
This is what I'm doing it gets you both sides of the phone call...small
size...and playable on windows through a share. My notes:
On redhat 9 I have to run the following command for asterisk to start
LD_ASSUME_KERNEL=2.4.1 asterisk -vvvvgc
[macro-record-on]
exten => s,1,SetVar(CALLFILENAME=${TIMESTAMP}-${ARG2}-${ARG1})
exten => s,2,Monitor(wav,${CALLFILENAME})
;exten =>
2007 Feb 13
1
Hello Guys
hello everybody in this great mailing list , i have some difficulties to follow my code .
i solved some problems thanks to Carine Liang , but i still have one problem and i think it is fatal one.
when i encode the voice data in a wav file it is decoded without any errors it gives me 84 bytes wav file size for 139 kbytes wav audio data .Naturally i wanted to return my file back to its normal