On 01.06.2010 02:19, David Winsemius wrote:
On May 31, 2010, at 8:14 PM, jim holtman wrote:
try this:
input <- readLines("yourfile.txt")
# determine start
start <- grep("\tBegin Main\t", input)[1] # first line if many
Puzzled. I thought backslashes in grepping patterns needed to be
double
On May 31, 2010, at 9:14 PM, jim holtman wrote:
This is the case where '\t' is the tab character; '\\t' would give you
the backslash followed by 't' which is not what you want.
Both versions "worked" in the sense of returning the number of the
line with "\tBegin Main\t"
> txt <- "\n\tBegi
This is the case where '\t' is the tab character; '\\t' would give you
the backslash followed by 't' which is not what you want.
On Mon, May 31, 2010 at 8:19 PM, David Winsemius wrote:
>
> On May 31, 2010, at 8:14 PM, jim holtman wrote:
>
>> try this:
>>
>> input <- readLines("yourfile.txt")
>>
On May 31, 2010, at 8:14 PM, jim holtman wrote:
try this:
input <- readLines("yourfile.txt")
# determine start
start <- grep("\tBegin Main\t", input)[1] # first line if many
Puzzled. I thought backslashes in grepping patterns needed to be
doubled? I guess not.
--
David.
if (length(st
try this:
input <- readLines("yourfile.txt")
# determine start
start <- grep("\tBegin Main\t", input)[1] # first line if many
if (length(start) == 1 && (start > 1)){
input <- tail(input, -(start - 1)) # delete heading lines
}
# find lines you want to delete
breaks <- grep("\tBreak\t", input
On May 31, 2010, at 7:51 PM, Kevin Burnham wrote:
I am trying to import a series of text files generated by stimulus
presentation software. The problem that I am having is that the
number of
rows I need to skip is not fixed (depending on subject's pretest
behavior)
nor is the first row of
I am trying to import a series of text files generated by stimulus
presentation software. The problem that I am having is that the number of
rows I need to skip is not fixed (depending on subject's pretest behavior)
nor is the first row of the data I want always the same (the stimuli were
presente
7 matches
Mail list logo