[R] Named backreferences in replacement patterns

2007-03-07 Thread Stefan Th. Gries
Hi I have a problem with substitutions involving named backreferences. I have a vector American.dates: American.dates [1] 5/15/1976 2.15.1970 1.9.2006 which I want to change into British.dates: British.dates [1] 15/5/1976 15/2/1970 9/1/2006 I know I can do it like this:

[R] gregexpr in R 2.3.0 != gregexpr in R 2.4.0

2006-10-06 Thread Stefan Th. Gries
Hi all I have a question regarding differences in the way gregpexr works in R 2.3.0 and R 2.4.0. In R 2.3.0, this is what happens: gregexpr( [a-z] [a-z] , a b c d e f , perl=T) [[1]] [1] 1 3 5 7 9 attr(,match.length) [1] 5 5 5 5 5 ... while in R 2.4.0, this is what happens: gregexpr(

[R] 404 HTTP not found

2006-09-17 Thread Stefan Th. Gries
Hi I wrote a script which retrieves links from websites and loads them with scan: ... website-tolower(scan(current.pages[i], what=character, sep=\n, quiet=TRUE)) ... However occasionally, the script finds broken links, such as http://www.google.com/test. when the script tries to access such

[R] Lost command area in R-SciViews

2006-08-24 Thread Stefan Th. Gries
to work with R, Tinn-R, and SciViews, but with the present problem, this is not going to work; I wrote to Philippe Grosjean but have not received a reply. Thanks a lot, STG -- Stefan Th. Gries --- University of California, Santa Barbara http

[R] Regular expressions: retrieving matches depending on intervening strings

2006-08-16 Thread Stefan Th. Gries
lookahead but I really can't get my head around this. Any pointers would be greatly appreciated. Thanks a lot, STG -- Stefan Th. Gries --- University of California, Santa Barbara http://www.linguistics.ucsb.edu/faculty/stgries

[R] Regular expressions: retrieving matches depending on intervening strings [Follow-up]

2006-08-16 Thread Stefan Th. Gries
, attributes)) stops-starts+lengths-1 substr(a, starts, stops) What is still missing is that the disallowed string is not just [wc] but [wc] and I don't know how to do that. Any ideas (preferably with lookarounds)? Thanks a bunch, STG -- Stefan Th. Gries

[R] RfW 2.3.1: regular expressions to detect pairs of identical word-final character sequences

2006-07-22 Thread Stefan Th. Gries
, text, perl=TRUE) Again, any ideas? I'd really appreciate any snippets of codes, pointers, etc. Thanks so much, STG -- Stefan Th. Gries --- University of California, Santa Barbara http://www.linguistics.ucsb.edu/faculty/stgries

[R] Word boundaries and gregexpr in R 2.2.1

2006-01-31 Thread Stefan Th. Gries
Windows XP: R.version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major2 minor2.1 year 2005 month12 day 20 svn rev 36812 language R Thanks a lot, STG -- Stefan Th. Gries University

[R] grepping and splitting (with R 2.1.1)

2005-09-12 Thread Stefan Th. Gries
Hi R experts I have the following regular expression problem. I am writing a basic corpus retrieval program, i.e. a concordancer/function where a user enters - a set or a directory of text files to search; - a regular expression to search for in these files. I want to provide an output in which

Re: [R] parts of data frames: subset vs. [-c()]

2005-08-27 Thread Stefan Th. Gries
From: Stefan Th. Gries [EMAIL PROTECTED] writes: I have a problem with splitting up a data frame called ReVerb: I would like to extract all cases where SYNTAX==Ditrans from ReVerb, store that in a file, and then generate ReVerb again without these cases and factor levels. My problem

[R] parts of data frames: subset vs. [-c()]

2005-08-26 Thread Stefan Th. Gries
Th. Gries Max Planck Inst. for Evol. Anthropology http://people.freenet.de/Stefan_Th_Gries Machen Sie aus 14 Cent spielend bis zu 100 Euro! Die neue Gaming-Area von Arcor - über 50 Onlinespiele im Angebot. http