powered by
## S3 method for class 'formula': firstobs(formula, data=parent.frame(), ...) ## S3 method for class 'formula': lastobs(formula, data=parent.frame(), ...) firstobs(x, ...) lastobs(x, ...)
x <- c(rep(1,5),rep(2,3),rep(3,7),rep(1,4)) firstobs(x) lastobs(x) data(dietox) firstobs(~Pig, data=dietox) lastobs(~Pig, data=dietox)
Run the code above in your browser using DataLab