Python script

Let’s write something here. In particular a long formula to test the line wrapping.

def test_func(x, y, z):
    '''A long comment line is starting this function of.'''

    res = x**2 + y**2 + z**2 + x*y*z + 2*x + 2*y + 2*z

    return res

Python stats code

Code snippet goes here. It’s about Python.

def calc(x, y):
    '''A simple statistical function'''

    z = x + y
    
    return z

Old post about R

Let’s write some code snippet here for future reference.

calc_bin_var <- function(p, n) {
  var <- p * (1 - p)
  
  var 
}

bin_var = calc_bin_var(0.2, 25)
bin_var