This way is a bit easier than using subset
> yourData <- data.frame(Species.Obj.ID = 1:4,
Sample = c(23,90,34,23),
Sample.Name = c("George", "Adilade", "Frank", "Steve"))
> rand <- sample(1:4, 2, replace = FALSE)
> rand
[1] 2 3 # the random numbers are 2 and 3
> yourData[rand, ] # the rows shown are rows 2 and 3
Species.Obj.ID Sample Sample.Name
2 2 90 Adilade
3 3 34 Frank
You can even shorten this all by using
yourData[sample(1:4, 2, replace = FALSE), ]
This will return a random sample of 2 rows of your original data.