Have code below where I am trying to pick out the unique zone names then iterate through , however when I run it it just prints out 1 line.
This is my code:
ZonelistName<-unique(temp[c("zone")])
#this is where the LSD for the zone will be
for (p in c(ZonelistName)) {
print(p)
}
Which prints out:
# > [1] 3 2 5 1
dput(head(ZonelistName))
structure(list(zone = c(3, 2, 5, 1)), row.names = c(NA, -4L), class = c("tbl_df",
"tbl", "data.frame"))
sorry i cant reproduce it as i dont know what that object is