You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f90: Define the type of sampling. Give the set and sample sizes and find the number of possibilities and the probability for each possibility *.exe and *.out are the Windows and Linux executables.
f90: Lazy to check whether your matrix is symetric or not! Try this program. The program will tell you where the matrix is asymetric. *.exe and *.out are the Windows and Linux executables.
f90: Insert a random variable (x) from a normal distribution with mean (mu) and standard deviation (std) and get the zscore and Prob(Z =< zscore) (i.e. the area under the curve). *.exe and *.out are the Windows and Linux executables.
R: Convert an upper.tri or a lower.tri data.frame to a full matrix
Convert an upper.tri or a lower.tri data.frame to a full matrix
The function:
tri.2full=function(df) # df is a data.frame with 3 columns
{
dimmat= (sqrt(1+8*nrow(mydf))-1)/2# Assuming 0 rows are not skipped.mat=matrix(, nrow=dimmat, ncol=dimmat)
mat[upper.tri(mat, diag=TRUE)] =df[,3]