Discriminant analysis splitting data

I would like to analyze the data set data(wine) which is available in the R package gclus.
How can I split the data set according to the proportions 70:30 into a training and a test set?

Hi Hope helps

data <- iris
#Partition data into Training and testdata datasets
pd <- sample(2,nrow(data),replace = TRUE, prob = c(0.7,0.3))
traindata <- data[pd==1,]
testdata <- data[pd==2,]