Displaying 20 results from an estimated 1000 matches similar to: "Cannot use an escape character in regexp"
2009 Aug 21
2
Problem with passing a string to subset
Dear R-users,
The following question bothered me for the whole afternoon: how can one
pass a string as the conditioning argument to subset? I tried plain
mystr, eval(mystr), expression(mystr), etc... I don't to be able to find
the correct syntax
> foo <- data.frame(a=1:10,b=10:1,c=rep(1:2,5))
> mystr<-"c==1"
> subset(foo,c==1)
a b c
1 1 10 1
3 3 8 1
5 5 6
2008 Aug 31
1
Parenthesis recognition with grep
Dear R-users,
I need to dynamically recognize the index of a given string myStr in a
vector of string. The problem is that myStr might contain parenthesis,
causing grep not to recognize it the way I want (see below). The help
mentions that the pattern used by grep should be in the POSIX format...
I guess the problem is here; unfortunately, I am not familiar with the
subtleties of the POSIX
2007 Apr 11
1
package incompatibility under 2.5.0 (please respond directly, I am not on r-devel)
Dear all,
For my package "ref" I have implemented extensive regression testing. It now fails to compile since primitives "dim" and "dimnames" (and their assignment methods) no longer allow for additional arguments. I was using an additional argument "ref" with several methods. For "].refdata" it still works, with "dim.refdata" no longer.
2009 Sep 15
1
Regular expression problem
Dear R-users,
I am trying to use the grep function to test whether a particular string
is of the form "n.../mydir/myfile.mytype.myext". Anything between n and
mytype could vary, and anything after mytype could vary. I tried to
proceed by steps to build my regular expression... but I do not really
understand why the last call of the following code do not work.
Any help would be
2010 Nov 08
1
try (nls stops unexpectedly because of chol2inv error
Hi,
I am running simulations that does multiple comparisons to control.
For each simulation, I need to model 7 nls functions. I loop over 7 to do
the nls using try
if try fails, I break out of that loop, and go to next simulation.
I get warnings on nls failures, but the simulation continues to run, except
when the internal call (internal to nls) of the chol2inv fails.
2006 Apr 24
1
Re: Shielding of T1/E1 cables WAS RE: PinoutsforT1/E1 crossover
> Close. 10/100mbps Ethernet uses wires 1,2,3,6 but that is pair 2 & 3.
> Pair
> one is the pair up the dead center (pins 4&5), pair 2 is pins 1&2,
pair 3
> is
> 3&6 and pair 4 is 7&8. A T1 uses pairs 1&2, which is why you can't
use a
> regular crossover cable for a T1 crossover, but you can use a regular
> ethernet patch cable as a T1 patch
2002 Sep 05
1
Help with perm.test please
Hi All:
OK, this is probably a stupid thing to do but.......
Say I have 706 controls and 6 treatments, and want to
do a basic two-sample permutation test. I could do a
monte carlo approximation but instead want to use
perm.test.
Now it happens that my data is counts with
> unique(x)
[1] 1 2
> unique(y)
[1] 1 2 5 3 10 9 7 4 6 11 8 23 18 30 16 29
42
so there aren't that many
2015 Aug 14
2
[LLVM RFC] Add llvm.typeid.for intrinsic
This is for BPF output. BPF program output bytes to perf through a
tracepoint. For decoding such data, we need a way to describe the format
of the buffer. This patch is a try which gives each variable a unique
number by introducing a new intrinsic 'llvm.typeid.for'.
At the bottom is an example of using that intrinsic and the result
of
$ clang -target bpf -O2 -c -S ./test_typeid.c
2007 May 09
5
Reading a web page in pdf format
Each day the daily balance in the following link
http://www.
snamretegas.it/italiano/business/gas/bilancio/pdf/bilancio.pdf
is
updated.
I would like to set up an R procedure to be run daily in a
server able to read the figures in a couple of lines only
("Industriale" and "Termoelettrico", towards the end of the balance)
and put the data in a table.
Is that possible? If
2011 Mar 18
0
apply function returning different results
For some reason when I apply a function to a single row in R it works, but
when that same row is in a data.frame it does not, see below:
apply(dx[954,], 1, query.db)
2571
1092 0.06044147
3890 0.05948577
3273 0.05911261
794 0.05855583
4241 0.05854064
3560 0.05602690
apply(dx[954:955,], 1, query.db)
$`2571`
numeric(0)
$`1194`
908 3754 5119 2835
2005 Oct 07
2
finding missing lines...
Take this as an example:
> a=data.frame(col1=c(1,2,3,4,5), col2=c
("my","beloved","daughter","son","wife"))
> b=data.frame(col1=c(1,2,4),
col2=c("my","beloved","son"))
> a
col1 col2
1 1 my
2
2 beloved
3 3 daughter
4 4 son
5 5 wife
> b
col1 col2
1 1 my
2
llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event
2015 Aug 12
3
llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event
On 2015/8/12 12:57, Alexei Starovoitov wrote:
> On Wed, Aug 12, 2015 at 10:34:43AM +0800, Wangnan (F) via llvm-dev wrote:
>> Think about a program like this:
>>
>> struct strA { int a; }
>> struct strB { int b; }
>> int func() {
>> struct strA a;
>> struct strB b;
>>
>> a.a = 1;
>> b.b = 2;
>>
2007 Feb 07
2
Finding not-matching rows in tables
I have these two dataframes in which 'id' is the key field
> tabella
id nome
1 1 PIEMONTE
2 2 VALLED'AOSTA
3 3
LOMBARDIA
4 4 TRENTINO
5 5 VENETO
6 6 FRIULI
AND
> tab
id nome
1 1 PIEMONTE
2 2 VALLED'AOSTA
3 3 LOMBARDIA
4 4 TRENTINO
5 25 CAMPANIA
6 28
LAZIO
Is there any
2008 Feb 21
2
Unable to create/index a zoo irregular timeseries
In the text file pressione2008.csv I have the following
"Data","MAX","MIN","Note"
"07-01-2008 08:00:00", 135, 90, "Eccessi feste, inizio dieta"
"07-01-2008 18:00:00", 135, 85, ""
"08-01-2008 08:00:00", 125, 75, ""
which is a collection of blood pressure data at different time of the day.
I would
2012 Mar 16
3
Cosinor
Hola, ¿qué tal?:
Tengo la siguiente duda:
Para el caso del Cosinor Simple:
Y = M + A * cos(2*pi*t/T + phi) + error
Cuando T conocido, podemos asumir:
Y = M + beta * X1 + gamma * X2 + error,
siendo X1 = cos(2*pi*t/T) y X2 = sin(2*pi*t/T)
En este caso (Cosinor simple) el modelado lo llevo a cabo del siguiente modo:
lm( y ~ X1 + X2)
Para el caso de componentes múltiples:
Y = M + ?Aj *
2018 Dec 12
2
doveadm proxy list repeats header line
Hi all,
just a minor thing: Why does `doveadm proxy list` repeat the header line
after each entry? Too me, that just makes the output harder to read.
So instead of this:
root at mail1 ~ # doveadm proxy list
username proto src ip dest ip port
info at domain1.de imap 80.152.196.98 222.133.127.53 993
username service src-ip dest-ip
2006 Oct 27
3
R & gams
At office I have been introduced by another company to new, complex energy
forecasting models using gams as the basic software.
I have been told by the company offering the models that gams is specialised
in dealing with huge, hevy-weight linear and non-linear modelling (see an
example in http://www.gams.com/modtype/index.htm) and they say it is almost
the only option for doing it.
I would
2006 Apr 04
3
Financial functions
In what R package(-s) can I find the entire set of financial functions that
you can find in MS-Excel such as PMT, PPMT, FV and IPMT?
Ciao
Vittorio
2005 Nov 09
0
R: Re: RODBC fails to build
Dear All,
Thanks to the suggestion of Prof Ripley I progressively
solved the many libraries problems connected to the installation of the
R package RODBC under FreeBSD 5.4.
*** As far as this OS is concerned
*** please take notice that the sentence in the README file:".....
Use
the configure options --with-odbc-include and --with-odbc-lib or
environment variables ODBC_INCLUDE and
2009 Jan 09
3
Pack and Unpack Strings in R
Dear all,
Does R has any function/package that can pack
and unpack string into bit size?
The reason I want to do this in R is that R
has much more native statistical function than Perl.
Yet the data I need to process is so large that it
required me to compress it into smaller unit -> process it -> finally
recover them back again into string with new information.
In Perl the