Home
  • /about
  • /portfolio
  • /blog
Home » Portfolio

Statistical Computing 1

Portfolio Report 1: An Introduction to R

R is a high-level programming language widely used for statistical computing. Base R provides users with a large variety of statistical and graphical tools, which are easily extended via the use of packages. R is an interpreted programming language. This means that R users execute code via a command-line interpreter and code is interpreted into low-level instructions one line at a time. Integrated development environments (IDEs) such as RStudio provide easy access to such an interpreter through the use of a console....

Jake Spiteri

Portfolio Report 2: Reproducibility

When producing research which involves a lot of code, it is important that your research/analyses can be reproduced. When analyzing data it is common to write some code, change it a little and test some version of your code in the console. Then when your final document is produced, the R script or Markdown document may not produce the exact same results as your published analysis. This is one of the main challenges of producing reproducible research....

Jake Spiteri

Portfolio Report 3: Projects, version control, and packages

R makes it relatively easy to structure a project, by creating a “project”. It also integrates git and github which makes it easy to track changes and publish code to the web. Projects: organizing code The best way to approach projects is to maintain a well-defined file structure. RStudio projects allow you to easily divide your work into different directories. Of course, this can be done manually. Generally a good high-level file structure within your project’s directory is:...

Jake Spiteri

Portfolio Report 4: Vectorization and parallel computing

Vectorization Vectorization is the process of replacing the use of loops in code, with a single operation applied elementwise to the vector. In vectorizing code, the multiple instructions running the same operation in a for loop are replaced by a single instruction which applies the operation to multiple elements in a vector. Vectorization is much faster than using for loops in interpreted languages such as R, Matlab, and Python. To see this in practice, we will look at some examples....

Jake Spiteri

Portfolio Report 5: Functional and object-oriented programming

Programming paradigms R supports multiple programming paradigms. Programming paradigms describe the way in which code is written and structured for larger projects. The types of programming structures are: Imperative programming — We define a sequence of instructions that modify the ‘state’ of the program. Object-oriented programming — Objects combine the machine’s state with a set of methods. Programs are then defined via the construction of objects. Declarative programming — A sequence of operations is defined that only specify what the output of the program should be....

Jake Spiteri
Next  »
© 2024 Jake Spiteri Powered by Hugo & PaperMod