hardin47/prediction2016

extract_numeric deprecated

Closed this issue · 4 comments

Was trying to replicate your analysis and was wondering if you used a older version of readr package? extract_numeric() causes and error message. Im currently using version 1.0.0., which sends an error suggesting to use parse_numeric() which leads to another error suggesting parse_number() which displays are warning message of parsing failure. Thank you for any info you can provide.

extract_numeric() is in tidyr (I'm using 0.6), not readr. I know that Hadley says extract_numeric() is deprecated in favor of parse_numeric(), but parse_numeric() doesn't seem to be in readr. You are right that parse_number() is in readr, but I think it's a different function.

Are you sure you have tidyr() loaded? and it is giving you an error, not a warning? Maybe use tidyr::extract_numeric() ?

Thank you for the follow up I really appreciate it. I do have tidyr() loaded, version (0.6.0). I went ahead and detached readr() so the function would not be called from that package and instead use tidyr() and gave me the following message. (also loaded dplyr(), "Note that tidyr is designed for use in conjunction with dplyr, so you should always load both" as recommended by Hadley's documentation)

extract_numeric() is deprecated: please use readr::parse_numeric() instead

I went ahead and looked at tidyr() package on Hadley's repository just to make sure I was implementing it correctly and try to identify where that message was coming from and also reads as extract_numeric() is deprecated so a little confused at the moment. I have used the CRAN version and Hadley's, direct from his repository with same the result.

Ill continue to go through the documentation and your code and see what I can come across and what I am missing.

I still can't tell from your message whether these are warnings or errors. If they are warnings only, I'd just go ahead and use exract_numeric() anyway. If it is an error, I'm not sure how to help you. You might also post to stack exchange, but you'll need to supply a complete example to get help. Good luck!

@qservando You might find this series of tweets interesting:

extracttweet