jeudi 14 octobre 2021

R function for randomly removing one data point at a time from each category?

I am trying to analyze how estimating percent cover of a reef changes as the number of points used to analyze the reef changes. My actual dataset consists of 150 photos each with 50 points. The idea is to have R estimate percent cover with all those points and then remove 1 point from each photo and reanalyze, then remove another point and reanalyze etc

Any help in how I can write or find or where I can look for a function like this is welcome as I am very new to all this! Below is a sample dataset with just 3 plots and 5 points per plot. So as mentioned the idea is to analyze with all points, then randomly remove one point from each plot, reanalyze and repeat. Basically this sample the first analysis would be 15 points, the next analysis would be a total of 12 plots etc.

Sample dataset: Plot ID 1 S 1 S 1 S 1 T 1 T 2 S 2 C 2 C 2 SP 2 S 3 S 3 T 3 T 3 C 3 T

THANK YOU!




Aucun commentaire:

Enregistrer un commentaire