# instructions pour la cryptographie

# charger la liste des caractères codés 

# Alphabet (le rentrer tel quel)
alphabet=c('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','.',' ',',',';',':','?','!','-',"'",'"')

# Charger la matrice et remplacer les zeros par des nombres petits
M<-read.table(" ... CHEMIN_VERS_LE_BON_REPERTOIRE ... /matrice.dat")
#ou, suivant les machines :
# M<-matrix(scan(" ... CHEMIN_VERS_LE_BON_REPERTOIRE ... /matrice.dat",n=36*36),36,36,byrow=TRUE)
MM<-M
la=36
for (i in 1:36)
{
	for (j in 1:36)
	{
		if (M[i,j]==0) 
		{
			MM[i,j]=1
		}
	}
}
mini=min(MM)
for (i in 1:36)
{
	for (j in 1:36)
	{
		if (M([i,j]==0)
		{
			M[i,j]=mini/100
		}
	}
}

# Trouver le numéro d'un caractère dans l'alphabet
ind<-which(alphabet=="c")		

# Concaténer des chaînes de caractères
essai=paste("mo","t",sep='')

# Permuter une liste de taille 36 (au hasard)
sample(f,36,replace=FALSE,prob=NULL)

#Tirer une partie de deux éléments dans {1,2,...,36}
ech=sample(1:36,2,replace=FALSE,prob=NULL)

# Charger la phrase codée
code=readLines(" ... CHEMIN_VERS_LE_BON_REPERTOIRE ... /liste_codee.dat")