mardi 14 avril 2020

replacing columns in matrix from existing matirx R

I want to ask you a quastion how to replace some percentage of columns in Y matrix with columns form X matrix using function sample ? So I have two matrixes X and Y and I want to replace for example 20 percent of columns (randomly) form matrix X to matrix Y using sample ? Please do you have any ideas.




Aucun commentaire:

Enregistrer un commentaire