Skip to content
Back to formatted view

Raw Message

Message-ID: <CAG_r7O4AtSQ9cqzFfhF9LyMc+M0mE=-UUepNyub+OgGcppsP_w@mail.gmail.com>
Date: 2011-10-17T05:50:53Z
From: Henri-Paul Indiogine
Subject: position of the end of a text file

Hi!

I need to find the position of the last character (could be empty
space) of a vector of text files (my.text.vector) that I have read
into R.  I tried Google, but all I have found needs a pattern.

I tried the following

as.integer(regexpr("??", my.text.vector)

but it returns 1 or even the correct number, but not consistently.   I
understand that ?? is an operator, thus should not be used but itself.

Any ideas?

Thanks,
Henri-Paul

-- 
Henri-Paul Indiogine

Curriculum & Instruction
Texas A&M University
TutorFind Learning Centre

Email: hindiogine at gmail.com
Skype: hindiogine
Website: http://people.cehd.tamu.edu/~sindiogine