Git Product home page Git Product logo

lucr's People

Contributors

ironholds avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lucr's Issues

Comma(s) used in values less than a thousand when more than one value is present

If I have one value that has only hundreds and not thousands, then to_currency works.

to_currency(804.32, currency_symbol = "$")
[1] "$804.32"

If I have more than one value and some have more than the thousands place and others have less than the thousands place, then all numbers are given the comma.

to_currency(toc, currency_symbol = "$")
# [1] "$ 10,093.00" "$ , 20.32" "$139,012.00" "$ ,804.32"

Can you add a check for each value to make sure that the comma is warranted?

Thank you.

from_currency chokes on as.character

This seem rather strange to me... I think the example makes the issue clear.

x <- c(NA,NA,210,"$550")
y <- as.character(x)
from_currency(x)
[1] 4.243992e-313 4.243992e-313  2.100000e+02  5.500000e+02
from_currency(y)
[1]   0   0 210 550
identical(x,y)
[1] TRUE

Also running it several times gives different result!

> from_currency(x)
[1]   0   0 210 550
> from_currency(x)
[1] 550 550 210 550

Actually the latter seems to be the real issue!

install.packages("lucr") error

I have tried and failed to load the lucr package using both install.packages("lucr"), and devtools::install_github("ironholds/lucr"). With install.packages("lucr") I tried to repos. I am using Windows 7 Professional, R version 3.5.1 (2018-07-02), and RStudio 1.0.143

My apologies if this is the wrong place to post. I googled and looked at stackoverflow.

install.packages produces this error: Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘lucr’

Error in oer_query Unauthorized (HTTP 401) for currency_convert function but list_currencies works fine.

The list_currencies function works fine but currency_convert (and other functions) throws the error below.

list=list_currencies("https://openexchangerates.org/api/latest.json?app_id=db370e9558ff4946b1f4ffd919f79a90", as.df=FALSE)
currency_convert(5, from = "USD", "AUD", "https://openexchangerates.org/api/latest.json?app_id=db370e9558ff4946b1f4ffd919f79a90")
Error in oer_query("latest.json", key, NULL, ...) :
Unauthorized (HTTP 401).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.