Skip to content

Instantly share code, notes, and snippets.

@actuaryactually
actuaryactually / Splines.R
Created May 31, 2017 06:05
Fitting Cubic Splines
#FITTING SPLINES IN R
# D Menezes 20170531
#0. PRELIMINARIES
#install.packages("pacman") #only needed if you don't have it installed
pacman::p_load("splines")
#1. INPUT VALUES
input.x<-c(seq(from=0,to=120,by=12)) #assuming we have annual spline points
@kherge
kherge / Example.java
Last active November 22, 2023 11:14
Null Coalescing in Java
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.Optional;
public class Example {
public static void main(String []args) {
// Create a series of nullable objects.
Test a = new Test();