On Wed, Jul 8, 2015 at 8:39 AM, Rich Shepard <[email protected]> wrote:
> On Wed, 8 Jul 2015, Robert Citek wrote:
>
>> Do you know in advance which fields are text, integer, or floats?  Or
>> can a given field be of mixed data-type?
>
>    Germane to cleaning the raw data prior to reading it into R, those fields
> that need to be modified are integer or floating point (text, per se, is not
> an issue) and I believe that a correctly formulated regex can identify the
> field as integer or floating point.
>
>    Does this answer your question?

Almost there.

Given your criteria, I've assembled this example:

Input:
0.01,5,
0.01,,
< 0.01,,
<0.01,,
-0.01,,

Output:
0.01,5,
0.01,0,
0.01,1,
0.01,1,
0.01,1,

Does this sample data accurately capture what you are trying to do?
If not, what is missing?

Regards,
- Robert
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to