Skip to content

Latest commit

 

History

History
71 lines (46 loc) · 2.56 KB

README_R.md

File metadata and controls

71 lines (46 loc) · 2.56 KB

README

Introduction

Hi there! My name is Sam. I am a mathematician believing in that math is for everyone. So here I'm, sharing with you my thoughts on the general solutions to some problems posted on Project Euler.net. Besides the explanations to the problems, I will also include the scripts in a programming language called R for the pertinent computations. Although often I will be including some built-in functions in R in the scripts, they should be fairly easy to follow as long as you have some prior knowledge in any programming language. That said, this is a good place for people to see some examples of R programming if you are interested in learning the language. There is another contributor to this blog, Luis, who is in charge of the c++ version of the programs. To view his work, please go up to the previous repo and check out README_C++.md for details.

Why R?

  1. Why not? While languages like Java, C++ and Python are very popular and much more familiar to many, it is always great to explore and expand.

  2. R is a high-level language that is designed for (particularly statistical) computations. Thus, it has numerous built-in functions which we would have to write ourselves or at least import from some libraries if we use other languages.

  3. Good pay!

How to View?

Open the index page in the R_Solutions directory and then click on the link of interest.

The codes are embedded in the webpage. To run the scripts, copy and paste the codes in the boxes like this one

x <- 1
y <- 2
z <- x+y

on a new R scipt file, save it as FileNameOfYourChoice.R and then compile. Note that sometimes there are boxes with value(s) preceeded by two sharp signs as shown in the second snippet below,

z # Calls for the value of z.
## [1] 3

These are the results of some evaluations which I use for demonstration and need not be copied to run the script.

Contact

Please feel free to comment. I would love to hear your thoughts. You may also email me if you have a request for some particular problems. Enjoy!