The situation is as follows: I have an array with 271 observations and 14 variables in R. I need to randomly exclude a number of crosses and variables, keeping the order of the remaining crosses and adding NA's at the excluded crosses.
At the moment, I can randomly delete and replace the comments ("rows") using the following code:
X100amostra <- X100[sample(1:nrow(X100), 50,
replace=TRUE),]
where "50" is the number of random deletions.
Still, I can do deletions in the form of vectors. I'd like to do it in array form.
Any suggestions?