May 2018
Beginner to intermediate
364 pages
7h 43m
English
Here, we show you how to generate an R dataset called iris.RData by using the R save() function:
path<-"http://archive.ics.uci.edu/ml/machine-learning-databases/"
dataSet<-"iris/bezdekIris.data"
a<-paste(path,dataSet,sep='')
.iris<-read.csv(a,header=F)
colnames(.iris)<-c("sepalLength","sepalWidth","petalLength","petalWidth","Class")
save(iris,file="c:/temp/iris.RData")
To upload the function, we use the load() function:
>load("c:/temp/iris.RData")
> head(.iris)
sepalLength sepalWidth petalLength petalWidth Class
1 5.1 3.5 1.4 0.2 Iris-setosa
2 4.9 3.0 1.4 0.2 Iris-setosa
3 4.7 3.2 1.3 0.2 Iris-setosa
4 4.6 3.1 1.5 0.2 Iris-setosa
5 5.0 3.6 1.4 0.2 Iris-setosa
6 5.4 3.9 1.7 0.4 Iris-setosa
Note that the extension of ...
Read now
Unlock full access