Skip to content

Instantly share code, notes, and snippets.

@richarddmorey
Created July 1, 2017 15:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richarddmorey/93477b47f1ee93b0c8a01bd83c2ee705 to your computer and use it in GitHub Desktop.
Save richarddmorey/93477b47f1ee93b0c8a01bd83c2ee705 to your computer and use it in GitHub Desktop.
covariance matrix
x = scan()
0.78
0.71
0.69
0.71
0.73
0.68
0.69
0.64
0.64
0.62
0.54
0.54
0.50
0.53
0.55
0.50
0.54
0.48
0.50
0.67
0.76
0.75
0.69
0.75
0.66
0.70
0.69
0.54
0.53
0.51
0.52
0.52
0.52
0.51
0.52
0.50
0.49
0.64
0.65
0.65
0.61
0.65
0.63
0.64
0.49
0.46
0.58
0.46
0.51
0.49
0.46
0.51
0.46
0.48
0.82
0.66
0.72
0.65
0.78
0.75
0.52
0.50
0.54
0.56
0.54
0.52
0.52
0.52
0.54
0.53
0.67
0.73
0.65
0.74
0.78
0.51
0.47
0.54
0.53
0.56
0.50
0.50
0.51
0.51
0.54
0.85
0.87
0.79
0.79
0.52
0.47
0.51
0.49
0.51
0.68
0.63
0.66
0.59
0.60
0.79
0.87
0.86
0.49
0.50
0.50
0.50
0.51
0.64
0.64
0.62
0.60
0.61
0.77
0.76
0.50
0.47
0.53
0.50
0.49
0.64
0.59
0.66
0.58
0.58
0.90
0.47
0.45
0.50
0.50
0.51
0.59
0.58
0.60
0.58
0.59
0.47
0.46
0.50
0.52
0.53
0.59
0.58
0.59
0.58
0.60
0.80
0.74
0.72
0.74
0.75
0.69
0.71
0.67
0.68
0.66
0.75
0.74
0.68
0.74
0.65
0.68
0.67
0.67
0.70
0.68
0.65
0.70
0.65
0.66
0.81
0.66
0.70
0.67
0.77
0.72
0.68
0.73
0.68
0.75
0.77
0.85
0.87
0.79
0.79
0.80
0.85
0.84
0.77
0.78
0.89
X = matrix(NA, 19,19)
X[!upper.tri(X)] = x
dim(X) = c(19,19)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment