Discriminant analysis splitting data

Hi.
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
set.seed(1234)
pd <- sample(2,nrow(data),replace = TRUE, prob = c(0.7,0.3))
traindata <- data[pd==1,]
testdata <- data[pd==2,]