“Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases, then the software is improved to pass the new tests, only. This is opposed to software development that allows software to be added that is not proven to meet requirements.”, from TDD - Wikipedia
Why TDD and testing? Few things you should think about when writing code:
How to write your own Rstudio Addin If you want to create your own RStudio addins, all you need to do is:
Create an R package Create some R functions Create a file at inst/rstudio/addins.dcf Links https://rstudio.github.io/rstudioaddins/ https://github.com/rstudio/addinexamples devtools::install_github("rstudio/addinexamples") 1. Create am R Package Set up tools for package development library(devtools) library(roxygen2) # getwd() # setwd("path/to/repo") Create Package I am mainly following: https://hilaryparker.com/2014/04/29/writing-an-r-package-from-scratch/
create("rstudio_addin") This creates the following files and folder structure:
In this post we will explore how to set up R package development on github focusing on implementing an automatic Travis and codecoverage check.
I set up a sample repo that will include a very basic configuration: TravisR
Travis Travis is a great You can easily sign up by connecting your github account:
You will need to select the repository want to have checked and save this in a file called travis.
Source https://www.analyticsvidhya.com/blog/2017/09/common-machine-learning-algorithms/
It is used to estimate real values (cost of houses, number of calls, total sales etc.) based on continuous variable(s). Here, we establish relationship between independent and dependent variables by fitting a best line. This best fit line is known as regression line and represented by a linear equation
$$Y= a *X + b$$
The best way to understand linear regression is to relive this experience of childhood.
Don’t get confused by its name! It is a classification not a regression algorithm. It is used to estimate discrete values (binary values like 0/1, yes/no, true/false ) based on given set of independent variable(s). In simple words, it predicts the probability of occurrence of an event by fitting data to a logit function. Hence, it is also known as logit regression. Since, it predicts the probability, its output values lies between 0 and 1 (as expected).