[R] [Tagged] Re: Failed to convert data to numeric
Jeff Newmiller
jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Mon Mar 3 09:33:40 CET 2025
?tools::showNonASCII
On March 3, 2025 12:09:22 AM PST, Ivan Krylov via R-help <r-help using r-project.org> wrote:
>В Mon, 3 Mar 2025 13:21:31 +0530
>Christofer Bogaso <bogaso.christofer using gmail.com> пишет:
>
>> Is there any way to remove all possible "Unicode character" that may
>> be present in the array at once?
>
>Define a range of characters you consider acceptable, and you'll be
>able to use regular expressions to remove everything else. For example,
>the following expression should remove everything except ASCII digits,
>dots, and hyphen-minus:
>
>gsub('[^0-9.-]+', '', dat2)
>
>There is a brief introduction to regular expressions in ?regex and
>various online resources such as <https://regex101.com/>.
>
--
Sent from my phone. Please excuse my brevity.
More information about the R-help
mailing list