GithubHelp home page GithubHelp logo

conversionr's Introduction

conversionr

This is an R package to convert between volume, mass, temperature, and distance units. The package covers converting between basic units of the forementioned categories, and also covers conversions between metric units.

Installation

Currently, the package is only available from this GitHub repo, and is not in the CRAN database yet. To install this package and its contents, open up an R console and run this line:

devtools::install_github('alexnakagawa/conversionr')

Usage of Conversionr functions

It's very simple to convert units using the conversionr package. You can easily convert units like temperature, volume, mass, and distance using the functions conv_temp, conv_volume, conv_mass, and conv_dist for the most common units. You can also convert in between milli, centi, base, and kilo for the metric system using conv_metric. Check the examples below:

If you want to convert 100 degrees Fahrenheit to Celsius run the function this way:

conv_temp(100, "f", "celsius")

For volume conversions, the logic is pretty much the same:

conv_vol(25, "pint", "qt")

The same format follows for mass, and distance:

conv_mass(1,"lb","oz")

conv_dist(4,'feet','m')

To convert in between values of the metric system you can do it like so:

conv_metric(5,"milli","kilo")

Authors

Alex Nakagawa (Github) // Camila Ferreira (Github) // Rohan Karanth (Github)

conversionr's People

Contributors

alexnakagawa avatar camilapferreira avatar rmk4mk avatar

Watchers

 avatar  avatar  avatar

conversionr's Issues

Warnings during install

Hi,

Busy taking a look at your package. During the install process I get the following warnings:

Warning in Ops.factor(left, right) : ‘<’ not meaningful for factors
Warning in if (num < 0 | from == "" | to == "") stop("Invalid Input! Check documentation",  :
  the condition has length > 1 and only the first element will be used
Warning in Ops.factor(left, right) : ‘/’ not meaningful for factors
Warning in if (num < 0 | from == "" | to == "") { :
  the condition has length > 1 and only the first element will be used
Warning in if (num < 0 | from == "" | to == "") stop("Invalid Input! Check documentation",  :
  the condition has length > 1 and only the first element will be used

You really want to resolve this because your package should install without errors or warnings.

Please fix and let me know.

Thanks,
Andrew.

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.