Added smalk.R file