In the readr
package in R, the parse_number
function fails when there is more than one period in the string. Is this a bug, or is this by design?
Examples follow:
> library(readr)
> parse_number("asf125")
[1] 125
> parse_number("asf.125")
[1] 0.125
> parse_number(".asf.125")
Warning: 1 parsing failure.
row # A tibble: 1 x 4 col row col expected actual expected <int> <int> <chr> <chr> actual 1 1 NA a number .
[1] NA
attr(,"problems")
# A tibble: 1 x 4
row col expected actual
<int> <int> <chr> <chr>
1 1 NA a number .